:root {
  --background: #f4f8fc;
  --foreground: #142a3d;
  --navy: #073f66;
  --navy-light: #0b527e;
  --blue: #0e6795;
  --blue-dark: #084d75;
  --blue-soft: #e7f2f8;
  --border: #cbdbe6;
  --muted: #627789;
  --white: #ffffff;
  --success: #245e41;
  --success-bg: #edf9f2;
  --error: #87404a;
  --error-bg: #fff3f4;
  --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-roman: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--background);
}

button {
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible {
  outline: 3px solid rgb(97 169 207 / 0.48);
  outline-offset: 2px;
}

button:disabled {
  cursor: default;
  opacity: 0.48;
}

p,
h1,
h2 {
  margin: 0;
}

[hidden] {
  display: none !important;
}

.brand-header {
  position: relative;
  overflow: hidden;
  border-bottom: 4px solid #2f91bd;
  background: var(--navy);
}

.brand-header::after {
  position: absolute;
  top: -35px;
  right: 4%;
  color: rgb(255 255 255 / 0.045);
  content: "I  V  X  XV  XX";
  font-family: var(--font-roman);
  font-size: 8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  pointer-events: none;
  white-space: nowrap;
}

.header-container {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(100% - 32px, 896px);
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  padding: 20px 0;
}

.brand {
  display: flex;
  align-items: center;
}

.brand-title {
  color: var(--white);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(1.7rem, 4vw, 2.15rem);
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
}

.brand-message {
  display: flex;
  align-items: center;
  color: #d8eef8;
  font-size: 0.86rem;
  font-style: italic;
  font-weight: 600;
  transform: translateY(7px);
}

.page-container {
  width: min(100% - 32px, 1152px);
  margin: 0 auto;
  padding: 28px 0 56px;
}

.ad-slot {
  display: flex;
  width: min(100%, 896px);
  min-height: 78px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 auto 28px;
  border: 1px dashed #a9c5d6;
  border-radius: 10px;
  background: rgb(255 255 255 / 0.48);
  color: #7e95a5;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ad-size::before {
  margin-right: 12px;
  content: "•";
}

.game-section {
  width: min(100%, 896px);
  margin: 0 auto;
}

.workspace-layout {
  position: relative;
  display: grid;
  width: min(100%, 896px);
  margin: 0 auto;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  justify-content: center;
  gap: 24px;
}

.side-menu {
  position: absolute;
  top: 0;
  right: calc(100% + 24px);
  width: 180px;
  display: grid;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--white);
  padding: 6px;
}

.side-menu button {
  min-height: 46px;
  border-radius: 9px;
  padding: 12px;
  color: var(--navy);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 650;
  line-height: 1.4;
  text-align: left;
}

