:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 14px;
  --navy: #102c3b;
  --ink: #163340;
  --muted: #496170;
  --teal: #087c76;
  --mint: #d9f2eb;
  --paper: #f5f8f7;
  --green: #008752;
  --green-hover: #006b42;
  --green-text: #006b42;
  --line: #dce6e7;
  --blue: #e9f2f7;
  --chrome: #202f39;
  --slate: #4c6373;
  --selected: #91adbf;
  --stage: #b8cdd8;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 12px 40px #16324018;
  --space: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --focus: #e5a33b;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a.upload,
.upload {
  cursor: pointer;
}
button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafb;
  color: inherit;
  padding: 8px 11px;
  min-height: 34px;
}
button:hover {
  background: #e2edf3;
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
input,
select,
textarea {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px;
  background: white;
  color: var(--ink);
}
input[type="checkbox"] {
  accent-color: var(--green);
}
input[type="color"] {
  padding: 2px;
  min-height: 32px;
  width: 100%;
}
h1 {
  font-size: 24px;
  font-weight: 500;
  margin: 0;
}
h2 {
  font-size: 20px;
  margin: 0 0 18px;
}
h3 {
  font-size: 14px;
  font-weight: 600;
}
a {
  color: #087d57;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 18px 0;
}
.object[inert][aria-disabled="true"] {
  opacity: 0.55;
}
[hidden] {
  display: none !important;
}
.appbar {
  height: 48px;
  background: #243640;
  color: white;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 14px;
}
.appbar strong {
  font-size: 19px;
}
.appbar a {
  color: white;
  margin-left: auto;
}
.appbar button {
  background: transparent;
  color: white;
  border-color: #51636c;
}
.appbar button:hover {
  background: #455f6d;
}
.appbar .green,
.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.appbar input {
  background: transparent;
  border-color: transparent;
  color: white;
  flex: 1;
  max-width: 480px;
  font-size: 16px;
}
.appbar input:hover,
.appbar input:focus {
  border-color: #6b7d86;
}
#save-status {
  font-size: 12px;
  opacity: 0.8;
  margin-left: auto;
}
#undo,
#redo {
  font-size: 24px;
  padding: 0 8px;
}
.home-layout {
  display: grid;
  grid-template-columns: 210px 1fr;
  min-height: calc(100dvh - 48px);
}
.home-nav {
  padding: 24px 16px;
  border-right: 1px solid var(--line);
  background: #eaf0f4;
}
.home-nav button {
  display: block;
  width: 100%;
  text-align: left;
  margin-bottom: 8px;
}
.home-nav .active {
  background: white;
  border-left: 4px solid var(--green);
}
.home-main {
  padding: 30px 38px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}
.activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
}
.activity-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
}
.activity-card .preview {
  height: 175px;
  background: #e2ebf1;
  display: grid;
  place-items: center;
  padding: 16px;
  cursor: pointer;
  overflow: hidden;
}
.activity-card h3 {
  font-size: 17px;
  font-weight: 500;
  margin: 13px 14px 8px;
}
.activity-card .card-actions {
  display: flex;
  gap: 6px;
  padding: 0 14px 14px;
}
.activity-card .card-actions button {
  flex: 1;
}
.activity-card .meta {
  padding: 0 14px 10px;
  color: var(--muted);
  font-size: 12px;
}
.mini-board {
  position: relative;
  flex: none;
  background: white;
  box-shadow: 0 1px 4px #0002;
  overflow: hidden;
}
.mini-board .object {
  pointer-events: none;
}
.toolbar {
  height: 76px;
  display: flex;
  background: #fafdff;
  border-bottom: 1px solid var(--line);
  padding: 5px 12px;
  gap: 5px;
}
.toolbar button {
  border: 0;
  background: transparent;
  min-width: 64px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.toolbar b {
  font-size: 27px;
  line-height: 30px;
  font-weight: 400;
}
.toolbar button.active {
  background: #9db8cc;
}
.toolbar button:hover {
  background: #dbe9f2;
}
.toolbar-spacer {
  flex: 1;
}
.editor-layout {
  height: calc(100dvh - 158px);
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 276px;
}
.pages-panel {
  background: #f7fafc;
  border-right: 1px solid var(--line);
  overflow: auto;
  padding-bottom: 16px;
}
.panel-heading {
  background: #506776;
  color: white;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-heading button {
  border: 0;
  min-height: 22px;
  padding: 0 4px;
  background: transparent;
  color: white;
}
.page-thumb {
  display: block;
  width: calc(100% - 24px);
  margin: 13px 12px;
  padding: 7px;
  background: white;
  text-align: left;
}
.page-thumb.active {
  border: 2px solid var(--green);
  padding: 6px;
}
.page-thumb .mini-board {
  margin: 0 auto 7px;
}
.page-thumb span {
  font-size: 12px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#add-page {
  margin: 2px 12px;
  width: calc(100% - 24px);
  background: #d5e4ee;
}
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 10px 12px;
}
.page-actions button {
  font-size: 12px;
  padding: 5px;
}
.workspace {
  background: #c5d6e3;
  overflow: auto;
  position: relative;
  padding: 28px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}
#canvas-wrap {
  position: relative;
  margin: auto;
  flex: none;
  box-shadow: 0 1px 5px #172d3d25;
}
.ruler,.ruler-unit {
  position:absolute;
  background-color:#edf4f8;
  color:#385262;
  font-size:10px;
  pointer-events:none;
}
.ruler.horizontal {
  height:17px;top:-19px;left:0;right:0;
  background-image:repeating-linear-gradient(90deg,#8aa1b1 0 1px,transparent 1px var(--ruler-tick,10px));
  background-size:100% 4px;background-position:bottom;background-repeat:no-repeat;
}
.ruler.vertical {
  width:18px;left:-20px;top:0;bottom:0;
  background-image:repeating-linear-gradient(#8aa1b1 0 1px,transparent 1px var(--ruler-tick,10px));
  background-size:4px 100%;background-position:right;background-repeat:no-repeat;
}
.ruler-label { position:absolute;line-height:1;white-space:nowrap; }
.horizontal .ruler-label { top:2px;margin-left:2px; }
.vertical .ruler-label { left:2px;margin-top:2px;writing-mode:vertical-rl;transform:rotate(180deg); }
.ruler-unit { width:18px;height:17px;left:-20px;top:-19px;text-align:center;line-height:17px;font-weight:600; }
.board {
  position: relative;
  background: white;
  transform-origin: top left;
  overflow: hidden;
  touch-action: none;
}
.board.grid {
  background-image: radial-gradient(#7893a840 0.7px, transparent 0.7px);
  background-size: var(--editor-grid-spacing,10px) var(--editor-grid-spacing,10px);
  background-position:calc(0px - var(--editor-grid-spacing,10px)/2) calc(0px - var(--editor-grid-spacing,10px)/2);
}
.object {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  user-select: none;
  touch-action: none;
  white-space: pre-wrap;
  line-height: 1.15;
  padding: 8px;
}
.object img {
  object-fit: contain;
  min-height: 0;
  max-height: 100%;
  max-width: 100%;
  flex: 1;
  width: 100%;
  pointer-events: none;
}
.object .object-label {
  flex: none;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: inherit;
  padding: 3px;
}
.object.layout-top {
  flex-direction: column-reverse;
}
.object.layout-left {
  flex-direction: row-reverse;
}
.object.layout-right {
  flex-direction: row;
}
.object.layout-left img,
.object.layout-right img {
  width: 60%;
  height: 100%;
}
.object.layout-symbol .object-label,
.object.layout-text img {
  display: none;
}
.object.selected {
  outline: 2px solid #008eab;
  outline-offset: 2px;
  overflow: visible;
}
.object.selected .object-label {
  overflow: hidden;
}
.resize-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  background: white;
  border: 2px solid #008eab;
  right: -7px;
  bottom: -7px;
  cursor: nwse-resize;
  z-index: 3;
  border-radius: 50%;
}
.object.done {
  opacity: 0.42;
}
.object.done:after {
  content: "✓";
  position: absolute;
  right: 8px;
  top: 8px;
  color: #00814d;
  font-size: 32px;
}
.object.reveal-unnumbered .object-label { visibility:hidden; }
.inspector {
  background: #fafdff;
  border-left: 1px solid var(--line);
  overflow: auto;
}
.inspector-tabs {
  display: flex;
  position: sticky;
  top: 0;
  background: white;
  z-index: 4;
  border-bottom: 1px solid var(--line);
}
.inspector-tabs button {
  flex: 1;
  border: 0;
  border-radius: 0;
  padding: 13px 4px;
}
.inspector-tabs [aria-selected="true"] {
  color: var(--green);
  border-bottom: 3px solid var(--green);
  font-weight: 600;
}
.property-group {
  border-bottom: 1px solid var(--line);
  padding: 14px;
}
.property-group h3 {
  text-transform: uppercase;
  font-size: 11px;
  color: #526b7a;
  letter-spacing: 0.04em;
  margin: 0 0 12px;
}
.property-group label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 9px 0;
  font-size: 12px;
}
.property-group textarea {
  resize: vertical;
  min-height: 58px;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 10px;
}
.property-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.property-actions button {
  font-size: 12px;
  flex: 1;
}
.symbol-search {
  padding: 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.symbol-search > input {
  width: 100%;
}
.symbol-search select {
  flex: 1 1 42%;
  min-width: 105px;
}
.symbol-search > button {
  flex: 1 1 18%;
}
.symbol-search label {
  font-size: 12px;
}
.upload {
  display: block;
  background: #d9e7f0;
  padding: 9px;
  border-radius: 3px;
  text-align: center;
}
.symbol-search .upload {
  width: 100%;
}
#symbol-status {
  margin: 0 14px 10px;
  color: #576d7d;
  font-size: 12px;
}
#symbol-results {
  padding: 0 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}
