/* KrupīC kopīgais noformējums. Ekrāna vadīklas un @media print ir atsevišķi; fizisko ģeometriju mēra mm. Logo/attēlu oriģinālās krāsas saglabā. CSS ielādes secība: style → catalog → phonetics. */
:root {
  --blue: #4c6f84;
  --dark: #3d5e73;
  --pale: #d5e4ec;
  --wash: #e3edf3;
  --ink: #263c48;
  --muted: #657782;
  --line: #d5dfe5;
  --paper: #fff;
  --bg: #f2f5f7;
  font-family: Arial, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--dark);
  border-radius: 9px;
  padding: 10px 16px;
  min-height: 42px;
  font-weight: 600;
}
button:hover {
  background: var(--wash);
  border-color: #9db5c4;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[contenteditable]:focus-visible {
  outline: 3px solid #8cbbd6;
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button[aria-pressed="true"],
.selected {
  background: var(--wash);
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--blue);
}
.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}
.primary:hover {
  background: var(--dark);
  color: white;
}
.light {
  background: var(--wash);
  border-color: var(--pale);
}
.quiet {
  background: transparent;
  border-color: transparent;
}
.icon {
  width: 40px;
  min-height: 40px;
  padding: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 20px;
}
.icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.close {
  font-size: 27px;
  flex: none;
}
.topbar {
  height: 80px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(22px, calc((100vw - 1180px) / 2));
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.brand > img:first-child {
  height: 45px;
  width: 45px;
  object-fit: contain;
}
.brand .wordmark {
  width: 122px;
  height: 46px;
  object-fit: contain;
}
.topbar nav {
  display: flex;
  gap: 8px;
  align-items: center;
}
.actionbar {
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 5;
}
.actionbar[hidden] {
  display: none;
}
.action-inner {
  max-width: 1180px;
  margin: auto;
  padding: 12px 0;
  display: flex;
  gap: 10px;
}
.action-inner button {
  width: 155px;
  white-space: nowrap;
}
.action-inner .idea {
  width: 110px;
  background: transparent;
  border-color: transparent;
  font-weight: 500;
}
.idea-pop {
  position: fixed;
  left: max(16px, calc((100vw - 1180px) / 2));
  top: 146px;
  max-width: 420px;
  padding: 15px 38px 15px 20px;
  background: white;
  box-shadow: 0 8px 35px #243c4c26;
  border: 1px solid var(--line);
  border-radius: 12px;
  z-index: 15;
}
.idea-pop p {
  font-style: italic;
  line-height: 1.55;
  font-size: 14px;
}
.close-small {
  position: absolute;
  right: 6px;
  top: 6px;
  padding: 3px 8px;
  min-height: 29px;
  border: 0;
  font-size: 22px;
}
.wrap {
  max-width: 1180px;
  margin: auto;
  padding: 34px 0 50px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.6px;
  color: var(--blue);
  font-weight: 700;
  margin: 0 0 12px;
}
.hero {
  padding: 26px 0 34px;
  max-width: 740px;
}
h1 {
  font-size: 38px;
  line-height: 1.12;
  letter-spacing: -1px;
  margin: 0 0 15px;
  font-weight: 650;
}
h2 {
  font-size: 23px;
  margin: 0 0 12px;
}
h3 {
  margin: 0;
  font-size: 18px;
}
p {
  line-height: 1.6;
}
.lead {
  font-size: 17px;
  color: var(--muted);
  margin: 0;
}
.hub-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.hub-card {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.hub-card .art {
  width: 100%;
  height: 150px;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.hub-card .atlas {
  width: 150px;
  height: 150px;
  margin: auto;
}
.hub-card .eyebrow {
  font-size: 9px;
  letter-spacing: 0.8px;
  margin-top: 8px;
}
.hub-card p {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 9px;
  flex: 1;
}
.hub-card button {
  width: 100%;
  margin-top: auto;
}
.hub-note {
  margin-top: 24px;
  background: var(--wash);
  border: 1px solid var(--pale);
  padding: 16px 20px;
  border-radius: 12px;
  line-height: 1.6;
  font-size: 14px;
}
.editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 24px;
}
.editor-head h1 {
  font-size: 31px;
  margin-bottom: 9px;
}
.editor-head p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}
.settings-trigger {
  background: var(--wash);
  border-color: #a8becb;
  white-space: nowrap;
}
.tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.segment {
  display: flex;
  gap: 3px;
  padding: 4px;
  background: #e6ecef;
  border-radius: 12px;
}
.segment button {
  min-height: 34px;
  padding: 7px 13px;
  border: 0;
  font-size: 13px;
  background: transparent;
  box-shadow: none;
}
.segment button[aria-pressed="true"] {
  background: #fff;
  box-shadow: 0 1px 5px #1b34481a;
}
.meta {
  font-size: 12px;
  color: var(--muted);
  margin-left: auto;
}
.workspace {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
.paper {
  width: 794px;
  min-height: 1123px;
  background: #fff;
  box-shadow: 0 3px 20px #243c4c12;
  padding: 38px 42px 38px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  --rule: 42px;
}
.paper-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--pale);
  padding-bottom: 13px;
}
.print-brand {
  display: flex;
  align-items: center;
  gap: 3px;
}
.print-brand .frog {
  height: 28px;
  width: 28px;
  object-fit: contain;
}
.print-brand .wordmark {
  width: 87px;
  height: 32px;
  object-fit: contain;
}
.paper small {
  font-size: 10px;
  color: var(--muted);
}
.paper h2 {
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.3px;
  margin: 0;
}
.paper .instruction {
  font-size: 14px;
  margin: 0;
  line-height: 1.45;
  color: var(--ink);
}
.child-row {
  font-size: 13px;
  display: flex;
  gap: 20px;
  align-items: center;
}
.child-row .editable-name {
  border-bottom: 1px solid #8da8b8;
  min-width: 160px;
  display: inline-block;
  min-height: 23px;
  padding: 0 4px;
}
.edit-text {
  cursor: text;
  border-bottom: 1px dotted #b1c1ca;
  min-width: 20px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.edit-text:hover {
  background: #f3f7f9;
}
.paper h2.edit-text {
  max-width: 100%;
  min-height: 30px;
}
.print-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px dashed #8e9ca4;
  border-left: 1px dashed #8e9ca4;
}
.card {
  border-right: 1px dashed #8e9ca4;
  border-bottom: 1px dashed #8e9ca4;
  position: relative;
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 222px;
  break-inside: avoid;
  overflow: hidden;
}
.card .picture {
  width: 100%;
  height: 144px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 0;
  background: none;
  padding: 0;
  min-height: 0;
  border-radius: 0;
  position: relative;
}
.card .picture:hover {
  background: #f5f8fa;
}
.picture img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.card .word {
  font-size: 23px;
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
  text-align: center;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.atlas {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  display: block;
  background: #fff;
  aspect-ratio: 1;
}
.atlas img {
  position: absolute;
  width: 400%;
  height: 500%;
  max-width: none;
  object-fit: fill;
}
.card .atlas {
  width: 144px;
  height: 144px;
  flex: none;
}
.sheets-label {
  align-self: flex-start;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.paper-foot {
  margin-top: auto;
  border-top: 1px solid var(--pale);
  padding-top: 11px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 10px;
  color: var(--muted);
}
.mini-locations {
  display: flex;
  width: 100%;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}
.mini-locations span {
  width: 38px;
  height: 16px;
  border: 1px solid #8b9ea9;
}
.mini-locations span::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
  display: block;
  margin: 4px auto;
}
.mini-locations span:first-child::before {
  margin-left: 4px;
}
.mini-locations span:last-child::before {
  margin-right: 4px;
}
.location-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  flex: 1;
  gap: 0;
  border: 1px solid #8b9ea9;
  min-height: 720px;
}
.location-board.two {
  grid-template-columns: repeat(2, 1fr);
}
.location-zone {
  border-right: 1px solid #8b9ea9;
  position: relative;
  padding: 22px 12px;
  text-align: center;
}
.location-zone:last-child {
  border: 0;
}
.location-zone h3 {
  font-size: 18px;
  margin: 0 0 14px;
}
.position-diagram {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.position-diagram i {
  width: 14px;
  height: 14px;
  border: 1px solid #8b9ea9;
  border-radius: 50%;
}
.position-diagram i.active {
  background: var(--blue);
}
.zone-title {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.page-tip {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}
.pair-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px dashed #8e9ca4;
  margin-top: -1px;
  min-height: 290px;
  break-inside: avoid;
}
.pair-side {
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.pair-side:first-child {
  border-right: 1px dashed #8e9ca4;
}
.pair-side .atlas {
  height: 135px;
  width: 135px;
}
.pair-side .word {
  font-size: 24px;
  font-weight: 600;
}
.pair-side .edit-text {
  font-size: 14px;
  width: 100%;
  line-height: 1.8;
}
.blank {
  display: inline-block;
  min-width: 85px;
  border-bottom: 1px solid #526f80;
  height: 25px;
  vertical-align: bottom;
}
.answer {
  color: var(--dark);
  font-weight: 600;
}
.writing-lines {
  width: 100%;
  display: flex;
  flex-direction: column;
}
.writing-line {
  height: var(--rule);
  position: relative;
  border-bottom: 1px solid #718c9d;
  flex: none;
}
.writing-line::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px dashed #c4d1da;
}
.writing-line[contenteditable] {
  z-index: 0;
  line-height: var(--rule);
  font-size: 22px;
  white-space: nowrap;
  overflow: hidden;
}
.writing-line:empty::after {
  content: attr(data-placeholder);
  color: #b0bec7;
  font-size: 17px;
  pointer-events: none;
}
.writing-block {
  border: 1px solid var(--line);
  padding: 15px;
  margin-top: -1px;
  break-inside: avoid;
}
.word-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  align-items: center;
}
.word-row .picture {
  width: 120px;
  height: 120px;
  display: block;
  padding: 0;
  background: white;
  border: 0;
  border-radius: 0;
}
.word-row .picture img {
  object-fit: contain;
  width: 100%;
  height: 100%;
}
.word-model {
  font-size: 27px;
  font-weight: 600;
  text-align: center;
  overflow-wrap: anywhere;
  margin: 0 0 12px;
  letter-spacing: 2px;
}
.slots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}
.slot {
  height: 37px;
  min-width: 32px;
  flex: 1;
  max-width: 45px;
  border: 1px solid #8c9da7;
  margin-left: -1px;
}
.letter-bank {
  display: flex;
  flex-wrap: wrap;
  margin-top: 15px;
}
.tile {
  height: 39px;
  width: 39px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #8e9ca4;
  font-size: 24px;
  margin-right: -1px;
  margin-bottom: -1px;
}
.word-row .no-photo {
  border: 1px dashed #acbeca;
  color: var(--muted);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-card {
  padding: 15px;
  min-height: 240px;
}
.step-card .picture {
  height: 160px;
}
.step-card .atlas {
  width: 160px;
  height: 160px;
}
.number-box {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 25px;
  height: 25px;
  border: 1px solid #8b9ea9;
  font-size: 14px;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-card .step-caption {
  font-size: 15px;
  text-align: center;
  line-height: 1.3;
}
.step-tools {
  display: flex;
  gap: 5px;
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 1;
}
.step-tools button {
  width: 26px;
  min-height: 26px;
  padding: 2px;
  font-size: 13px;
  border-radius: 4px;
}
.story-writing {
  margin-top: 18px;
}
.question {
  font-size: 14px;
  margin: 15px 0 2px;
  line-height: 1.4;
}
.page-bw .picture,
.page-bw .atlas {
  filter: grayscale(1);
}
.page-bw .print-brand {
  filter: none;
}
.instructions-box {
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--wash);
  line-height: 1.6;
  font-size: 14px;
}
.empty {
  padding: 60px;
  text-align: center;
  line-height: 1.6;
  color: var(--muted);
}
.site-footer {
  font-size: 12px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 0 28px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.save-error {
  color: #8c402c;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0;
  width: min(700px, calc(100vw - 30px));
  max-height: 90vh;
  box-shadow: 0 18px 80px #1d334b40;
  color: var(--ink);
}
dialog::backdrop {
  background: #1d334b66;
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 23px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 3;
}
.dialog-head h2 {
  font-size: 20px;
  margin: 0;
}
.dialog-head .icon {
  background: var(--wash);
}
#modal-body {
  padding: 24px;
  overflow: auto;
}
label.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 20px;
  font-size: 14px;
  font-weight: 600;
}
input[type="text"],
textarea,
select,
input[type="number"] {
  border: 1px solid #b6c7d1;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px;
  width: 100%;
  font-weight: 400;
}
input[type="range"] {
  accent-color: var(--blue);
  width: 100%;
}
textarea {
  min-height: 95px;
  resize: vertical;
}
input[type="checkbox"] {
  accent-color: var(--blue);
  width: 18px;
  height: 18px;
}
.checks {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 20px 0;
}
.checks label {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 14px;
  line-height: 1.4;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}