.side-menu button:hover { background: var(--blue-soft); }
.side-menu .menu-title { grid-column: 1 / -1; margin: 0; padding: 10px 12px 6px; }
.side-menu button.active { background: var(--navy); color: var(--white); }
.workspace-layout > section { min-width: 0; }
.guide-section { font-family: var(--font-sans); }
.guide-intro { margin-top: 10px; color: var(--muted); font-size: 0.875rem; line-height: 1.5; }
.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 22px; }
.video-card { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: var(--white); }
.video-card h3 { margin: 0; padding: 14px 16px; color: #104f77; font-size: 0.82rem; font-weight: 750; }
.video-frame { position: relative; aspect-ratio: 16 / 9; min-height: 200px; background: #102a3e; }
.video-frame iframe { position: absolute; width: 100%; height: 100%; inset: 0; border: 0; }
.video-poster { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; cursor: pointer; overflow: hidden; background: #102a3e; }
.video-poster img { display: block; width: 100%; height: 100%; object-fit: cover; }
.video-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 68px; height: 48px; border-radius: 12px; background: #e60023; color: white; font-size: 1.4rem; box-shadow: 0 3px 15px rgb(0 0 0 / 0.3); }
.video-poster:hover .video-play { background: #bf001d; }
.video-poster:focus-visible { outline-offset: -4px; outline: 3px solid white; }
.video-card > a { display: inline-block; margin: 14px 16px; font-size: 0.875rem; }
.guide-section a { color: var(--blue-dark); text-underline-offset: 3px; }

@media (max-width: 1335px) {
  .workspace-layout { grid-template-columns: minmax(0, 896px); gap: 20px; }
  .side-menu { position: static; width: auto; grid-template-columns: 1fr 1fr; }
  .side-menu button { text-align: center; }
}

@media (max-width: 600px) {
  .video-grid { grid-template-columns: 1fr; }
}

.section-heading {
  margin-bottom: 10px;
}

.eyebrow {
  margin-bottom: 5px;
  color: #267ca6;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.game-heading-line {
  margin: 0;
  white-space: nowrap;
}

.level-switch {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  border: 1px solid #c9dce8;
  border-radius: 14px;
  background: #e8f1f6;
  padding: 5px;
}

.level-switch button {
  display: flex;
  min-height: 62px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 7px 6px;
  color: #5e7484;
  cursor: pointer;
  transition: 160ms ease;
}

.level-switch button:hover {
  color: #164d70;
}

.level-switch button.active {
  border-color: #b9d2e1;
  background: var(--white);
  box-shadow: 0 4px 12px rgb(34 77 102 / 0.08);
  color: #104f77;
}

.level-switch button:disabled {
  cursor: not-allowed;
}

.level-switch span {
  font-size: 0.82rem;
  font-weight: 750;
}

.level-switch small {
  color: #7a8d9b;
  font-size: 0.64rem;
  line-height: 1.25;
  text-align: center;
}

.game-card {
  position: relative;
  overflow: hidden;
  margin-top: 20px;
  border: 1px solid #bfd4e1;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 18px 45px rgb(28 76 103 / 0.11);
}

.game-content {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  transition: filter 180ms ease, opacity 180ms ease;
}

.start-button {
  display: inline-flex;
  min-width: 180px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 11px;
  background: var(--blue);
  box-shadow: 0 7px 16px rgb(14 95 145 / 0.19);
  color: var(--white);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: 150ms ease;
}

.start-button:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
}

.date-panel {
  position: relative;
  display: flex;
  min-height: 460px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #0b4d77;
  padding: 38px 32px;
  text-align: center;
}

.date-panel::after {
  position: absolute;
  right: -18px;
  bottom: -48px;
  color: rgb(255 255 255 / 0.045);
  content: "XIV";
  font-family: var(--font-roman);
  font-size: 10.5rem;
  font-weight: 700;
}

.date-panel > * {
  position: relative;
  z-index: 1;
}

.date-caption {
  color: #a9d5e9;
  font-size: 0.72rem;
  font-weight: 720;
  letter-spacing: 0.13em;
  transform: translateY(-10px);
  text-transform: uppercase;
}

.date-value {
  margin: 12px 0 8px;
  color: var(--white);
  font-family: var(--font-roman);
  font-size: clamp(3.5rem, 13vw, 5.4rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
  text-shadow: 0 5px 18px rgb(0 21 39 / 0.24);
}

.date-value small {
  font-size: 0.34em;
  font-weight: 400;
  letter-spacing: 0;
}

.date-rule {
  width: 56px;
  height: 2px;
  margin: 8px 0 13px;
  background: #5fb4d7;
}

.date-hint {
  max-width: 300px;
  color: #c7e4f1;
  font-size: 0.78rem;
  line-height: 1.5;
}

.answer-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 48px 36px 34px;
}

.answer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.answer-label,
.control-label {
  color: #4c6475;
  font-size: 0.72rem;
  font-weight: 720;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.clear-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #588097;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 650;
}

.clear-link:hover:not(:disabled) {
  color: #0e5f91;
}

.answer-display {
  display: flex;
  height: 64px;
  align-items: center;
  justify-content: center;
  border: 2px solid #d1e0e9;
  border-radius: 12px;
  background: #f8fbfd;
  color: #a7b6c0;
  font-family: var(--font-roman);
  font-size: clamp(1.15rem, 4.5vw, 1.7rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0 10px;
  text-align: center;
}

.answer-display-wrap {
  position: relative;
  margin-top: 8px;
}

.answer-question-counter {
  position: absolute;
  top: 12px;
  right: 16px;
  min-width: 104px;
  border: 1px solid #c8dce8;
  border-radius: 999px;
  background: var(--blue-soft);
  padding: 6px 10px;
  box-shadow: 0 4px 12px rgb(26 65 89 / 0.06);
  color: #0e5f91;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  pointer-events: none;
  text-align: center;
}

.answer-display.has-answer {
  border-color: #82bad5;
  color: #113f5e;
}

.control-label {
  margin-bottom: 8px;
}

.roman-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.roman-button {
  height: 56px;
  border: 1px solid #b9d1df;
  border-radius: 9px;
  background: var(--white);
  box-shadow: 0 3px 0 #d5e3eb;
  color: #154e71;
  cursor: pointer;
  font-family: var(--font-roman);
  font-size: 1.4rem;
  font-weight: 700;
  transition: 140ms ease;
}

.roman-button:hover:not(:disabled) {
  border-color: #62a8ca;
  background: #edf7fb;
  color: var(--navy);
}

.roman-button:active:not(:disabled) {
  box-shadow: none;
  transform: translateY(2px);
}

.delete-button {
  color: #668192;
  font-family: var(--font-sans);
  font-size: 1.7rem;
}

.answer-options {
  display: flex;
  gap: 12px;
}

.answer-options > div {
  min-width: 0;
  flex: 1;
}

.half-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.half-buttons button {
  height: 45px;
  border: 1px solid #bfd3df;
  border-radius: 9px;
  background: var(--white);
  color: #395d72;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
}

.half-buttons button:hover:not(:disabled) {
  background: #edf7fb;
}

.half-buttons button.selected {
  border-color: #0f668f;
  background: #deeff7;
  box-shadow: inset 0 0 0 1px #0f668f;
  color: #08486c;
}

.submit-button {
  display: flex;
  height: 50px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 11px;
  background: var(--blue);
  box-shadow: 0 7px 16px rgb(14 95 145 / 0.19);
  color: var(--white);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 750;
  transition: 150ms ease;
}

.submit-button:hover:not(:disabled) {
  background: var(--blue-dark);
}

.submit-button:disabled {
  background: #7da8bd;
}

.feedback {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid;
  border-radius: 11px;
  padding: 11px 12px;
  font-size: 0.76rem;
}

.feedback.success {
  border-color: #add8c2;
  background: var(--success-bg);
  color: var(--success);
}

.feedback.error {
  border-color: #e4bec3;
  background: var(--error-bg);
  color: var(--error);
}

.feedback-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: currentColor;
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 800;
}

.feedback strong {
  font-size: 0.8rem;
}

.feedback p {
  margin-top: 2px;
  opacity: 0.85;
}

.summary-card {
  overflow: hidden;
  margin-top: 20px;
  border: 1px solid #bfd4e1;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 18px 45px rgb(28 76 103 / 0.11);
}

.summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid #dce8ee;
  padding: 30px 34px;
  background: #f8fbfd;
}

.summary-header h3 {
  margin: 0;
  color: #123550;
  font-size: clamp(1.45rem, 4vw, 2rem);
  letter-spacing: -0.03em;
}

.summary-date {
  margin-top: 7px;
  color: #6d8290;
  font-size: 0.76rem;
}

.summary-score {
  display: flex;
  min-width: 132px;
  flex-direction: column;
  align-items: center;
  border-radius: 14px;
  background: var(--navy);
  padding: 15px 18px;
  color: #c8e5f2;
}

.summary-score strong {
  color: var(--white);
  font-family: var(--font-roman);
  font-size: 2rem;
  line-height: 1;
}

.summary-score span {
  margin-top: 4px;
  font-size: 0.67rem;
}

.summary-list-heading {
  display: grid;
  grid-template-columns: 0.9fr 1fr 1fr;
  gap: 18px;
  border-bottom: 1px solid #dce8ee;
  padding: 13px 34px;
  color: #6a7f8e;
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.summary-item {
  display: grid;
  grid-template-columns: 0.9fr 1fr 1fr;
  align-items: center;
  gap: 14px;
  min-height: 61px;
  border-bottom: 1px solid #e4edf2;
  padding: 10px 34px;
}

.summary-date-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.summary-date-cell strong {
  color: #163b54;
  font-family: var(--font-roman);
  font-size: 1rem;
}

.summary-status {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 850;
}

.summary-item.correct .summary-status {
  background: #3b9163;
}

.summary-item.incorrect .summary-status {
  background: #bc5360;
}

.summary-answer,
.summary-expected {
  display: flex;
  align-items: baseline;
  gap: 9px;
  color: #6b7e8b;
  font-size: 0.75rem;
}

.summary-answer strong,
.summary-expected strong {
  color: #163b54;
  font-family: var(--font-roman);
  font-size: 1rem;
}

.summary-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 34px;
}

.summary-actions p {
  color: #687e8c;
  font-size: 0.76rem;
  line-height: 1.5;
}

.summary-actions .start-button {
  flex: none;
  min-width: 220px;
}

.site-footer {
  display: flex;
  width: min(100%, 896px);
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 34px auto 0;
  border-top: 1px solid #d7e4eb;
  padding: 20px 2px 0;
  color: #7c909d;
  font-size: 0.7rem;
}

.site-footer strong {
  margin-right: 4px;
  color: #335e76;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.site-footer small {
  flex: none;
  font-size: inherit;
}

.site-footer { flex-wrap: wrap; }
.privacy-link { color: var(--blue-dark); text-decoration: underline; cursor: pointer; font-size: 0.875rem; padding: 8px 0; }
#analytics-dialog { width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; border: 1px solid var(--border); border-radius: 18px; padding: 24px; color: var(--foreground); background: var(--white); box-shadow: 0 18px 45px rgb(28 76 103 / 0.2); font-size: 1rem; line-height: 1.55; }
#analytics-dialog::backdrop { background: rgb(7 35 55 / 0.45); }
#analytics-dialog h2 { font-size: 1.4rem; line-height: 1.3; }
#analytics-dialog p, #analytics-dialog details { margin-top: 16px; }
#analytics-dialog summary { color: var(--blue-dark); cursor: pointer; }
#analytics-dialog a { color: var(--blue-dark); }
#analytics-status { font-size: 0.875rem; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.consent-actions button { flex: 1 1 180px; min-height: 48px; padding: 12px; border: 1px solid var(--blue-dark); border-radius: 10px; color: var(--blue-dark); background: var(--blue-soft); cursor: pointer; font-weight: 650; }
.consent-actions button:hover { background: #d4e9f4; }

@media (max-width: 719px) {
  .brand-message {
    display: none;
  }

  .page-container {
    padding-top: 20px;
  }

  .level-switch {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ad-slot {
    min-height: 64px;
    margin-bottom: 20px;
  }

  .game-content {
    grid-template-columns: 1fr;
  }

  .game-card,
  .summary-card {
    margin-top: 16px;
  }

  .date-panel {
    min-height: 230px;
    padding: 30px 24px;
  }

  .date-panel::after {
    right: -12px;
    bottom: -36px;
    font-size: 9rem;
  }

  .answer-panel {
    padding: 44px 20px 22px;
  }

  .summary-header,
  .summary-actions {
    padding: 24px 22px;
  }

  .summary-list-heading {
    padding-right: 22px;
    padding-left: 22px;
  }

  .summary-item {
    padding-right: 22px;
    padding-left: 22px;
  }
}

@media (max-width: 480px) {
  .header-container {
    width: min(100% - 32px, 896px);
  }

  .ad-size {
    display: none;
  }

  .game-heading-line {
    font-size: 0.57rem;
    letter-spacing: 0.055em;
  }

  .answer-options {
    flex-direction: column;
    gap: 14px;
  }

  .date-panel {
    min-height: 210px;
  }

  .summary-header,
  .summary-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .summary-score {
    align-items: flex-start;
  }

  .summary-list-heading,
  .summary-item {
    grid-template-columns: 0.9fr 1fr 1fr;
    gap: 6px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .summary-list-heading {
    font-size: 0.52rem;
    letter-spacing: 0.04em;
  }

  .summary-date-cell {
    gap: 6px;
  }

  .summary-status {
    width: 20px;
    height: 20px;
    font-size: 0.64rem;
  }

  .summary-date-cell strong,
  .summary-answer strong,
  .summary-expected strong {
    font-size: 0.8rem;
  }

  .summary-actions .start-button {
    width: 100%;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .date-value.animate {
    animation: date-in 320ms ease-out;
  }

  @keyframes date-in {
    from {
      opacity: 0;
      transform: translateY(7px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

.worksheet-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; margin-top: 22px; padding: 22px; border: 1px solid var(--border); border-radius: 14px; background: white; }
.worksheet-controls label { display: grid; flex: 1 1 140px; gap: 8px; font-size: 0.875rem; font-weight: 650; }
.worksheet-controls label:first-child { flex-basis: 320px; }
.worksheet-controls select { width: 100%; min-height: 48px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: white; color: var(--foreground); font: inherit; }
.worksheet-controls select:focus-visible { outline: 3px solid #62a8ca; outline-offset: 2px; }
.worksheet-controls button, .worksheet-actions button { padding: 12px 18px; font-size: 0.875rem; letter-spacing: 0; text-transform: none; }
.worksheet-rules, .worksheet-print-help { margin-top: 14px; color: var(--muted); font-size: 0.875rem; line-height: 1.6; }
.worksheet-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; font-size: 0.875rem; }
.worksheet-page { margin-top: 22px; padding: 32px; border: 1px solid var(--border); background: white; color: #111; font-family: Arial, sans-serif; }
.worksheet-page-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.worksheet-page-title h3 { margin: 0; font-size: 24px; }
.worksheet-page-title > span { font-size: 14px; }
.worksheet-student { display: grid; gap: 18px; margin-top: 26px; font-size: 14px; }
.worksheet-student p { display: flex; align-items: baseline; gap: 8px; }
.worksheet-student span { flex: 1; border-bottom: 1px dotted #777; }
.worksheet-instruction { margin: 24px 0 16px; font-size: 14px; line-height: 1.5; }
.worksheet-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; }
.worksheet-table th, .worksheet-table td { height: 32px; padding: 5px 10px; border: 1px solid #999; text-align: left; }
.worksheet-table th:first-child, .worksheet-table td:first-child { width: 40px; text-align: center; }
.worksheet-table th[scope="row"] { font-weight: normal; }
.worksheet-page footer { display: flex; justify-content: space-between; margin-top: 16px; font-size: 11px; color: #555; }
@media (max-width: 1335px) { .side-menu { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .side-menu { grid-template-columns: 1fr; }
  .worksheet-page { padding: 16px; }
  .worksheet-table th, .worksheet-table td { padding: 5px; font-size: 12px; }
}
@page { size: A4 portrait; margin: 14mm; }
@media print {
  body:has(#worksheet-view:not([hidden])), html:has(#worksheet-view:not([hidden])) { background: white; min-width: 0; }
  body:has(#worksheet-view:not([hidden])) > :not(main),
  body:has(#worksheet-view:not([hidden])) .side-menu,
  body:has(#worksheet-view:not([hidden])) .site-footer,
  #worksheet-view > :not(#worksheet-result),
  #worksheet-result > :not(#worksheet-preview) { display: none !important; }
  body:has(#worksheet-view:not([hidden])) .page-container,
  body:has(#worksheet-view:not([hidden])) .workspace-layout { display: block; width: 100%; margin: 0; padding: 0; }
  .worksheet-page { border: 0; margin: 0; padding: 0; break-after: page; break-inside: avoid; }
  .worksheet-page:last-child { break-after: auto; }
  .worksheet-page-title h3 { font-size: 18pt; }
  .worksheet-table th, .worksheet-table td { height: 8mm; padding: 1.5mm 2mm; font-size: 11pt; }
  .worksheet-table th:first-child, .worksheet-table td:first-child { width: 10mm; }
  .worksheet-student, .worksheet-instruction { font-size: 11pt; }
  .worksheet-page footer { font-size: 9pt; }
}