#symbol-results button {
  padding: 4px;
  font-size: 11px;
  overflow: hidden;
  background: white;
}
#symbol-results img {
  height: 59px;
  max-width: 100%;
  object-fit: contain;
  display: block;
  margin: auto;
}
#symbol-results span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}
.credit {
  font-size: 11px;
  color: #5b6d78;
  margin: 14px;
}
.statusbar {
  height: 34px;
  background: #506776;
  color: white;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 15px;
  font-size: 12px;
}
.statusbar #selection-status {
  margin-right: auto;
}
.statusbar button {
  padding: 2px 9px;
  min-height: 24px;
  border: 0;
}
.statusbar input[type="range"] {
  width: 100px;
  padding: 0;
}
.statusbar output {
  width: 44px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: min(800px, 94vw);
  max-height: 90dvh;
  box-shadow: var(--shadow);
}
dialog::backdrop {
  background: #1b2d3b66;
}
dialog #close-dialog {
  margin-top: 20px;
  float: right;
}
dialog label {
  display: block;
  margin: 12px 0;
}
dialog input:not([type="checkbox"]),
dialog select {
  width: 100%;
  margin-top: 5px;
}
.template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 12px;
}
.template-card {
  padding: 12px;
  text-align: left;
}
.template-card .mini-board {
  margin: 0 auto 12px;
}
.dialog-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.dialog-actions button {
  flex: 1;
}
#toast {
  position: fixed;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  background: #243640;
  color: white;
  padding: 12px 20px;
  border-radius: 4px;
  z-index: 1000;
  max-width: 90vw;
}
#player {
  height: 100dvh;
  background: #e1e9ef;
}
#play-area {
  height: calc(100dvh - 106px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  overflow: auto;
}
#play-board .object {
  cursor: pointer;
}
#play-board .object:focus-visible {
  outline: 4px solid #008eab;
}
#play-message {
  height: 58px;
  text-align: center;
  padding: 10px;
  font-size: 24px;
}
#print-pages {
  display: none;
}
.empty {
  padding: 50px 10px;
  color: #526b7a;
}
.editor-layout.pages-hidden {
  grid-template-columns: 0 minmax(0, 1fr) 276px;
}
.pages-hidden .pages-panel {
  visibility: hidden;
}
.alignment {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}
.alignment button {
  font-size: 12px;
  padding: 5px;
}
.appbar #play-title {
  margin-right: auto;
  font-size: 16px;
}
@media (max-width: 1000px) {
  .editor-layout {
    grid-template-columns: 132px minmax(0, 1fr) 230px;
  }
  .editor-layout.pages-hidden {
    grid-template-columns: 0 minmax(0, 1fr) 230px;
  }
  .toolbar {
    padding: 4px;
  }
  .toolbar button {
    min-width: 52px;
    padding: 4px;
    font-size: 11px;
  }
  .home-main {
    padding: 24px;
  }
  .home-layout {
    grid-template-columns: 180px 1fr;
  }
  #save-status {
    max-width: 180px;
  }
  #dashboard-button {
    font-size: 12px;
  }
  .workspace {
    padding: 24px;
  }
}
@media (max-width: 650px) {
  .home-layout {
    grid-template-columns: 1fr;
  }
  .home-nav {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 12px;
  }
  .home-nav button {
    width: auto;
    margin: 0;
  }
  .home-nav hr,
  .home-nav h3 {
    display: none;
  }
  .home-nav #folders {
    display: flex;
    gap: 6px;
  }
  .home-main {
    padding: 18px;
  }
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .editor-layout {
    grid-template-columns: minmax(0, 1fr) 180px;
  }
  .pages-panel {
    display: none;
  }
  .editor-layout.pages-hidden {
    grid-template-columns: minmax(0, 1fr) 180px;
  }
  .toolbar {
    overflow-x: auto;
  }
  .toolbar button {
    flex-shrink: 0;
  }
  .appbar {
    gap: 6px;
    padding: 6px;
  }
  .appbar input {
    width: 100px;
  }
  #save-status {
    display: none;
  }
  #dashboard-button {
    max-width: 98px;
    padding: 3px;
  }
  .property-group {
    padding: 10px;
  }
  .statusbar {
    gap: 8px;
  }
  .statusbar label {
    display: none;
  }
  .template-grid {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
  }
  #symbol-results {
    grid-template-columns: repeat(2, 1fr);
  }
  #player .appbar {
    height: auto;
    flex-wrap: wrap;
  }
  #player .appbar button {
    font-size: 12px;
  }
  .appbar #play-title {
    width: 100%;
    order: -1;
  }
  .workspace {
    padding: 22px;
  }
  .activity-grid {
    grid-template-columns: 1fr;
  }
}
@media print {
  @page {
    size: A4 landscape;
    margin: 10mm;
  }
  body > * {
    display: none !important;
  }
  body > #print-pages {
    display: block !important;
  }
  .print-sheet {
    page-break-after: always;
    break-after: page;
    position: relative;
    width: 277mm;
    height: 190mm;
    overflow: hidden;
  }
  .print-sheet:last-child {
    page-break-after: auto;
    break-after: auto;
  }
  .print-sheet .board {
    transform-origin: top left;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .print-credit {
    position: absolute;
    bottom: 0;
    left: 0;
    font-size: 8pt;
    color: #333;
  }
  .object {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

.fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.fields label,
.fields input,
.fields select {
  min-width: 0;
  width: 100%;
}
.statusbar button {
  color: #253640;
}
#mobile-pages,
#mobile-inspector {
  display: none;
}
.object.scanning {
  outline: 5px solid #e59a00;
  outline-offset: -5px;
}
.context-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (max-width: 650px) {
  .editor-layout,
  .editor-layout.pages-hidden {
    grid-template-columns: minmax(0, 1fr);
  }
  .inspector {
    display: none;
    position: absolute;
    right: 0;
    top: 124px;
    bottom: 34px;
    width: min(290px, 85vw);
    z-index: 10;
    box-shadow: -8px 0 30px #25364035;
  }
  .mobile-inspector-open .inspector {
    display: block;
  }
  .statusbar #selection-status {
    display: none;
  }
  #mobile-pages,
  #mobile-inspector {
    display: block;
  }
  .statusbar input[type="range"] {
    width: 65px;
  }
  .statusbar {
    gap: 5px;
    padding: 0 6px;
  }
  .statusbar button {
    font-size: 11px;
    padding: 3px 6px;
  }
  .workspace {
    padding: 24px;
  }
  .toolbar {
    scrollbar-width: thin;
  }
  .toolbar-spacer {
    min-width: 5px;
  }
}

#auth-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background: #e4edf3;
  padding: 24px;
}
.auth-card {
  background: white;
  padding: 34px;
  width: min(100%, 390px);
  border: 1px solid #c5d4df;
  border-radius: 7px;
  box-shadow: 0 10px 40px #25364012;
}
.auth-brand {
  margin-bottom: 25px;
}
.auth-brand img {
  display: block;
  height: 56px;
  width: auto;
}
.app-logo {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 6px;
}
.help-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
}
.help-heading .help-logo {
  width: 32px;
  height: 32px;
  border-radius: 7px;
}
.auth-card h1 {
  margin-bottom: 20px;
}
.auth-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 14px 0;
}
.auth-card input {
  min-height: 42px;
  font-size: 16px;
}
.auth-card button {
  width: 100%;
  margin: 5px 0;
}
.auth-card a {
  display: block;
  text-align: center;
  margin-top: 20px;
}
#auth-status {
  color: #a83232;
}
#account-button {
  margin-left: 0;
}
.child-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  margin-right: 8px;
}
.child-switcher label {
  font-weight: 600;
  font-size: 14px;
}
.child-switcher select {
  min-height: 40px;
  min-width: 148px;
  font-size: 16px;
  border-radius: 12px;
  padding: 4px 10px;
  border: 1px solid #8398a6;
  background: #fff;
}
#manage-children {
  min-height: 40px;
  padding: 6px 12px;
  border-radius: 20px;
}
.child-swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-block;
  flex: 0 0 16px;
  background: #008752;
  border: 1px solid #24364033;
}
.child-list,
.child-row,
.new-child {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.child-row {
  padding: 12px 0;
  border-bottom: 1px solid #dbe3e9;
}
.child-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.child-color {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 0;
}
.child-color[aria-checked="true"] {
  border-color: #243640;
}
button.danger {
  color: #a83232;
}
@media (max-width: 1000px) {
  .child-switcher label { display: none; }
}
@media (max-width: 650px) {
  .child-switcher {
    margin-left: 8px;
    flex-wrap: wrap;
  }
  .dashboard-bar {
    flex-wrap: wrap;
  }
}
#sync-notice,
#draft-notice {
  position: fixed;
  bottom: 38px;
  left: 20px;
  right: 20px;
  padding: 12px;
  background: #fff6d7;
  border: 1px solid #ddbd6c;
  z-index: 100;
}
.pair-connect {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.pair-code {
  display: block;
  font-size: 44px;
  letter-spacing: 0.18em;
  text-align: center;
  padding: 20px;
  font-variant-numeric: tabular-nums;
  color: #008752;
}
.pair-qr {
  margin: 0;
  text-align: center;
}
.pair-qr-image {
  display: block;
  width: 200px;
  height: 200px;
  background: #fff;
}
.pair-qr figcaption {
  margin-top: 8px;
  font-size: 15px;
}
.device-row,
.assignment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 9px 0;
  border-bottom: 1px solid #dbe3e9;
}
.assignment-row input {
  width: auto;
}
.account-error {
  color: #a83232;
}
.dialog-link {
  display: block;
  margin: 10px 0;
  font-size: 16px;
}