.help {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.5;
  margin: 6px 0 14px;
}
.selection-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 10px;
  position: relative;
  min-width: 0;
}
.choice img {
  height: 100px;
  width: 100%;
  object-fit: contain;
}
.choice .atlas {
  width: 100px;
  height: 100px;
}
.choice .badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  font-size: 13px;
  line-height: 20px;
}
.choice span {
  font-size: 13px;
  overflow-wrap: anywhere;
  text-align: center;
}
.choice-pair {
  display: flex;
  width: 100%;
  justify-content: center;
}
.choice-pair .atlas {
  width: 70px;
  height: 70px;
}
.choice-pair img {
  height: 500%;
  width: 400%;
}
.add-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.muted {
  color: var(--muted);
}
.source-note {
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 16px;
  line-height: 1.6;
}
.preview-modal {
  width: min(1000px, calc(100vw - 24px));
  background: #e7edf1;
}
.preview-modal #preview-body {
  display: flex;
  flex-direction: column;
  gap: 25px;
  align-items: center;
  padding: 28px;
  overflow: auto;
}
.preview-modal .paper {
  box-shadow: 0 2px 14px #203a4d20;
}
.preview-modal .edit-text {
  border-color: transparent;
  pointer-events: none;
}
.preview-modal .editor-only {
  display: none !important;
}
.preview-modal .picture {
  pointer-events: none;
}
.crop-area {
  width: min(360px, 100%);
  aspect-ratio: 1;
  overflow: hidden;
  margin: 0 auto 18px;
  position: relative;
  border: 2px solid var(--blue);
  touch-action: none;
  background: #e3edf3;
  cursor: grab;
}
.crop-area img {
  position: absolute;
  max-width: none;
  pointer-events: none;
  user-select: none;
  transform-origin: 0 0;
}
.crop-area.contain {
  background: #fff;
}
.crop-area:active {
  cursor: grabbing;
}
.crop-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.crop-controls button {
  font-size: 13px;
}
.crop-controls label {
  grid-column: 1/-1;
}
.crop-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
}
.file-input {
  width: 100%;
  padding: 12px;
  border: 1px dashed #b6c7d1;
  margin: 10px 0 15px;
  font-size: 14px;
}
.image-chooser-steps {
  display: flex;
  gap: 10px;
  margin: 16px 0;
}
.danger-link {
  font-size: 12px;
  border: 0;
  min-height: 30px;
  text-decoration: underline;
}
.noprint-info {
  font-size: 12px;
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 22px;
  background: var(--dark);
  color: white;
  border-radius: 10px;
  z-index: 50;
  max-width: 90vw;
  text-align: center;
  font-size: 14px;
}
#print-root {
  display: none;
}
.mobile-paper {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 10px;
}
.loading {
  padding: 80px;
  text-align: center;
}
.plain-text {
  font-size: 14px;
  line-height: 1.7;
}
.plain-text li {
  margin-bottom: 10px;
}
.subhead {
  font-size: 14px;
  margin: 22px 0 12px;
}
.order-note {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 15px;
}
.arrow-icon {
  font-size: 17px;
}
.selection-footer {
  margin-top: 18px;
  position: sticky;
  bottom: -24px;
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 15px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.selection-footer p {
  font-size: 13px;
  margin: 0;
}
.search-field {
  margin-bottom: 18px;
}
.export-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}
@media screen and (max-width: 1220px) {
  .wrap,
  .site-footer {
    margin-left: 24px;
    margin-right: 24px;
  }
  .action-inner {
    padding-left: 24px;
    padding-right: 24px;
  }
  .hub-grid {
    gap: 13px;
  }
  .hub-card {
    padding: 15px;
  }
}
@media screen and (max-width: 800px) {
  .hub-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero {
    padding-top: 10px;
  }
  .wrap {
    padding-top: 25px;
  }
  .editor-head {
    gap: 12px;
    flex-wrap: wrap;
  }
  .editor-head h1 {
    font-size: 27px;
  }
  .workspace {
    align-items: flex-start;
  }
  .paper {
    width: 710px;
    min-height: 1005px;
    padding: 32px;
  }
  .meta {
    margin-left: 0;
  }
  .action-inner {
    padding-left: 20px;
  }
  .site-footer {
    flex-direction: column;
    gap: 8px;
  }
  .preview-modal #preview-body {
    align-items: flex-start;
    overflow: auto;
  }
  .preview-modal .paper {
    flex: none;
  }
}
@media screen and (max-width: 480px) {
  .topbar {
    height: 68px;
    padding: 0 12px;
  }
  .brand .wordmark {
    width: 91px;
  }
  .brand > img:first-child {
    width: 34px;
    height: 34px;
  }
  .topbar nav {
    gap: 2px;
  }
  .topbar nav .quiet {
    font-size: 11px;
    padding: 7px;
    min-height: 35px;
    max-width: 95px;
  }
  .icon {
    width: 34px;
    min-height: 34px;
    padding: 7px;
  }
  .wrap {
    margin: 0 14px;
    padding-top: 24px;
  }
  .hero h1 {
    font-size: 31px;
  }
  .lead {
    font-size: 15px;
  }
  .hub-grid {
    gap: 10px;
  }
  .hub-card {
    padding: 12px;
    gap: 9px;
  }
  .hub-card .art,
  .hub-card .atlas {
    height: 110px;
    width: 110px;
  }
  .hub-card h3 {
    font-size: 17px;
    line-height: 1.2;
  }
  .hub-card p {
    font-size: 12px;
  }
  .hub-card .eyebrow {
    font-size: 8px;
  }
  .hub-card button {
    font-size: 12px;
    padding: 8px;
  }
  .action-inner {
    gap: 6px;
    padding: 10px 12px;
    justify-content: space-between;
  }
  .action-inner .idea {
    width: 65px;
    padding: 8px 3px;
    font-size: 13px;
  }
  .action-inner button {
    width: calc((100vw - 105px) / 2);
    font-size: 13px;
    padding: 8px 6px;
  }
  .editor-head h1 {
    font-size: 25px;
  }
  .tools {
    gap: 10px;
  }
  .segment {
    max-width: 100%;
    flex-wrap: wrap;
  }
  .segment button {
    font-size: 12px;
    padding: 6px 9px;
  }
  .settings-trigger {
    font-size: 13px;
  }
  .selection-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .dialog-head {
    padding: 14px 16px;
  }
  .dialog-head h2 {
    font-size: 18px;
  }
  #modal-body {
    padding: 18px;
  }
  .paper {
    width: calc(100vw - 28px);
    min-height: 0;
    padding: 19px 15px;
    gap: 12px;
  }
  .paper h2 {
    font-size: 19px;
  }
  .paper .instruction {
    font-size: 12px;
  }
  .paper-head {
    padding-bottom: 9px;
  }
  .paper .print-brand .frog {
    width: 22px;
    height: 22px;
  }
  .paper .print-brand .wordmark {
    width: 67px;
    height: 25px;
  }
  .paper .child-row {
    font-size: 11px;
    gap: 10px;
  }
  .editable-name {
    min-width: 100px !important;
  }
  .card {
    min-height: 160px;
    padding: 9px;
    gap: 6px;
  }
  .card .picture {
    height: 95px;
  }
  .card .atlas {
    width: 95px;
    height: 95px;
  }
  .card .word {
    font-size: 18px;
  }
  .location-board {
    min-height: 400px;
  }
  .location-zone {
    padding: 15px 4px;
  }
  .location-zone h3 {
    font-size: 14px;
  }
  .position-diagram {
    gap: 4px;
  }
  .position-diagram i {
    width: 10px;
    height: 10px;
  }
  .pair-row {
    min-height: 205px;
  }
  .pair-side {
    padding: 10px;
  }
  .pair-side .atlas {
    height: 100px;
    width: 100px;
  }
  .pair-side .word {
    font-size: 20px;
  }
  .pair-side .edit-text {
    font-size: 12px;
  }
  .word-row {
    grid-template-columns: 75px 1fr;
    gap: 10px;
  }
  .word-row .picture {
    height: 80px;
    width: 75px;
  }
  .word-model {
    font-size: 21px;
    letter-spacing: 1px;
  }
  .writing-block {
    padding: 10px;
  }
  .slot {
    height: 28px;
    min-width: 18px;
  }
  .tile {
    width: 29px;
    height: 30px;
    font-size: 19px;
  }
  .step-card .atlas {
    height: 110px;
    width: 110px;
  }
  .step-card .picture {
    height: 110px;
  }
  .step-card {
    min-height: 180px;
  }
  .step-tools {
    top: 4px;
    right: 4px;
    gap: 2px;
  }
  .step-tools button {
    width: 24px;
    min-height: 24px;
  }
  .step-card .step-caption {
    font-size: 12px;
  }
  .number-box {
    left: 6px;
    top: 6px;
    width: 20px;
    height: 20px;
    font-size: 11px;
  }
  .question {
    font-size: 12px;
  }
  .paper-foot {
    font-size: 8px;
    margin-top: 14px;
  }
  .preview-modal #preview-body {
    padding: 12px;
  }
  .preview-modal .paper {
    width: calc(100vw - 50px);
  }
  .crop-controls {
    gap: 7px;
  }
  .crop-controls button {
    font-size: 12px;
    padding: 8px;
  }
  .hub-note {
    font-size: 12px;
  }
  .site-footer {
    margin: 0 14px;
  }
  .idea-pop {
    left: 12px;
    top: 125px;
    width: calc(100vw - 24px);
  }
}
.atlas-clip {
  display: block;
  position: absolute;
  overflow: hidden;
}
.atlas-clip img {
  position: absolute;
  max-width: none;
  object-fit: fill;
}
.compact .card {
  min-height: 160px;
}
.compact .card .picture {
  height: 100px;
}
.compact .card .atlas {
  height: 100px;
  width: 100px;
}
.compact .card .word {
  font-size: 19px;
}
@media print {
  #print-root .compact .card {
    min-height: 39mm;
    padding: 3mm;
    gap: 1mm;
  }
  #print-root .compact .card .picture {
    height: 25mm;
  }
  #print-root .compact .card .atlas {
    height: 25mm;
    width: 25mm;
  }
  #print-root .compact .card .word {
    font-size: 14pt;
  }
}
@page {
  size: A4;
  margin: 0;
}
@media print {
  html,
  body {
    margin: 0 !important;
    background: white !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  body > * {
    display: none !important;
  }
  #print-root {
    display: block !important;
  }
  #print-root .paper {
    display: flex !important;
    width: 210mm;
    height: 297mm;
    min-height: 297mm;
    max-height: 297mm;
    padding: 10mm 11mm;
    gap: 4mm;
    box-shadow: none;
    border: 0;
    border-radius: 0;
    break-after: page;
    break-inside: avoid;
    overflow: hidden;
    font-size: 12pt;
  }
  #print-root .paper:last-child {
    break-after: auto;
  }
  #print-root .paper-head {
    padding-bottom: 3mm;
  }
  #print-root .print-brand .frog {
    height: 8mm;
    width: 8mm;
  }
  #print-root .print-brand .wordmark {
    height: 9mm;
    width: 24mm;
  }
  #print-root h2 {
    font-size: 19pt;
  }
  #print-root .instruction {
    font-size: 10pt;
  }
  #print-root .child-row {
    font-size: 10pt;
  }
  #print-root .card {
    min-height: 55mm;
    padding: 4mm;
    gap: 2mm;
  }
  #print-root .picture {
    height: 36mm;
  }
  #print-root .card .atlas {
    width: 36mm;
    height: 36mm;
  }
  #print-root .card .word {
    font-size: 17pt;
  }
  #print-root .pair-row {
    min-height: 73mm;
  }
  #print-root .pair-side .atlas {
    width: 34mm;
    height: 34mm;
  }
  #print-root .pair-side .word {
    font-size: 18pt;
  }
  #print-root .pair-side .edit-text {
    font-size: 10pt;
  }
  #print-root .paper-foot {
    margin-top: auto;
    font-size: 8pt;
    padding-top: 3mm;
  }
  #print-root .editor-only {
    display: none !important;
  }
  #print-root .edit-text {
    border-bottom-color: transparent;
  }
  #print-root .picture {
    pointer-events: none;
  }
  #print-root button.picture {
    min-height: 0;
    background: transparent;
    border: 0;
  }
  #print-root .location-board {
    min-height: 190mm;
    flex: 1;
  }
  #print-root .location-zone h3 {
    font-size: 14pt;
  }
  #print-root .writing-block {
    padding: 4mm;
  }
  #print-root .word-row {
    grid-template-columns: 30mm 1fr;
    gap: 5mm;
  }
  #print-root .word-row .picture {
    width: 30mm;
    height: 30mm;
  }
  #print-root .word-model {
    font-size: 20pt;
  }
  #print-root .writing-line {
    height: var(--rule);
    line-height: var(--rule);
    font-size: 16pt;
  }
  #print-root .step-card {
    min-height: 57mm;
  }
  #print-root .step-card .picture {
    height: 38mm;
  }
  #print-root .step-card .atlas {
    width: 38mm;
    height: 38mm;
  }
  #print-root .step-card .step-caption {
    font-size: 11pt;
  }
  #print-root .question {
    font-size: 10pt;
  }
  #print-root .number-box {
    font-size: 10pt;
  }
  #print-root .page-tip {
    font-size: 9pt;
  }
}

