﻿/* Chunk 4.4 allow-list residual: focused-play (animation polish deferred) + shared print report. */

/* Focused play residual (NeoUI Card + slide classes) */
.focused-play {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  min-height: min(70vh, 40rem);
  gap: 1.25rem;
  width: 100%;
  max-width: 56rem;
  margin: 0 auto;
}

.focused-play--wide {
  max-width: min(96rem, 100%);
}

.focused-stage {
  grid-column: 2;
  width: 100%;
  max-width: 40rem;
  justify-self: center;
  min-width: 0;
  min-height: 14rem;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.focused-stage--wide {
  max-width: none;
  overflow: auto;
  place-items: stretch;
}

/* Chrome/macOS enforce ~9–10px min font-size; scale down from a safe base size. */
.crossword-clue-num {
  position: absolute;
  left: 1px;
  top: 0;
  z-index: 20;
  pointer-events: none;
  font-size: 10px;
  line-height: 1;
  font-weight: 600;
  color: var(--muted-foreground, #6b7280);
  transform: scale(0.55);
  transform-origin: top left;
}

.focused-card {
  width: 100%;
  padding: 1.25rem 1.35rem;
  background: color-mix(in srgb, var(--bg-surface) 92%, transparent);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 28px color-mix(in srgb, var(--ink) 8%, transparent);
  color: var(--ink);
}

.focused-card .question-prompt {
  color: inherit;
  font-size: 1.15rem;
  line-height: 1.45;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.slide-idle {
  opacity: 1;
  transform: translateX(0);
}

.slide-out-left {
  animation: focus-slide-out-left 180ms ease forwards;
}

.slide-out-right {
  animation: focus-slide-out-right 180ms ease forwards;
}

.slide-in-right {
  animation: focus-slide-in-right 220ms ease;
}

.slide-in-left {
  animation: focus-slide-in-left 220ms ease;
}

@keyframes focus-slide-out-left {
  to { opacity: 0; transform: translateX(-40%); }
}

@keyframes focus-slide-out-right {
  to { opacity: 0; transform: translateX(40%); }
}

@keyframes focus-slide-in-right {
  from { opacity: 0; transform: translateX(40%); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes focus-slide-in-left {
  from { opacity: 0; transform: translateX(-40%); }
  to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 520px) {
  .focused-card {
    padding: 1rem;
  }
}

/* Print report (screen) — shared across PrintReport/Batch/Select/Chrome/LessonBlock; not page-scoped */
.print-toolbar p {
  margin: 0;
}

.print-report {
  max-width: 800px;
}

.print-report-header {
  margin-bottom: 0.25rem;
  padding-bottom: 0;
  border-bottom: none;
}

.print-report-title {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

.print-header-rule {
  border: none;
  border-top: 3px double var(--ink, #222);
  margin: 0.7rem 0 0.85rem;
}

.print-meta-block {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin: 0 0 0.25rem;
}

.print-meta-cell {
  width: 50%;
  padding: 0.35rem 0;
  vertical-align: top;
}

.print-meta-left {
  text-align: left;
}

.print-meta-right {
  text-align: right;
}

.print-meta-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted, #555);
  margin-bottom: 0.15rem;
}

.print-meta-value {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink, #111);
  line-height: 1.25;
}

.print-meta-row-primary .print-meta-cell {
  padding-bottom: 0.55rem;
}

.print-meta-row-secondary .print-meta-cell {
  padding-top: 0.55rem;
  border-top: 1px solid var(--border, #c8c8c8);
}

.print-section {
  margin-top: 1.35rem;
}

.print-subject-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1.25rem;
  margin: 0 0 0.65rem;
  padding: 0.45rem 0 0.55rem;
  border-bottom: 2px solid var(--primary, var(--ink, #222));
}

.print-section-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.print-section-lead {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-muted, #555);
}

.print-section-lead strong {
  color: var(--ink, #111);
  font-size: 1.05rem;
}

.print-lesson-block {
  margin: 0.65rem 0 0.85rem;
  padding-bottom: 0;
  border-bottom: none;
}

.print-lesson-title {
  margin: 0 0 0.15rem;
  font-size: 1rem;
  font-weight: 600;
}

.print-lesson-meta,
.print-empty {
  margin: 0 0 0.4rem;
  color: var(--ink-muted, #555);
}

.print-report-footer {
  margin-top: 2rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border, #999);
  font-size: 0.85rem;
  color: var(--ink-muted, #555);
}

.print-page-break {
  height: 1.5rem;
}

.print-brand {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted, #555);
  margin-bottom: 0.35rem;
}

.print-meta {
  margin: 0.35rem 0 0;
  color: var(--ink-muted, #555);
}

.print-questions {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.print-question {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border, #ddd);
}

.print-qnum {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-muted, #555);
  margin-bottom: 0.2rem;
}

.print-answers {
  margin-top: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.print-label {
  color: var(--ink-muted, #555);
  margin-right: 0.25rem;
}

.print-totals {
  margin-top: 1.5rem;
  font-size: 1.1rem;
}

.print-date-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.85rem 1rem;
}

.print-date-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-bottom: 0.15rem;
}

.print-select-page .print-select-back {
  margin: 0 0 0.75rem;
}

.print-select-section {
  margin: 1.35rem 0 0;
  padding-top: 1.1rem;
}

.print-select-section:first-of-type {
  margin-top: 1rem;
}

.print-title-field {
  margin-bottom: 0.5rem;
}

.print-title-input,
.print-title-field input {
  width: 33%;
  min-width: 16rem;
  max-width: 100ch;
}

.print-school-note,
.print-section-hint {
  margin: 0;
}

.print-mode-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 0.75rem;
}

.print-mode-option {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  background: var(--bg-surface);
  cursor: pointer;
}

.print-mode-option input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.print-mode-option span {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.print-mode-option .text-muted-foreground {
  font-size: 0.9rem;
}

.print-lessons-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin: 0.35rem 0 0.85rem;
}

.print-select-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.print-select-header h2 {
  margin: 0;
}

@media (max-width: 720px) {
  .print-mode-options {
    grid-template-columns: 1fr;
  }

  .print-title-input,
  .print-title-field input {
    width: 100%;
    min-width: 0;
  }

  .print-lessons-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}

.print-summary-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
}

.print-summary-table th,
.print-summary-table td {
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--border, #ddd);
  vertical-align: top;
}

.print-summary-table th {
  font-size: 0.85rem;
  color: var(--ink-muted, #555);
  font-weight: 600;
}

.print-summary-pct {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.print-summary-table tfoot td {
  border-bottom: none;
  padding-top: 0.9rem;
  font-weight: 600;
}

.print-detail-table th,
.print-detail-table td {
  width: 25%;
  word-break: break-word;
  overflow-wrap: anywhere;
  vertical-align: top;
  padding: 0.4rem 0.55rem;
}

.print-detail-table th:nth-child(1),
.print-detail-table td:nth-child(1) {
  width: 34%;
  padding-right: 0.75rem;
}

.print-detail-table th:nth-child(2),
.print-detail-table td:nth-child(2),
.print-detail-table th:nth-child(3),
.print-detail-table td:nth-child(3) {
  width: 26%;
  padding-left: 0.55rem;
  padding-right: 0.55rem;
}

.print-detail-table th:nth-child(4),
.print-detail-table td:nth-child(4) {
  width: 14%;
  padding-left: 0.55rem;
  white-space: normal;
}