@media print {
  html,
  body {
    background: white !important;
  }
}
:root { --navy:#102c3b; --ink:#163340; --muted:#496170; --teal:#087c76; --mint:#d9f2eb; --paper:#f5f8f7; --green:#008752; --green-hover:#006b42; --green-text:#006b42; --line:#dce6e7; --blue:#e9f2f7; --chrome:#202f39; --slate:#4c6373; --selected:#91adbf; --stage:#b8cdd8; --radius:10px; --radius-lg:16px; --shadow:0 12px 40px #16324018; --space:8px; --space-2:12px; --space-3:16px; --space-4:24px; --focus:#e5a33b; background:var(--blue); }
.appbar { height:40px; min-height:40px; background:var(--chrome); padding:3px 12px; gap:12px; }
.appbar strong { font-size:14px; font-weight:400; }
.appbar button { border:0; min-height:30px; padding:3px 10px; border-radius:var(--radius); }
.appbar .ui-icon { width:21px; height:21px; }
.appbar input { font-size:14px; max-width:none; text-align:center; }
.appbar .green { border-radius:18px; padding:3px 18px; font-weight:600; background:var(--green); }
.window-title { flex:1; text-align:center; font-size:14px; }
.language { display:flex; align-items:center; gap:7px; white-space:nowrap; font-size:14px; }
#save-status { margin:0; white-space:nowrap; font-size:14px; font-weight:600; opacity:1; color:#163340; background:#e9f2f7; border-radius:999px; padding:4px 12px; min-height:32px; display:inline-flex; align-items:center; }
#account-button { margin-left:0; }
.dashboard-bar { min-height:48px; height:auto; }
.child-switcher { color:#fff; }
.child-switcher label { color:#fff; }
.child-switcher select { min-height:32px; }
#manage-children { min-height:32px; background:#fff; color:#202f39; }
.dashboard-bar .window-title { padding-left:130px; }
.home-layout { grid-template-columns:160px minmax(0,1fr); min-height:calc(100dvh - 60px); }
.home-nav { background:white; padding:0; border-right:1px solid #d9e2e8; }
.nav-tile { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; width:100%; min-height:92px; padding:12px 6px; border:0; border-radius:0; background:white; text-align:center; font-size:14px; font-weight:600; position:relative; }
.nav-tile .ui-icon { width:34px; height:34px; }
.home-nav .nav-tile { display:flex; text-align:center; margin:0; }
.nav-tile.active,.home-nav .active { background:var(--selected); border:0; }
.nav-tile.active::after { content:""; position:absolute; right:-7px; top:calc(50% - 7px); border-left:7px solid var(--chrome); border-top:7px solid transparent; border-bottom:7px solid transparent; }
.home-nav-actions { padding:22px 14px; }
.home-nav-actions button { border:1px solid var(--chrome); border-radius:20px; text-align:center; min-height:32px; padding:6px 8px; margin-bottom:9px; background:white; }
.home-nav-actions .primary { background:var(--green); color:white; border-color:var(--green); font-weight:600; }
.home-nav-actions .primary:hover,.primary:hover,.appbar .green:hover,.appbar .green:active,.primary:active,.home-nav-actions .primary:active {
  background:var(--green-hover); color:white; border-color:var(--green-hover);
}
.home-main { padding:12px 36px 40px; background:var(--blue); min-width:0; }
.dashboard-search { display:flex; align-items:center; gap:8px; width:min(420px,100%); margin:0 auto 32px; padding:0 12px; background:white; border-radius:24px; box-shadow:0 2px 4px #24364020; }
.dashboard-search .ui-icon { width:18px; height:18px; color:var(--muted); }
#activity-search { width:100%; border:0; background:transparent; min-height:38px; }
.collection-label { text-transform:uppercase; color:var(--muted); font-size:14px; font-weight:600; margin:0; }
.folder-grid,#folders { display:flex; flex-wrap:wrap; gap:28px; }
.folder-grid { margin:20px 0 38px; }
.folder-card { padding:0; border:0; background:transparent; width:130px; text-align:left; }
.folder-card > span:last-child { display:block; padding:7px 0; overflow-wrap:anywhere; }
.folder-shape { display:flex; align-items:center; justify-content:center; height:88px; width:130px; background:#748e9f; clip-path:polygon(0 14%,45% 14%,55% 0,100% 0,100% 100%,0 100%); color:white; font-size:36px; }
.new-folder .folder-shape { background:#d4e2eb; color:#486373; }
.folder-card:hover { background:transparent; color:var(--green-text); }
.folder-card:hover .folder-shape { background:#91adbf; }
.folder-card.active .folder-shape { background:#334d5e; }
.section-heading { margin-bottom:22px; }
.sort-control { display:flex; align-items:center; gap:7px; font-size:13px; color:#496170; }
.sort-control select { background:#c9dce8; border:0; padding:8px; }
.activity-grid { grid-template-columns:repeat(auto-fill,220px); gap:28px; align-items:start; }
.activity-card { border:0; border-radius:0; background:transparent; position:relative; overflow:visible; }
.activity-card .preview { width:220px; height:165px; padding:6px; background:white; border:1px solid #c9d5dd; box-shadow:0 2px 4px #273e4525; border-radius:0; }
.activity-card h3 { font-size:14px; margin:10px 0 4px; font-weight:400; }
.activity-card .meta { padding:0; font-size:12px; color:var(--muted); }
.activity-card .card-actions { padding:7px 0 0; gap:5px; }
.activity-card .card-actions button { padding:5px 7px; font-size:13px; min-height:30px; background:#d1e0e9; border:0; }
.activity-card .card-actions button:last-child { flex:0 0 30px; }
.dashboard-fresh .dashboard-search,
.dashboard-fresh #folder-section,
.dashboard-fresh .section-heading { display:none; }
.dashboard-welcome { grid-column:1/-1; max-width:440px; margin:48px auto 0; text-align:center; padding:36px 28px 44px; background:white; border:1px solid #c5d4df; border-radius:16px; box-shadow:0 12px 40px #16324018; color:#163340; }
.dashboard-welcome-logo { display:block; margin:0 auto 8px; border-radius:14px; }
.dashboard-welcome h2 { margin:16px 0 8px; font-size:26px; font-weight:600; color:#163340; }
.dashboard-welcome p { margin:0 0 24px; font-size:16px; line-height:1.4; color:var(--muted); }
.dashboard-welcome .dashboard-start { min-height:52px; min-width:220px; font-size:18px; border-radius:10px; padding:12px 28px; }

#editor:not([hidden]) { display:flex; flex-direction:column; height:100dvh; }
#editor .appbar,#editor .toolbar,#editor .statusbar { flex:none; }
.toolbar { height:48px; min-height:48px; padding:4px 10px; gap:6px; background:white; }
.toolbar button { flex-direction:row; min-width:auto; min-height:40px; font-size:13px; gap:6px; border-radius:6px; padding:4px 8px; }
.toolbar .ui-icon { width:20px; height:20px; }
.toolbar button.active { background:var(--selected); }
.editor-layout { flex:1; min-height:0; height:auto; grid-template-columns:19% minmax(0,1fr) 26%; }
.editor-layout.pages-hidden { grid-template-columns:0 minmax(0,1fr) 26%; }
.pages-panel { background:white; position:relative; }
.panel-heading { height:34px; padding:4px 10px; background:var(--slate); font-size:14px; }
.panel-heading .ui-icon { width:19px; height:19px; }
.page-thumb { border:0; border-radius:0; background:transparent; padding:10px; width:calc(100% - 30px); margin:16px 15px; }
.page-thumb.active { border:0; padding:10px; background:#e8f1f6; }
.page-thumb .mini-board { border:2px solid #253640; box-shadow:none; }
.page-thumb.active .mini-board { outline:2px solid var(--green); outline-offset:2px; }
.page-thumb span { font-size:13px; margin-top:6px; }
#add-page { display:block; width:calc(100% - 48px); margin:14px 24px; background:#c9dbe7; border:0; border-radius:0; }
.page-actions { justify-content:center; }
.page-actions button { border:0; background:transparent; color:#496170; }
.workspace { background:#c6d8e4; padding:28px; }
.inspector { background:white; }
.inspector-tabs { height:34px; }
.inspector-tabs button { background:#e8f0f6; padding:6px; font-size:14px; min-height:34px; }
.inspector-tabs [aria-selected="true"] { background:white; border:0; color:var(--green-text); }
.property-group { padding:16px; }
.property-group h3 { font-size:12px; color:#5d7889; }
.property-group label { font-size:14px; }
.property-group input,.property-group select { padding:5px; }
.property-actions button,.alignment button { font-size:13px; border:0; background:#c9dce8; }
.statusbar { height:32px; background:var(--slate); gap:10px; }
#zoom { accent-color:#e4edf3; }
#undo,#redo { padding:0 5px; }
dialog { border-radius:var(--radius-lg); padding:22px; background:var(--paper); }
dialog h2 { font-weight:400; }
.template-picker { width:min(950px,85vw); }
.template-browser { display:grid; grid-template-columns:190px minmax(0,1fr); min-height:320px; max-height:57dvh; border:1px solid var(--line); background:var(--blue); }
.template-categories { background:white; overflow:auto; }
.template-categories button { display:block; text-align:left; width:100%; border:0; border-radius:0; min-height:42px; background:white; }
.template-categories button.active { background:var(--selected); }
.template-grid { padding:18px; overflow:auto; align-content:start; grid-template-columns:repeat(2,minmax(160px,1fr)); gap:20px; }
.template-card { background:transparent; border:2px solid transparent; border-radius:0; padding:10px; }
.template-card.active { border-color:#688b9f; background:#d7e6ef; }
.template-card strong { display:block; font-weight:400; margin-top:8px; }
.template-card .meta { font-size:12px; margin-top:5px; color:var(--muted); }
.template-footer { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:18px; }
.template-footer button { min-width:120px; border-radius:20px; }
.file-actions { display:flex; flex-direction:column; min-width:260px; gap:4px; }
.file-actions button { text-align:left; background:white; border:0; min-height:42px; }
.play-layout { display:grid; grid-template-columns:112px minmax(0,1fr); height:calc(100dvh - 40px); }
.player-nav { background:#e9f2f7; }
.menu-tile { background:var(--slate); color:white; }
.stop-tile { background:#304c5e; color:white; border-top:2px solid white; }
.player-nav .nav-tile { min-height:90px; font-size:13px; }
.player-navigation { display:flex; flex-direction:column; gap:8px; padding:20px 8px; }
.player-navigation button { background:transparent; border:1px solid #8398a6; border-radius:18px; font-size:13px; padding:6px; }
.player-content { min-width:0; min-height:0; display:flex; flex-direction:column; background:var(--stage); }
#player { background:var(--blue); }
#play-area { height:auto; flex:1; min-height:0; padding:20px; }
#play-board,#child-board { box-shadow:0 8px 28px #16324026, 0 0 0 1px #16324018; }
#play-message { height:auto; min-height:0; background:#e9f2f7; }
#play-message:empty { display:none; }
.auth-card,.pair-card { border-radius:16px; box-shadow:0 12px 40px #16324018; }
.auth-card { width:min(100%, 420px); padding:40px 36px; }
.auth-card h1 { margin-bottom:24px; font-size:26px; font-weight:600; color:#163340; }
.auth-card label { font-size:16px; gap:8px; margin:16px 0; }
.auth-card input { min-height:48px; font-size:17px; border-radius:8px; padding:10px 12px; }
.auth-card button { min-height:48px; font-size:16px; border-radius:8px; }
@media(min-width:1100px) { dialog:has(.template-picker) { max-width:1000px; } }
@media(max-width:1000px) {
 .home-layout { grid-template-columns:140px minmax(0,1fr); }
 .home-main { padding:12px 24px 30px; }
 .toolbar { gap:3px; }
 .toolbar button { min-width:62px; padding:4px 7px; font-size:13px; }
 .editor-layout { grid-template-columns:17% minmax(0,1fr) 27%; }
 .editor-layout.pages-hidden { grid-template-columns:0 minmax(0,1fr) 27%; }
 .appbar .language { display:none; }
 #dashboard-button { font-size:12px; }
 .page-thumb { width:calc(100% - 12px); margin:12px 6px; padding:6px; }
 .page-thumb.active { padding:6px; }
 .property-group { padding:12px; }
}
@media(max-width:650px) {
 .dashboard-bar .window-title { padding:0; }
 .home-layout { grid-template-columns:100px minmax(0,1fr); }
 .home-nav { display:block; padding:0; }
 .home-nav button { width:100%; margin:0; }
 .home-nav-actions { padding:16px 7px; }
 .home-nav-actions button { margin-bottom:8px; font-size:12px; }
 .nav-tile { min-height:80px; font-size:12px; }
 .nav-tile .ui-icon { width:30px; height:30px; }
 .home-main { padding:12px; }
 .dashboard-search { margin-bottom:24px; padding:0 7px; }
 #activity-search { font-size:14px; }
 .folder-grid,#folders { gap:16px; }
 .folder-card,.folder-shape { width:96px; }
 .folder-shape { height:66px; }
 .section-heading { gap:10px; }
 .sort-control { flex-wrap:wrap; font-size:12px; }
 .activity-grid { grid-template-columns:minmax(0,1fr); gap:24px; }
 .activity-card .preview { width:100%; height:145px; }
 .activity-card .preview .mini-board { zoom:.85; }
 .activity-card .card-actions button { font-size:12px; padding:5px; }
 .editor-layout,.editor-layout.pages-hidden { grid-template-columns:minmax(0,1fr); }
 .inspector { top:122px; bottom:32px; }
 .toolbar { overflow-x:auto; }
 #dashboard-button { max-width:115px; padding:3px 7px; }
 .appbar input { width:80px; }
 .appbar { gap:4px; padding:3px 6px; }
 #player .appbar { height:40px; min-height:40px; flex-wrap:nowrap; }
 .appbar #play-title { width:auto; order:0; }
 .play-layout { grid-template-columns:82px minmax(0,1fr); }
 .player-nav .nav-tile { min-height:80px; font-size:12px; }
 .player-navigation { padding:14px 5px; }
 .player-navigation button { font-size:12px; }
 .template-picker { width:80vw; }
 .template-browser { grid-template-columns:115px minmax(0,1fr); }
 .template-categories button { font-size:12px; padding:8px; }
 .template-grid { grid-template-columns:minmax(0,1fr); padding:8px; gap:10px; }
 .template-card { padding:5px; overflow:hidden; }
 .template-card .mini-board { zoom:.65; }
 .template-footer { flex-wrap:wrap; }
 #play-area { padding:10px; }
}

/* Boardmaker 7 reference layout: editor pp. 7–13; Student Center pp. 5, 9. */
.ui-icon { display:inline-block; width:24px; height:24px; flex:none; background:currentColor; mask:var(--icon) center / contain no-repeat; -webkit-mask:var(--icon) center / contain no-repeat; vertical-align:middle; }
.icon-menu { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M5%209h2v2H5zM11%209h2v2h-2zM17%209h2v2h-2z%22%20fill%3D%22black%22/%3E%3C/svg%3E"); }
.icon-monitor { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M3%203h18v13H3zM12%2016v5M8%2021h8%22/%3E%3C/svg%3E"); }
.icon-rocket { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M8%2016%205%2013c2-5%207-9%2015-10%200%208-4%2013-9%2015l-3-2ZM6%2011H3l-2%205%205-1M13%2018v3l-5%202%201-5M4%2019l-2%203M14%207l3%203%22/%3E%3C/svg%3E"); }
.icon-search { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%226%22/%3E%3Cpath%20d%3D%22m15%2015%206%206%22/%3E%3C/svg%3E"); }
.icon-globe { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%229%22/%3E%3Cellipse%20cx%3D%2212%22%20cy%3D%2212%22%20rx%3D%224%22%20ry%3D%229%22/%3E%3Cpath%20d%3D%22M3%2012h18M5%207h14M5%2017h14%22/%3E%3C/svg%3E"); }
.icon-select { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22m5%202%2015%2012-7%201%203%206-4%202-3-7-4%204Z%22/%3E%3C/svg%3E"); }
.icon-button { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%226%22%20width%3D%2218%22%20height%3D%2212%22%20rx%3D%221%22/%3E%3C/svg%3E"); }
.icon-shapes { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Ccircle%20cx%3D%2215%22%20cy%3D%228%22%20r%3D%226%22%20stroke-dasharray%3D%222%202%22/%3E%3Ccircle%20cx%3D%228%22%20cy%3D%2215%22%20r%3D%226%22%20fill%3D%22white%22/%3E%3C/svg%3E"); }
.icon-grid { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M2%202h8v8H2zM14%202h8v8h-8zM2%2014h8v8H2zM14%2014h8v8h-8z%22/%3E%3C/svg%3E"); }
.icon-line { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M3%2021%2021%203%22/%3E%3C/svg%3E"); }
.icon-label { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M3%2022%2010%202h4l7%2020h-5l-1-5H9l-2%205ZM10%2013h4l-2-7Z%22%20fill%3D%22black%22%20stroke%3D%22none%22/%3E%3C/svg%3E"); }
.icon-advanced { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M10%202h11v9H10zM2%207h12v10H2zM11%2014h8v8h-8zM19%2016l4-2v8l-4-2M3%2015l4-4%205%205%22/%3E%3C/svg%3E"); }
.icon-text-input { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%226%22%20width%3D%2218%22%20height%3D%2212%22%20rx%3D%221%22/%3E%3Cpath%20d%3D%22M7%2012h7M16%209v6%22/%3E%3C/svg%3E"); }
.icon-message-window { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M4%205h16v10H8l-4%204z%22/%3E%3C/svg%3E"); }
.icon-group-box { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%224%22%20width%3D%2218%22%20height%3D%2216%22%20rx%3D%221%22/%3E%3Crect%20x%3D%226%22%20y%3D%227%22%20width%3D%225%22%20height%3D%224%22/%3E%3Crect%20x%3D%2213%22%20y%3D%227%22%20width%3D%225%22%20height%3D%224%22/%3E%3Crect%20x%3D%226%22%20y%3D%2213%22%20width%3D%2212%22%20height%3D%224%22/%3E%3C/svg%3E"); }
.icon-video-clip { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%226%22%20width%3D%2218%22%20height%3D%2212%22%20rx%3D%221%22/%3E%3Cpath%20d%3D%22M10%209.5%2016%2012l-6%202.5z%22/%3E%3C/svg%3E"); }
.icon-picture { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%225%22%20width%3D%2218%22%20height%3D%2214%22%20rx%3D%221%22/%3E%3Ccircle%20cx%3D%228.5%22%20cy%3D%229.5%22%20r%3D%221.5%22/%3E%3Cpath%20d%3D%22M4%2017l5-6%203%203%202-2%206%205%22/%3E%3C/svg%3E"); }
.icon-tabs { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M4%207h6v3H4zM11%207h6v3h-6zM4%2010h16v10H4z%22/%3E%3C/svg%3E"); }
.icon-checkbox { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Crect%20x%3D%224%22%20y%3D%224%22%20width%3D%2216%22%20height%3D%2216%22%20rx%3D%221%22/%3E%3Cpath%20d%3D%22M7%2012l3.5%203.5L17%209%22/%3E%3C/svg%3E"); }
.icon-radio { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%228%22/%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%223.5%22%20fill%3D%22black%22/%3E%3C/svg%3E"); }
.icon-scan-order { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M4%208V4h4M16%204h4v4M20%2016v4h-4M8%2020H4v-4M5%2012h14%22/%3E%3C/svg%3E"); }
dialog:has(.advanced-tools-dialog) { width:min(540px, calc(100vw - 26px)); }
.advanced-tools { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:8px; }
.advanced-tool-card { display:flex; flex-direction:column; align-items:flex-start; gap:6px; text-align:left; padding:14px; min-height:108px; border:1px solid #c5d4df; border-radius:12px; background:white; font-weight:400; white-space:normal; }
.advanced-tool-card:hover,.advanced-tool-card:focus-visible { background:#e9f2f7; border-color:#91adbf; }
.advanced-tool-card .ui-icon { width:22px; height:22px; flex:none; }
.advanced-tool-card strong { font-size:15px; font-weight:600; color:#163340; }
.advanced-tool-card .advanced-tool-desc { font-size:13px; line-height:1.35; color:var(--muted); }
@media(max-width:520px) { .advanced-tools { grid-template-columns:1fr; } }

.icon-pdf { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M5%202h9l5%205v15H5zM14%202v6h5M8%2017l3-8c0%207%203%206%205%208-4-2-6-2-8%200Z%22/%3E%3C/svg%3E"); }
.icon-play { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22m6%203%2015%209-15%209Z%22/%3E%3C/svg%3E"); }
.icon-preview { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M2%2012s4-7%2010-7%2010%207%2010%207-4%207-10%207S2%2012%202%2012z%22/%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%223%22/%3E%3C/svg%3E"); }
.icon-ruler { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M3%2016%2016%203l5%205-13%2013-5-5zM7%2012l2%202M10%209l2%202M13%206l2%202%22/%3E%3C/svg%3E"); }
.icon-pages { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M8%202h13v16H8zM5%205H3v17h13v-2M11%206h7M11%2010h7M11%2014h5%22/%3E%3C/svg%3E"); }
.icon-clipboard { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M8%205H4v17h16V5h-4M9%202h6v5H9zM7%2011l1%201%202-2M12%2011h5M7%2016l1%201%202-2M12%2016h5%22/%3E%3C/svg%3E"); }
.icon-stop { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22m8%202-6%206v8l6%206h8l6-6V8l-6-6ZM8%2013V9c0-2%202-2%202%200V6c0-2%202-2%202%200v3-4c0-2%202-2%202%200v4-2c0-2%202-2%202%200v7c0%206-8%206-9%201l-2-3c-1-2%201-3%203%201Z%22/%3E%3C/svg%3E"); }
.icon-undo { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22m8%204-5%205%205%205M3%209h10a7%207%200%201%201%200%2014%22/%3E%3C/svg%3E"); }
.icon-redo { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22m16%204%205%205-5%205M21%209h-10a7%207%200%201%200%200%2014%22/%3E%3C/svg%3E"); }

.alignment { grid-template-columns:repeat(6,minmax(0,1fr)); gap:4px; }
.alignment button { min-width:0; min-height:36px; padding:5px 2px; border-radius:0; }
.alignment .ui-icon { width:22px; height:22px; }
.tool-dialog { position:fixed; inset:auto; left:max(6px,var(--menu-x)); top:var(--menu-y); margin:0; padding:12px; max-width:calc(100vw - 12px); box-shadow:0 5px 20px #20344040; }
.tool-dialog::backdrop { background:transparent; }
.tool-dialog h2 { font-size:16px; margin-bottom:10px; }
.template-results { min-height:0; min-width:0; display:flex; flex-direction:column; }
.template-search { display:block; width:calc(100% - 36px); margin:14px 18px 0; border-radius:20px; padding:8px 12px; border:0; box-shadow:0 1px 4px #20344020; }
#child-dialog { position:fixed; margin:0; left:112px; top:40px; }
#child-dialog::backdrop { background:#20344020; }
@media(max-width:650px) { #child-dialog { left:86px; max-width:calc(100vw - 92px); padding:14px; } .child-menu-actions { min-width:0; } .template-search { width:calc(100% - 16px); margin:8px; } }
.icon-align-left { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.4%22%3E%3Cpath%20d%3D%22M3%202v20M7%205h14v5H7zM7%2014h9v5H7z%22/%3E%3C/svg%3E"); }
.icon-align-right { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.4%22%3E%3Cpath%20d%3D%22M21%202v20M3%205h14v5H3zM8%2014h9v5H8z%22/%3E%3C/svg%3E"); }
.icon-align-center { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.4%22%3E%3Cpath%20d%3D%22M12%202v20M3%205h18v5H3zM7%2014h10v5H7z%22/%3E%3C/svg%3E"); }
.icon-align-top { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.4%22%3E%3Cpath%20d%3D%22M2%203h20M5%207h5v14H5zM14%207h5v9h-5z%22/%3E%3C/svg%3E"); }
.icon-align-bottom { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.4%22%3E%3Cpath%20d%3D%22M2%2021h20M5%203h5v14H5zM14%208h5v9h-5z%22/%3E%3C/svg%3E"); }
.icon-align-middle { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.4%22%3E%3Cpath%20d%3D%22M2%2012h20M5%203h5v18H5zM14%207h5v10h-5z%22/%3E%3C/svg%3E"); }
.icon-hamburger { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.4%22%3E%3Cpath%20d%3D%22M4%207h16M4%2012h16M4%2017h16%22/%3E%3C/svg%3E"); }
.icon-shapes { --icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.4%22%3E%3Ccircle%20cx%3D%2215%22%20cy%3D%228%22%20r%3D%226%22%20stroke-dasharray%3D%222%202%22/%3E%3Ccircle%20cx%3D%228%22%20cy%3D%2215%22%20r%3D%226%22/%3E%3C/svg%3E"); }
dialog input.template-search { width:calc(100% - 36px); margin:14px 18px 0; }
@media(max-width:650px) { dialog input.template-search { width:calc(100% - 16px); margin:8px; } }
/* Image placement and alignment feedback. */
#symbol-results button { cursor:grab; }
#symbol-results img { -webkit-user-drag:none; user-select:none; touch-action:none; }
.dragging-symbol,.dragging-symbol * { cursor:grabbing !important; user-select:none !important; }
.symbol-drag-ghost { position:fixed; z-index:2000; pointer-events:none; width:100px; padding:8px; border:2px solid #008eab; border-radius:3px; background:#fff; box-shadow:0 4px 18px #20344040; text-align:center; font-size:13px; }
.symbol-drag-ghost img { display:block; width:80px; height:70px; object-fit:contain; }
#canvas .drop-target { outline:4px solid #008eab; outline-offset:-4px; box-shadow:inset 0 0 0 8px #b9e7ef; }
#canvas.drop-canvas { outline:3px solid #008eab; }
.snap-guide { position:absolute; z-index:100; pointer-events:none; background:#d42d90; }
.snap-guide.x { top:0; bottom:0; width:1px; }
.snap-guide.y { left:0; right:0; height:1px; }
.symbol-help { margin:0 14px 12px; font-size:13px; line-height:1.4; color:#496170; }
#symbol-results button:focus-visible { outline-offset:1px; }
/* Keep the saved page visible when opening properties on a narrow screen. */
@media(max-width:650px) { .symbol-drag-ghost { width:78px; } .symbol-drag-ghost img { width:58px; height:54px; } }
#symbol-results img { -webkit-touch-callout:none; }
@media(max-width:650px) { .dragging-symbol .inspector { visibility:hidden; } }

.completion-check .object-label { color:#568925; font-size:44px; line-height:1; }
.template-footer { flex-wrap:wrap; gap:8px; }
.template-footer button { min-width:90px; }
.template-card { position:relative; }
.template-card.active::after { content:""; position:absolute; left:6px; bottom:6px; border-right:14px solid transparent; border-bottom:14px solid var(--green); }
.template-browser { height:57dvh; min-height:260px; overflow:hidden; grid-template-rows:minmax(0,1fr); }
.template-grid { flex:1; min-height:0; overflow:auto; }
.template-categories { min-height:0; }
.template-grid { grid-auto-rows:minmax(190px,max-content); }
.template-card { display:block; min-height:190px; }
.object.compact-symbol { padding:3px; }
.object.compact-symbol .object-label { padding:0; font-size:16px; }
.object.compact-schedule-text { container-type:inline-size; }
.object.compact-schedule-text > .object-label { padding:0; font-size:clamp(12px,16cqw,18px); overflow-wrap:break-word; word-break:normal; }

@media print {
 @page portrait { size:A4 portrait; margin:10mm; }
 @page landscape { size:A4 landscape; margin:10mm; }
 .print-sheet.portrait { page:portrait; width:190mm; height:277mm; }
 .print-sheet.landscape { page:landscape; }
}
.exercise-selected { outline:5px solid #008752; }
.exercise-placed { border-color:#008752!important; }
.exercise-status { position:absolute; left:25%; bottom:8px; width:50%; text-align:center; font:22px Arial; pointer-events:none; }
.object.calendar-day,.object.calendar-day .object-label { padding:0; white-space:nowrap; }
.exercise-target>.object-label { position:absolute; top:0; left:0; width:100%; padding:2px; }
.exercise-placed>.object-label { font-size:16px; padding:0; }

.image-bank { position:relative; padding:4px 12px; }
.image-bank>button { min-height:44px; }
.bank-images { position:absolute; z-index:200; left:12px; top:52px; background:#e9f2f7; border:1px solid #91acbd; padding:8px; width:min(320px,80vw); max-height:40vh; overflow:auto; box-shadow:0 3px 12px #0003; }
.bank-images input { width:100%; min-height:44px; }
.bank-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; }
.bank-image { min-height:82px; padding:4px; font-size:13px; display:flex; flex-direction:column; align-items:center; }
.bank-image img { width:54px; height:54px; object-fit:contain; }
.bank-image[aria-pressed=true] { outline:3px solid #008752; }
.bank-images { max-width:calc(100vw - 130px); }
.answer-glyph { font:bold 120px Arial; line-height:1; flex:1; display:flex; align-items:center; justify-content:center; }
.exercise-lines { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; z-index:5; }
.word-target img { max-height:calc(100% - 48px); align-self:center; margin-bottom:48px; }
.object.scene-background { padding:0; }
.object.scene-background img { width:100%; height:100%; max-height:none; object-fit:fill; }
.object.scene-hotspot { background:#c7e9f833!important; border:2px dashed #477d9b!important; }
.object.playing-hotspot { background:transparent!important; border-color:transparent!important; }
.object.playing-hotspot .object-label { opacity:0; }
.object.playing-hotspot:focus-visible,.object.playing-hotspot.scanning { outline:4px solid #008752; }
.object.playing-hotspot img { visibility:hidden; }
.count-number { position:absolute; top:3px; right:3px; border-radius:50%; background:white; color:#087ca2; border:2px solid #087ca2; min-width:35px; height:35px; font:26px Arial; text-align:center; }
.number-circled .object-label { border:2px solid #c52e33; border-radius:50%; min-width:34px; }
.bin-total { position:absolute; bottom:0; left:0; width:100%; background:#4d9477; color:white; font:26px Arial; text-align:center; padding:3px; }
.object.attendance-bin { display:block; padding:0; overflow:hidden; }
.attendance-bin .object-label { display:none; }
.attendance-bin-header { position:absolute;z-index:1;left:0;right:0;top:0;height:50px;display:flex;align-items:center;gap:12px;padding:0 76px 0 14px;box-sizing:border-box;color:#fff;font-size:22px;font-weight:600; }
.attendance-bin-present .attendance-bin-header { background:#347c63; }
.attendance-bin-absent .attendance-bin-header { background:#28758e; }
.attendance-bin-header svg { width:32px;height:32px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round; }
.object.attendance-bin .bin-total { z-index:3; top:10px;right:12px;bottom:auto;left:auto;width:auto;padding:2px 9px;border:1px solid #ffffff75;border-radius:999px;background:#ffffff20;color:#fff;font:16px/1.3 Arial;text-align:center; }
.one-target img { max-width:45%; align-self:flex-start; }
.object.hundred-cell { padding:3px; }
.object.hundred-cell .object-label { white-space:nowrap; padding:2px; }

.math-output .object-label { width:100%;height:100%;display:flex;align-items:center;justify-content:center;white-space:pre-wrap; }
.math-output svg { width:90%;height:90%; }
.math-output .color-die { width:85%;height:85%;border-radius:24px;border:3px solid #344453;box-shadow:inset -14px -14px 0 #0002; }
.math-output .coin-face { box-sizing:border-box;width:85%;height:85%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;border-radius:50%;border:2px solid #53636a;background:radial-gradient(circle at 34% 22%,#f7f6ef 0,#e0dfd2 34%,#b9bbb2 72%,#858d88 100%);color:#33434a;box-shadow:inset 0 0 0 4px #eeecdf,inset 0 0 0 6px #747f7d,inset 0 0 0 8px #d4d2c5,inset 0 7px 12px #fff9,inset 0 -9px 12px #1c303a30,0 3px 6px #152a362e; }
.math-output .coin-face .coin-engraving { width:70%;height:66%;flex:none;overflow:visible;filter:drop-shadow(1px 1px 0 #fff8) drop-shadow(-1px -1px 0 #34434a44); }
.math-output .coin-face .coin-title { padding:0;max-width:90%;font-size:36px;font-weight:700;line-height:1.05;letter-spacing:.045em;color:#33434a;text-shadow:0 1px #fff8; }
.math-output .spinner-face { position:relative;border-radius:50%;border:5px solid #4c6273;overflow:hidden; }
.spinner-option { position:absolute;transform:translate(-50%,-50%);font-size:23px;background:#ffffffe6;border-radius:4px;padding:2px 5px;max-width:35%;overflow-wrap:anywhere; }
.spinner-arrow {position:absolute;left:50%;top:50%;height:46%;font-size:90px;line-height:1;color:#172a39;text-shadow:1px 1px white;transform-origin:center center;}

.object.calculator-display {background:#fff!important;border-radius:6px;}
.calculator-display .object-label {justify-content:flex-end;padding:8px 20px;font-size:clamp(22px,4vw,48px);}
.object.graph-output {overflow:visible;background:transparent!important;padding:0;}
.graph-label {position:absolute;display:flex;align-items:center;justify-content:center;gap:3px;flex-direction:column;color:#172a39;text-align:center;font-size:18px;}
.graph-label img {position:static!important;width:auto!important;height:38px!important;max-width:90%;object-fit:contain;}
.graph-plot {position:absolute;display:flex;}
.graph-cell {border:1px solid #647581;display:flex;align-items:center;justify-content:center;box-sizing:border-box;min-height:0;min-width:0;overflow:hidden;font-size:14px;}
.graph-cell img {position:static!important;width:100%!important;height:100%!important;object-fit:contain;}
.graph-vertical .graph-label {bottom:0;height:65px;width:100%;}
.graph-vertical .graph-plot {top:0;bottom:70px;width:100%;flex-direction:column-reverse;}
.graph-vertical .graph-cell {height:10%;width:100%;}
.graph-horizontal .graph-label {left:0;width:160px;height:100%;}
.graph-horizontal .graph-plot {left:160px;right:0;top:0;bottom:0;}
.graph-horizontal .graph-cell {width:10%;height:100%;}
.graph-value {position:absolute;background:#fff;color:#172a39;font-size:18px;padding:0 3px;z-index:2;}
.graph-vertical .graph-value {top:-25px;left:50%;transform:translateX(-50%);}
.graph-horizontal .graph-value {left:130px;top:2px;}
.object.money-piece {padding:0;background:transparent!important;touch-action:none;}
.money-piece img {position:absolute!important;inset:0;width:100%!important;height:100%!important;object-fit:contain;}
.money-piece .object-label {position:absolute;inset:0;display:flex;align-items:center;justify-content:center;margin:0;padding:0;font-weight:700;color:#243139;font-size:23px;text-shadow:0 1px #fff;}
.money-piece.money-note .object-label {font-size:18px;}
.money-piece:disabled {opacity:.25;}
.object.money-bin {padding:0;display:flex;flex-direction:column;background:#f8fcfa!important;overflow:hidden;}
.money-drop {height:58px;min-height:58px;width:100%;border:0;border-bottom:1px solid #559a87;border-radius:0;background:#e5f2ed;font-size:24px;}
.money-tray {width:100%;flex:1;overflow:auto;display:grid;grid-template-columns:repeat(4,1fr);grid-auto-rows:90px;align-content:start;padding:10px;gap:8px;}
.object.money-placed {position:relative!important;left:auto!important;top:auto!important;width:100%!important;height:85px!important;transform:none!important;}
.money-feedback {min-height:36px;text-align:center;font-size:23px;color:#246943;}
.money-ready {outline:5px solid #297c62;}
.object[data-attendance-id].exercise-placed {padding:2px;}
.object[data-attendance-id].exercise-placed .object-label {padding:0;}
.object.tic-cell {color:#147cb4;padding:8px;}
.object.tic-cell:disabled {opacity:1;}
.object.tic-o {color:#c94c64;}
.object.tic-win {background:#e2f1d9!important;}
.object.tic-player {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;padding:3px;background:#fff!important;border:2px solid #bbc4c9!important;}
.object.tic-player .object-label {font-size:18px!important;line-height:1.1;white-space:nowrap;}
.object.tic-player.current-player {outline:3px solid #287c9b;outline-offset:1px;}
.tic-mark {font-size:60px;font-weight:700;line-height:1;color:#147cb4;}
.tic-player:nth-last-child(2) .tic-mark {color:#c94c64;}
.object.word-grid {display:grid;padding:0;gap:0;background:white!important;border:1px solid #9aa8b2!important;}
.object.word-grid > .word-letter {align-self:stretch;}
.word-letter {display:flex;align-items:center;justify-content:center;border:0;background:white;color:#202c35;border-radius:0;padding:0;font:24px Arial;min-width:0;min-height:0;text-transform:lowercase;}
.word-letter:hover,.word-letter:focus-visible {outline:3px solid #248eab;outline-offset:-3px;z-index:1;}
.word-letter-found {background:white;box-shadow:none;}
.word-search-outlines {position:absolute;inset:0;width:100%;height:100%;z-index:2;overflow:visible;pointer-events:none;}
.word-search-outline {fill:transparent;stroke:#d4564e;stroke-width:3.5;vector-effect:non-scaling-stroke;}
.word-check {position:absolute;right:4px;top:2px;color:#248b4b;font-size:30px;background:#fff;border-radius:50%;line-height:1;}
.word-found {border-color:#248b4b!important;}
.object.record-selected {outline:3px dashed #16819b;outline-offset:-3px;}
.object.record-control {padding:4px;gap:2px;}
.record-control .object-label {padding:0;line-height:1.1;}
.record-icon {display:block;width:22px;height:22px;flex-shrink:0;line-height:0;}
.record-icon svg {width:100%;height:100%;}
.record-control .object-label {order:0;}
.record-control.record-large .record-icon {width:52px;height:52px;}
.object.record-control .object-label {order:1;}

.object[data-bank-source][aria-pressed="true"] { outline: 5px solid #176a9b; outline-offset: 2px; }
.word-workspace { display:flex;flex-direction:row;align-items:center;justify-content:center;gap:6px;padding:8px; }
.word-token { flex:1;min-width:0;max-width:100px;height:90%;border:2px dashed #69878a;background:#f4f8f5;color:#202020;font:inherit;font-size:40px;display:flex;align-items:center;justify-content:center; }
.word-token.word-cursor { border-left:5px solid #176a9b; }
.word-vowel {background:#bddfce;}.word-consonant {background:#c6dce1;}
.word-rime {font-size:50px;}.word-swap-selected {outline:4px solid #176a9b;}
.word-history {display:flex;flex-direction:column;justify-content:flex-start;overflow:auto;padding:8px;gap:5px;}
.word-history img.word-history-symbol,.word-print-sheet img.word-history-symbol {width:1.35em;height:1.35em;object-fit:contain;vertical-align:middle;margin-right:.35em;}
.word-history button {border:0;background:transparent;color:#15599c;font:inherit;padding:4px;text-align:left;}
.word-drag {position:fixed;z-index:2000;pointer-events:none;width:60px;height:60px;background:#c6dce1;border:2px solid #69878a;font:40px Arial;text-align:center;}
.object.word-workspace {flex-direction:row;justify-content:center;align-items:center;}
.object.word-history {flex-direction:column;justify-content:flex-start;align-items:stretch;}
.object.writing-document {padding:0;display:block;}
.writing-reading {width:100%;height:100%;min-width:0;min-height:0;text-align:left;}
@media print {
  .writing-print-sheet .symbolized-text {height:auto;overflow:visible;padding:0!important;}
  .writing-print-sheet .symbolized-word {break-inside:avoid;}
}
.writing-text {width:100%;height:100%;box-sizing:border-box;border:0;background:white;color:#202020;padding:12px;font:inherit;resize:none;white-space:pre-wrap;text-align:left;}
.object.writing-choices {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:minmax(45px,1fr);gap:10px;align-items:stretch;padding:0;overflow:auto;}
.writing-choice {display:flex;align-items:center;justify-content:center;text-align:center;white-space:pre-wrap;background:#fff;border:1px solid #5c696f;border-radius:0;padding:8px;font:inherit;font-size:23px;color:#202020;min-width:0;}
.writing-choice-title {grid-column:1/-1;font-size:24px;}
.object.writing-keyboard {grid-template-columns:repeat(10,minmax(0,1fr));gap:4px;}
.writing-key {padding:2px;font-size:25px;}.writing-space {grid-column:span 3;font-size:19px;}
.object.writing-columns {grid-template-columns:repeat(var(--writing-columns),minmax(0,1fr));overflow:auto;}
.writing-column {display:flex;flex-direction:column;gap:10px;}.writing-column .writing-choice {min-height:60px;}
.writing-choice[aria-pressed=true] {background:#fff8c7;outline:2px solid #356e91;}
.writing-print-sheet {display:none;}
@media print {body.writing-print >*:not(.writing-print-sheet),body.writing-print > #print-pages{display:none!important;}body.writing-print .writing-print-sheet{display:block!important;color:#000;background:#fff;padding:20mm;font:14pt Arial;white-space:pre-wrap;}body.writing-print .writing-print-sheet h1{font-size:20pt;}}
.object.writing-core {grid-template-columns:repeat(6,minmax(0,1fr));gap:6px;}
.object.writing-core .writing-choice {padding:3px;font-size:22px;}
@media print {.writing-print-sheet {page:portrait;}}
.writing-choice.writing-symbol {flex-direction:column;gap:4px;}
.writing-choice.writing-symbol img {max-width:100%;max-height:60%;object-fit:contain;min-height:0;}

/* Free-writing word frames, matching the category scheme in the template guide. */
.writing-choice[data-writing-word-class] {border-width:2px;}
.writing-choice[data-writing-word-class=question] {border-color:#00a9d4;}
.writing-choice[data-writing-word-class=pronoun] {border-color:#efc42c;}
.writing-choice[data-writing-word-class=verb] {border-color:#00ba59;}
.writing-choice[data-writing-word-class=other] {border-color:#ef9345;}

.object.writing-control {padding:3px;gap:1px;}
.writing-control-icon {display:flex;justify-content:center;align-items:center;width:100%;height:30px;min-height:0;flex:0 1 30px;pointer-events:none;}
.writing-control-icon svg {height:100%;width:32px;max-width:100%;}
.object.writing-control>.object-label {font-size:.8em;padding:0;line-height:1.1;}

.object.symbolized-object {display:block;padding:0;}
.object.symbolized-object[data-keep-object-image]:not(.layout-text) { display:flex;gap:4px;padding:4px; }
.object.symbolized-object[data-keep-object-image]:not(.layout-text) > img { flex:0 1 34%;max-height:36%; }
.object.symbolized-object[data-keep-object-image]:is(.layout-left,.layout-right) > img { width:34%;max-height:100%; }
.object.symbolized-object[data-keep-object-image]:not(.layout-text) > .symbolized-text,
.object.choice-control[data-force-text-symbols] > .symbolized-text { flex:1 1 0;min-width:0;min-height:0;width:auto;height:auto;max-width:100%; }
.object.layout-text[data-force-text-symbols] .symbolized-word > img { display:block; }
.symbolized-text {display:block;width:100%;height:100%;box-sizing:border-box;white-space:pre-wrap;overflow:auto;}
.symbolized-word {display:inline-flex;flex-direction:column;vertical-align:bottom;align-items:center;justify-content:center;max-width:100%;gap:3px;}
.symbolized-word>span {max-width:100%;overflow-wrap:anywhere;}
.object .symbolized-word>img {flex:none;max-width:none;max-height:none;object-fit:contain;}
.symbolized-word[data-position=below] {flex-direction:column-reverse;}
.symbolized-word[data-position=left] {flex-direction:row;}
.symbolized-word[data-position=right] {flex-direction:row-reverse;}

.toolbar #button-type {min-width:28px;width:28px;padding:4px;}

.object.message-window {display:block;padding:0;}
.message-content {width:100%;height:100%;padding:8px;box-sizing:border-box;overflow:auto;white-space:pre-wrap;user-select:text;touch-action:auto;outline-offset:-3px;}
.message-content .symbolized-text {height:auto;min-height:100%;overflow:visible;}
.message-content .symbolized-word {user-select:text;}
[data-action-speech-highlight][data-speech-mark-style="background"] {
  box-shadow:none;
  background-color:color-mix(in srgb,var(--speech-marker-color) 42%,transparent);
}
[data-action-speech-highlight][data-speech-mark-style="underline"] {
  box-shadow:inset 0 -3px var(--speech-marker-color);
  text-decoration:underline 3px var(--speech-marker-color);
}
[data-player-hover] {
  position:fixed; z-index:40; border:3px solid #16778d; border-radius:5px;
  box-sizing:border-box; pointer-events:none;
}
@media print { [data-player-hover] { display:none !important; } }
[data-speech-range-layer] { position:fixed; inset:0; z-index:80; pointer-events:none; }
[data-speech-range-layer] > span { position:absolute; background-color:var(--speech-marker-color); }
[data-speech-range-layer="background"] > span { opacity:.38; }
@media print { [data-speech-range-layer], [data-speech-field-measure] { display:none !important; } }
[data-action-speech-highlight] { box-shadow:inset 0 0 0 3px #936000; }
.message-symbol-popup {position:absolute;inset:4px;z-index:3;background:#fff;border:2px solid #323232;display:flex;align-items:center;justify-content:center;}
.message-symbol-popup img {max-width:100%;max-height:100%;}
.message-symbol-popup.message-symbol-board { inset:auto;z-index:24;transform:translate(-50%,-50%);padding:8px; }
.message-symbol-popup:focus-visible { outline:3px solid #008752;outline-offset:2px; }
.message-symbol-popup::after { content:'×';position:absolute;top:3px;right:7px;font-size:1.25rem;line-height:1;background:white;color:#253640;padding:2px; }

.object:has(> .clock-face),.object:has(> .clock-range-display) { padding:2px; flex-direction:column; }
.object:has(> .clock-range-display) > .object-label { display:none; }
.clock-range-display { width:100%;min-height:0;flex:1;display:flex;flex-direction:column;align-items:center; }
.clock-range-faces { position:relative;width:min(100%,140px);min-height:0;flex:1;display:grid;grid-template-columns:1fr 1fr; }
.clock-range-faces::after { content:'–';position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);line-height:1; }
.clock-range-face { width:100%;height:100%;min-height:0; }
.clock-range-labels { width:min(100%,140px);height:20.4px;min-height:20.4px;flex:none;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;justify-items:center;font-size:16px;line-height:normal; }
.clock-range-labels>span:not(.clock-range-separator) { white-space:nowrap; }

.group-object { overflow:visible; }
.group-object > .object-label { display:none; }
.group-drop-active { outline:4px dashed #e09819; outline-offset:3px; }

.group-grid-lines { position:absolute;inset:0;pointer-events:none; }
.group-grid-lines > span { position:absolute;border:1px dashed #79909a;box-sizing:border-box; }
.group-insertion-preview { position:absolute;pointer-events:none;border:3px dashed #e09819;background:#e0981920;box-sizing:border-box;z-index:100; }
.spray-preview{position:absolute;inset:0;pointer-events:none;z-index:50}.spray-cell{position:absolute;box-sizing:border-box;border:3px dashed #1f7a3a;background:rgba(46,160,67,.12);border-radius:8px}dialog:has(.help-dialog)[open]{width:min(880px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:18px 18px 12px;overflow:hidden;display:flex;flex-direction:column}
dialog:has(.help-dialog)[open] #dialog-body{flex:1;min-height:0;overflow:hidden;display:flex;flex-direction:column}
dialog:has(.help-dialog)[open] #close-dialog{float:none;margin-top:12px;align-self:flex-end;flex:none}
.help-dialog{display:flex;flex-direction:column;min-height:0;flex:1;height:100%}
.help-dialog h2{margin:0 0 12px}
.help-search{width:100%;min-height:44px;margin:0 0 8px;padding:10px 12px;border:1px solid #c5d4d8;border-radius:10px;font-size:16px}
.help-status{min-height:1.3em;margin:0 0 10px;color:#506772;font-size:14px}
.help-toc{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px}
.help-toc-link{display:inline-flex;align-items:center;min-height:44px;padding:8px 12px;border:1px solid #c5d4d8;border-radius:10px;background:#fff;text-decoration:none;font-weight:600;font-size:14px;color:#163340}
.help-toc-link:hover,.help-toc-link:focus-visible{background:#e3efed}
.help-article{overflow:auto;-webkit-overflow-scrolling:touch;flex:1;min-height:0;padding-right:6px}
.help-section{margin:0 0 28px}
.help-section h3{margin:0 0 10px;font-size:22px;scroll-margin-top:8px}
.help-section p,.help-section li{font-size:16px;line-height:1.55;color:#163340}
.help-section p{margin:0 0 10px}
.help-section ul{margin:0 0 12px;padding-left:1.2em}
.help-section li{margin:0 0 6px}
.help-figure{margin:12px 0 16px}
.help-figure img{display:block;width:100%;max-width:640px;height:auto;border-radius:12px;border:1px solid #dce6e7;background:#fff}
.help-figure figcaption{margin:8px 0 0;font-size:13px;color:#506772}
@media(max-width:650px){
  dialog:has(.help-dialog)[open]{width:calc(100vw - 12px);max-height:calc(100dvh - 12px);padding:14px 12px 8px}
  .help-section h3{font-size:20px}
}
.object:has(> .video-content){padding:0;overflow:hidden}.video-content{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#111;color:white}.video-content video{width:100%;height:100%;object-fit:contain}.video-content.has-controls{flex-direction:column}.video-content.has-controls video{flex:1 1 auto;min-height:0;height:auto}.video-controls{flex:0 0 44px;width:100%;display:flex;align-items:center;gap:8px;padding:0 8px;box-sizing:border-box;background:#222}.video-controls button{min-width:44px;height:40px;border:0;border-radius:6px;background:#444;color:white;font:18px Arial;cursor:pointer}.video-controls .video-seek{flex:1;min-width:40px;accent-color:#2ea043}.mini-board .video-controls{display:none}.video-status{position:absolute;left:8px;right:8px;top:8px;font:16px Arial;pointer-events:none}.video-status:empty{display:none}.video-content + .object-label{display:none}.video-content[role=button]{cursor:pointer}.video-content.scanning{outline:5px solid #ff9900;outline-offset:-5px}.mini-board .video-content{pointer-events:none}
.object:has(> .image-content){padding:0}.image-content{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#fff;overflow:hidden;border-radius:inherit}.image-content img{width:100%;height:100%;object-fit:contain}.image-content + .object-label:empty{display:none}.image-status{position:absolute;left:8px;right:8px;top:8px;font:16px Arial;color:#444;pointer-events:none;text-align:center}.mini-board .image-content{pointer-events:none}

.object.graph-print-control{flex-direction:column;padding:2px;gap:0;}
.graph-print-control>span[aria-hidden]{height:24px;flex:none;}
.graph-horizontal.graph-controls-left .graph-label{width:120px;}
.graph-print-sheet{display:none;}
@media print{
 @page graph{size:A4 landscape;margin:10mm;}
 body.graph-print>#print-pages{display:none!important;}
 body.graph-print>.graph-print-sheet{display:block!important;page:graph;position:relative;width:277mm;height:190mm;overflow:hidden;}
 .graph-print-sheet .board{-webkit-print-color-adjust:exact;print-color-adjust:exact;}
}


.media-library{min-width:min(600px,75vw)}.media-storage{font-weight:600}.media-toolbar{display:flex;gap:8px}.media-file-list{max-height:55vh;overflow:auto}.media-file{padding:10px 0;border-bottom:1px solid #d4d8da;display:grid;gap:5px}.media-file label{display:flex;align-items:center;gap:8px}.media-file-state{font-size:13px;color:#4b565e}.media-file details>summary{cursor:pointer}.media-file video{display:block;max-width:100%;max-height:240px}.media-file audio{display:block;width:100%}.media-confirm{padding-top:12px}.media-confirm button{margin-right:8px}


/* Player viewport: authored board geometry remains unchanged. */
#play-area.player-viewport,#child-stage.player-viewport {display:block;overflow:auto;padding:0;overscroll-behavior:contain;scroll-behavior:auto;}
.viewport-space {display:flex;align-items:center;justify-content:center;flex:none;}
.viewport-paper {position:relative;flex:none;}
.viewport-paper > .board {position:absolute;left:0;top:0;transform-origin:0 0;}
.viewport-controls {display:flex;align-items:center;gap:4px;flex-wrap:wrap;padding:4px 8px;background:#e9f2f7;flex:none;}
.viewport-controls button {min-height:44px;min-width:44px;padding:6px 10px;border:1px solid #8398a6;border-radius:6px;background:white;color:#173345;}
.viewport-controls output {min-width:48px;text-align:center;font-size:14px;}
.viewport-controls button[aria-pressed=true] {background:#254c63;color:white;}
.player-viewport.viewport-panning {touch-action:none;cursor:grab;user-select:none;}
.player-viewport.viewport-panning * {cursor:grab!important;}
@media(max-width:650px){
  #player .play-layout,#child-player .play-layout {grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);}
  #player .player-nav,#child-player .player-nav {display:flex;align-items:stretch;flex-wrap:wrap;}
  #player.viewport-menu-collapsed .player-nav,#child-player.viewport-menu-collapsed .player-nav {display:none;}
  #player.viewport-menu-collapsed .play-layout,#child-player.viewport-menu-collapsed .play-layout {grid-template-rows:minmax(0,1fr);}
  #player .player-nav .nav-tile,#child-player .player-nav .nav-tile {min-height:52px;flex:1;display:flex;align-items:center;justify-content:center;gap:8px;}
  #player .player-navigation,#child-player .player-navigation {flex:1;flex-direction:row;align-items:center;padding:4px;}
  #player .player-navigation button,#child-player .player-navigation button {min-height:44px;}
  .viewport-controls {gap:3px;padding:4px;}
  .viewport-controls button {padding:5px 7px;font-size:13px;}
}

.text-input-object { padding:4px; }
.single-line-input { width:100%;height:100%;min-width:0;box-sizing:border-box;border:0;background:transparent;color:inherit;font:inherit;text-align:inherit;padding:4px; }
.single-line-input:focus { outline:2px solid #168a70;outline-offset:-2px; }
.single-line-input[type=datetime-local]:has(+ .date-time-value:not([hidden])):not(:focus) { color:transparent; }
.date-time-value {
  position:absolute; inset:4px 34px 4px 8px; display:flex; align-items:center;
  pointer-events:none; white-space:nowrap; overflow:hidden;
}
.date-time-value[hidden], .single-line-input:focus + .date-time-value { display:none; }
.object.choice-control { display:flex;flex-direction:row;gap:6px;align-items:center;padding:2px; }
.choice-control > .choice-mark { flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:min(30%,48px);height:auto;aspect-ratio:1;min-width:24px;min-height:24px;font-size:1.4em;line-height:1;box-sizing:border-box; }
.choice-control > .choice-mark > img { width:100%;height:100%;max-width:100%;max-height:100%; }
.choice-control > .object-label { flex:1;min-width:0;overflow-wrap:break-word;word-break:normal; }

.exercise-target.layout-bottom>.object-label { top:auto; bottom:0; }
.exercise-bottom-card { padding-inline:3px; }
.object.sequence-h, .object.sequence-v { overflow:visible; }
.object.sequence-h > .object-label,
.object.sequence-v > .object-label {
  position:absolute;
  display:grid;
  place-items:center;
  padding:0;
  pointer-events:none;
}
.object.sequence-h > .object-label {
  inset:calc(100% + 8px) 0 auto;
  width:auto;
  min-height:28px;
}
.object.sequence-v > .object-label {
  inset:50% auto auto -64px;
  width:52px;
  transform:translateY(-50%);
}

.organizer-save-status {
  position:absolute;
  inset:8px auto auto 430px;
  width:208px;
  height:60px;
  display:grid;
  place-items:center;
  font-size:18px;
  pointer-events:none;
}
.exercise-match-mark {
  position:absolute;
  inset:4px 5px auto auto;
  display:grid;
  place-items:center;
  width:25px;
  height:25px;
  border:1px solid #126a51;
  border-radius:50%;
  background:#eef8f3;
  color:#125e49;
  font:bold 16px Arial,sans-serif;
}
.pattern-print-sheet,.matching-print-sheet { display:none; }
@media print {
  body.pattern-print>#print-pages,body.matching-print>#print-pages { display:none!important; }
  body.pattern-print>.pattern-print-sheet,body.matching-print>.matching-print-sheet {
    display:block!important;
    position:relative;
    width:277mm;
    height:190mm;
    overflow:hidden;
  }
  .pattern-print-sheet .board,.matching-print-sheet .board { print-color-adjust:exact; -webkit-print-color-adjust:exact; }
}

.word-search-print-sheet { display:none; }
@media print {
  body.word-search-print>#print-pages { display:none!important; }
  body.word-search-print>.word-search-print-sheet {
    display:block!important;
    background:#fff;
    color:#111;
    padding:4mm;
    font:12pt Arial;
    break-inside:avoid;
  }
  .word-search-print-sheet h1 { font-size:22pt;margin:0 0 10mm; }
  .word-search-print-content { display:flex;align-items:flex-start;gap:12mm; }
  .word-search-print-grid { position:relative;overflow:hidden;display:grid;width:140mm;height:140mm;border:1px solid #444;flex:none; }
  .word-search-print-grid .word-letter { font:16pt Arial;border:1px solid #bbb;color:#111;background:#fff!important; }
  .word-search-print-grid .word-letter-found { background:#fff!important;box-shadow:none; }
  .word-search-print-grid .word-search-outline { stroke:#bd4842;stroke-width:4; }
  .word-search-print-list { list-style:none;padding:0;margin:0;width:65mm;display:grid;align-content:start;gap:4mm; }
  .word-search-print-list li { display:flex;align-items:center;gap:3mm;font-size:15pt;min-height:14mm;overflow-wrap:anywhere; }
  .word-search-print-list img { width:14mm;height:14mm;object-fit:contain; }
  .word-search-found-word span:first-of-type { text-decoration:underline;text-decoration-color:#bd3131;text-decoration-thickness:2px; }
  .word-search-found-word small { margin-left:auto;color:#9b2020; }
}

.placed-stamp[aria-pressed="true"],
.object[data-stamp-id][aria-pressed="true"]:not(.exercise-selected) {
  outline:3px solid #008752;
  outline-offset:-3px;
}
.stamp-print-sheet { display:none; }
@media print {
  body.stamp-print>#print-pages { display:none!important; }
  body.stamp-print>.stamp-print-sheet {
    display:block!important;
    position:relative;
    width:277mm;
    height:190mm;
    overflow:hidden;
  }
  .stamp-print-sheet .board { print-color-adjust:exact; -webkit-print-color-adjust:exact; }
}

.object.book-page { box-shadow:0 4px 0 #e9e4d9; }

.tab-list {
  position:absolute;
  display:flex;
  overflow:auto hidden;
  scrollbar-width:thin;
  z-index:7;
  overscroll-behavior:contain;
}
.tab-list>.tab-selector {
  position:relative;
  flex:none;
  padding:3px 7px;
}
.tab-list>.tab-selector[aria-selected=true] { box-shadow:inset 0 -4px 0 #008d76; }
.object.tab-pane-anchor { opacity:0;pointer-events:none; }
.tab-control-frame>.object-label,.tab-pane-anchor .resize-handle { visibility:hidden; }

dialog:has(.action-library, .action-editor) { width: min(720px, calc(100vw - 26px)); }
.action-search, .action-assignment-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.action-search { margin: 12px 0; }
dialog .action-search input[type="search"] { flex: 1; width: auto; min-width: 10rem; margin: 0; }
.action-library-main { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 12px; }
.action-filters { display: flex; flex-direction: column; gap: 5px; }
.action-filters button { text-align: left; }
.action-filters button[aria-pressed="true"] { background: #dceee7; border-color: #4b7e68; }
.action-result-count { margin: 0 0 6px; }
.action-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.action-result { display: flex; align-items: stretch; gap: 6px; }
.action-result-select { flex: 1; display: grid; gap: 3px; text-align: left; }
.action-result-select span { font-weight: normal; }
.action-favorite { min-width: 42px; color: #755100; font-size: 1.2rem; }
.action-assignment h3 { font-size: 1rem; margin-bottom: 6px; }
.action-drag-handle { display: inline-flex; margin-bottom: 6px; color: #39596c; cursor: grab; }
@media (max-width: 520px) {
  .action-library-main { grid-template-columns: 1fr; }
  .action-filters { flex-direction: row; flex-wrap: wrap; }
}

.message-print-sheet { display:none; }
@media print {
  body.message-print > :not(.message-print-sheet),
  body.message-print > #print-pages { display:none!important; }
  body.message-print > .message-print-sheet {
    display:block!important;
    page:message-sheet;
    color:#000;
    font:20px/1.45 Arial,sans-serif;
    white-space:pre-wrap;
    overflow-wrap:anywhere;
  }
  .message-print-sheet .symbolized-text { height:auto;min-height:0;overflow:visible;padding:0!important; }
  .message-print-sheet .symbolized-word { break-inside:avoid; }
}

.named-recording-dialog { width:min(26rem,calc(100% - 2rem)); max-height:calc(100% - 2rem); padding:1.2rem; border:1px solid #67818d; border-radius:.8rem; color:#192e36; background:#fff; }
.named-recording-dialog::backdrop { background:#102e3c70; }
.named-recording-dialog h2 { margin:0 0 .5rem; }
.named-recording-dialog p { overflow-wrap:anywhere; }
.named-recording-dialog [role="status"] { min-height:1.5em; }
.named-recording-dialog > div { display:flex; flex-wrap:wrap; gap:.5rem; }
.named-recording-dialog button { min-height:44px; padding:.5rem .85rem; }
.named-recording-dialog button:first-child { min-width:9rem; }

.activity-print-pages { display:none; }
@media print {
  body.activity-print > :not(.activity-print-pages),
  body.activity-print > #print-pages { display:none!important; }
  body.activity-print > .activity-print-pages { display:block!important; }
  .activity-print-sheet { position:relative; break-after:page; overflow:hidden; print-color-adjust:exact; -webkit-print-color-adjust:exact; }
  .activity-print-sheet:last-child { break-after:auto; }
  .activity-print-sheet.landscape { page:landscape; width:277mm; height:189.8mm; }
  .activity-print-sheet.portrait { page:portrait; width:190mm; height:276.8mm; }
  /* Keep the scaled board in the sheet's flow for Chromium print fragmentation. */
  .activity-print-sheet > .board { position:relative; transform-origin:top left; margin:0; }
  .activity-print-field { display:block; white-space:pre-wrap; }
  .activity-print-sheet .record-control[aria-disabled="true"] { opacity:.4; }
}

.activity-thumbnail { display:block; width:100%; height:100%; max-width:100%; max-height:100%; object-fit:contain; }
.activity-properties { width:min(33rem,100%); }
.activity-properties textarea { width:100%; resize:vertical; }
.activity-properties-hint { font-size:.875em; margin:.25rem 0 .75rem; }
.activity-properties-preview { display:grid; place-items:center; min-height:164px; border:1px solid var(--line); background:#f4f8fb; }
.activity-properties-preview .activity-thumbnail { height:152px; }
.activity-properties .dialog-actions { flex-wrap:wrap; margin-top:.65rem; gap:.65rem; }
dialog:has(.activity-properties) #close-dialog { display:none; }
.activity-field-error { color:#a72828; }
.activity-field-error:empty,.activity-thumbnail-status:empty { display:none; }

.editor-preferences { width:min(26rem,100%); }
.editor-preferences .editor-preference-checkbox { display:flex; align-items:center; gap:.55rem; }
.editor-preferences .editor-preference-checkbox input { margin:0; }
.editor-preferences .dialog-actions { margin-top:1rem; }
dialog:has(.editor-preferences) #close-dialog { display:none; }
.message-preferences, .speech-preferences, .symbol-search-preferences { margin-top:.85rem; border:1px solid var(--line); padding:.65rem; }
.message-preferences summary, .speech-preferences summary, .symbol-search-preferences summary { cursor:pointer; font-weight:600; }
.message-preferences[open] summary, .speech-preferences[open] summary, .symbol-search-preferences[open] summary { margin-bottom:.6rem; }
.message-margin-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 .55rem; }
.message-margin-fields input { min-width:0; }
.message-wide-caret { position:fixed; pointer-events:none; z-index:1200; background:currentColor; }
.message-content.message-wide-caret-active { caret-color:transparent; }
@media print { .message-wide-caret { display:none!important; } }

.symbol-source-order { padding-inline-start:1.6rem; }
.symbol-source-order li { margin-block:.4rem; }
.symbol-source-order label { display:block; }
.symbol-source-order button + button { margin-inline-start:.35rem; }

.symbol-editor { width:min(38rem,100%); }
.symbol-editor-tools { display:flex; flex-wrap:wrap; gap:.4rem; }
.symbol-editor-viewport {
  margin-top:.75rem; height:min(37dvh,300px); overflow:auto; border:1px solid var(--line);
  background:repeating-conic-gradient(#fff 0 25%,#dce6ed 0 50%) 0 0 / 20px 20px;
}
.symbol-editor-viewport canvas { display:block; margin-inline:auto; }
.symbol-editor-status { margin-block:.45rem; }
dialog:has(.symbol-editor) #close-dialog { display:none; }

.symbol-editor canvas[data-pixel-tool] { touch-action:none; cursor:crosshair; }
.symbol-editor-tools button[aria-pressed="true"] { border-color:var(--green); background:#dff4e8; }
.symbol-brush-options:not([hidden]) { display:flex; flex-wrap:wrap; gap:.65rem; }
.symbol-brush-options label { flex:1 1 6rem; min-width:0; margin:.5rem 0 0; }
.symbol-brush-options input[type=color] { min-height:32px; }
.symbol-brush-options [hidden] { display:none; }
@media (max-width:650px) {
  .symbol-editor-viewport:has(canvas[data-pixel-tool]) { height:min(32dvh,260px); }
}
.rich-text-editor { width:min(38rem,calc(100vw - 4rem)); }
.rich-text-editor > label { display:grid; gap:4px; }
.rich-text-toolbar { display:flex; flex-wrap:wrap; align-items:end; gap:6px; margin:8px 0; }
.rich-text-toolbar label { margin:0; display:grid; gap:3px; }
.rich-text-toolbar button[aria-pressed=true] { background:#dcebdd; border-color:#337753; }
.rich-text-toolbar input[type=number] { width:6rem; }
.rich-text-toolbar input[type=color] { width:3.5rem; }
.rich-text-editor textarea { width:100%; resize:vertical; }
.rich-text-editor .dialog-actions { margin-top:10px; }
dialog:has(.rich-text-editor) #close-dialog { display:none; }
.rich-text-preview { min-height:3em; padding:10px; border:1px solid var(--line); white-space:pre-wrap; overflow-wrap:anywhere; }

.object[data-label-grow] { box-sizing:border-box; }
.object[data-label-grow="height"] > .symbolized-text,
.object[data-label-grow="both"] > .symbolized-text { height:auto; }
.object[data-label-grow="width"] > .symbolized-text,
.object[data-label-grow="both"] > .symbolized-text { width:max-content; }
.object[data-label-selection="none"],
.object[data-label-selection="none"] *,
.object[data-label-selection="content"],
.object[data-label-selection="content"] > .symbolized-text { pointer-events:none; }
.object[data-label-selection="content"] .label-ink,
.object[data-label-selection="content"] .symbolized-word { pointer-events:auto; }


.editor-pdf-source { position:fixed; left:-10000px; top:0; pointer-events:none; }
.editor-pdf-options fieldset { margin:8px 0; min-width:0; border:1px solid var(--line); }
.editor-pdf-margins { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px 12px; }
.editor-pdf-pages { max-height:180px; overflow:auto; }
.editor-pdf-options input[type=checkbox] { width:auto; }
.editor-pdf-result { display:flex; gap:12px; }

.object[data-hit-area="symbol"] { pointer-events: none; }
.object[data-hit-area="symbol"] > img { pointer-events: auto; cursor: pointer; }

/* Touch targets: at least 44px on iPad and other coarse pointers. */
@media (pointer: coarse), (hover: none) {
  button,
  a.upload,
  label.upload,
  .appbar button,
  .home-nav-actions button,
  .activity-card .card-actions button,
  .inspector-tabs button,
  #manage-children,
  .toolbar button,
  .file-actions button,
  .template-categories button,
  .alignment button,
  dialog #close-dialog,
  .child-switcher select,
  #account-button,
  #activity-search,
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]):not([type="range"]),
  select,
  textarea {
    min-height: 44px;
  }
  .appbar,
  .dashboard-bar,
  #player .appbar,
  #editor .appbar,
  #child-home .appbar {
    min-height: 48px;
    height: auto;
  }
  .activity-card .card-actions button:last-child {
    flex: 0 0 44px;
  }
  .home-nav-actions button {
    padding: 8px 10px;
    font-size: 14px;
  }
  #editor .toolbar {
    height: auto;
    min-height: 52px;
  }
}

.properties-advanced,.symbol-tips { margin:12px 16px 16px; border:1px solid #c5d4df; border-radius:10px; background:#f7fafc; }
.properties-advanced { margin-top:8px; }
.properties-advanced summary,.symbol-tips summary { cursor:pointer; font-weight:600; color:#163340; padding:12px 14px; list-style:none; min-height:44px; display:flex; align-items:center; }
.properties-advanced summary::-webkit-details-marker,.symbol-tips summary::-webkit-details-marker { display:none; }
.properties-advanced summary::before,.symbol-tips summary::before { content:"+"; margin-right:8px; font-weight:700; color:var(--green-text); }
.properties-advanced[open] summary::before,.symbol-tips[open] summary::before { content:"-"; }
.properties-advanced .property-group { padding-left:14px; padding-right:14px; }
.symbol-tips p { margin:0 14px 14px; font-size:13px; line-height:1.4; color:var(--muted); }

dialog:has(.help-dialog)[open] #close-dialog {
  min-height:48px;
  min-width:120px;
  margin-top:16px;
  padding:0 20px;
  font-size:17px;
  font-weight:600;
  border:0;
  border-radius:10px;
  background:#163340;
  color:#fff;
}
@media (max-width:1180px) {
  dialog:has(.help-dialog)[open] {
    width:calc(100vw - 16px);
    height:calc(100dvh - 16px);
    max-height:calc(100dvh - 16px);
    padding:16px 16px 12px;
  }
}

.image-object-hint { margin:0 0 10px; font-size:13px; line-height:1.4; color:var(--muted); }

dialog:has(.editor-pdf-options)[open] { width:min(760px,calc(100vw - 24px)); max-height:calc(100dvh - 24px); overflow:auto; }
.editor-pdf-preview { margin:8px 0 12px; }
.editor-pdf-preview h3 { margin:0 0 8px; font-size:15px; color:#163340; }
.editor-pdf-preview-note { margin:0; font-size:14px; color:var(--muted); }
.editor-pdf-preview-sheets { display:flex; gap:16px; overflow:auto; padding:4px 2px 8px; }
.editor-pdf-sheet-wrap { margin:0; flex:0 0 auto; width:min(220px,46%); }
.editor-pdf-sheet { position:relative; width:100%; background:#d7e4ec; border:1px solid #7e95a3; box-shadow:0 4px 14px #16324022; border-radius:2px; }
.editor-pdf-sheet-board { position:absolute; overflow:hidden; background:#fff; box-shadow:0 0 0 1px #b5c6d1; }
.editor-pdf-sheet-page { transform-origin:0 0; pointer-events:none; }
.editor-pdf-sheet-wrap figcaption { margin:8px 0 0; font-size:13px; text-align:center; color:#163340; }

#save-status.save-status-pending { font-weight:600; }
#save-status.save-status-flash { animation:save-flash 1.6s ease; }
#toast { border-radius:10px; }
@keyframes save-flash {
  0% { background:#c8ead7; color:#005c34; }
  100% { background:#e9f2f7; color:#163340; }
}
@keyframes fade-in { from { opacity:0; } to { opacity:1; } }
@keyframes toast-in {
  from { opacity:0; transform:translateX(-50%) translateY(8px); }
  to { opacity:1; transform:translateX(-50%) translateY(0); }
}
@media (prefers-reduced-motion: no-preference) {
  dialog[open] { animation:fade-in .22s ease; }
  #toast:not([hidden]) { animation:toast-in .28s ease; }
  .activity-card, .child-card { transition: background-color .15s ease, box-shadow .15s ease, transform .12s ease; }
}
@media (prefers-reduced-motion: reduce) {
  #save-status.save-status-flash { animation:none; background:#c8ead7; color:#005c34; }
}