.letter-blank {
  display: inline-block;
  width: 0.85em;
  height: 1.05em;
  margin: 0 0.08em;
  border-bottom: 1.5px solid currentColor;
  vertical-align: baseline;
}

/* Shared material header, based on the approved writing material. */
:root {
  --bg: #f8f6f0;
  background: var(--bg);
}
.topbar {
  height: 64px;
  max-width: 1040px;
  margin: auto;
  padding: 0 26px;
  background: transparent;
  border: 0;
}
.topbar .back-materials {
  font-size: 14px;
  padding: 8px 0;
  min-height: 40px;
  color: #263c48;
}
.topbar nav {
  gap: 10px;
}
.topbar .icon {
  width: 44px;
  height: 44px;
  background: var(--wash);
  border-color: #9ebace;
  color: var(--dark);
}
.topbar #info {
  font-family: Georgia, serif;
  font-size: 27px;
  font-style: italic;
}
.actionbar {
  position: relative;
  background: transparent;
  border-bottom: 1px solid #cbdce6;
}
.action-inner {
  max-width: none;
  justify-content: flex-end;
  padding: 16px 24px 10px;
  gap: 10px;
}
.action-inner button {
  width: 150px;
  height: 46px;
  border-radius: 12px;
  font-size: 14px;
}
.action-inner #idea {
  width: 84px;
  background: var(--wash);
  border: 1px solid #b7cedd;
  font-weight: 700;
  font-style: italic;
}
.action-inner #preview {
  background: #fff;
  border-color: #b7cedd;
}
.wrap {
  max-width: none;
  margin: 0 36px;
  padding-top: 60px;
}
.editor-head {
  align-items: center;
  margin: 0 0 26px;
  min-height: 80px;
}
.editor-head h1 {
  font-size: 40px;
  color: #263f50;
  margin-bottom: 12px;
  letter-spacing: -1px;
}
.editor-head p {
  color: var(--blue);
  font-size: 14px;
}
.material-symbol {
  width: 110px;
  height: 100px;
  margin-right: 32px;
  flex: none;
}
.material-symbol > img,
.material-symbol .atlas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.settings-row {
  display: flex;
  margin-bottom: 16px;
}
.settings-trigger {
  border-radius: 12px;
  font-size: 14px;
}
.tools {
  border-bottom: 1px solid #cbdce6;
  padding-bottom: 17px;
  margin-bottom: 24px;
}
.idea-pop {
  left: auto;
  right: 24px;
  top: 124px;
}
@media screen and (max-width: 800px) {
  .wrap {
    margin: 0 24px;
    padding-top: 38px;
  }
  .topbar {
    padding: 0 24px;
  }
  .editor-head h1 {
    font-size: 32px;
  }
  .material-symbol {
    width: 85px;
    height: 85px;
    margin-right: 0;
  }
}
@media screen and (max-width: 480px) {
  .topbar {
    height: 64px;
    padding: 0 14px;
  }
  .topbar nav .quiet {
    max-width: none;
  }
  .topbar .icon {
    width: 40px;
    min-height: 40px;
    height: 40px;
  }
  .action-inner {
    padding: 12px 14px 10px;
    gap: 7px;
  }
  .action-inner button {
    width: calc((100vw - 112px) / 2);
    font-size: 12px;
    padding: 8px 4px;
    height: 44px;
  }
  .action-inner #idea {
    width: 70px;
  }
  .wrap {
    margin: 0 14px;
    padding-top: 30px;
  }
  .editor-head {
    gap: 12px;
    flex-wrap: nowrap;
    margin-bottom: 22px;
  }
  .editor-head h1 {
    font-size: 28px;
    line-height: 1.15;
  }
  .editor-head p {
    font-size: 13px;
  }
  .material-symbol {
    width: 65px;
    height: 65px;
  }
  .settings-row {
    margin-bottom: 12px;
  }
  .idea-pop {
    right: 12px;
    top: 122px;
  }
}

/* Physical pages are isolated from mobile editor rules and scaled to fit. */
.preview-modal #preview-body{align-items:center;overflow-x:hidden}.a4-preview-page{position:relative;flex:none;width:min(100%,210mm);aspect-ratio:210/297;background:#fff;box-shadow:0 2px 14px #203a4d20;overflow:hidden}.a4-preview-page iframe{position:absolute;left:0;top:0;width:210mm;height:297mm;border:0;transform-origin:top left;pointer-events:none}
