:root {
  --svc-ink: #071126;
  --svc-muted: #64748b;
  --svc-line: #dbe4ee;
  --svc-blue: #5365f6;
  --svc-bg: #ffffff;
}

body.service-home-page {
  margin: 0;
  min-height: 100vh;
  background: var(--svc-bg);
  color: var(--svc-ink);
  font-family: "Inter", "Noto Sans KR", sans-serif;
  font-weight: 500;
}

.svc-header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  min-height: 56px;
  gap: 22px;
  padding: 0 30px;
  background: rgba(255, 255, 255, .95);
  border-bottom: 1px solid #e5e7eb;
  backdrop-filter: blur(12px);
}

.svc-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 170px;
  text-decoration: none;
}

.svc-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #ffffff;
  background: #5b67e8;
  font-size: 18px;
  font-weight: 1000;
}

.svc-logo strong {
  display: block;
  color: #4f46e5;
  font-size: 18px;
  line-height: 1.1;
}

.svc-logo small {
  display: block;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
}

.svc-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
}

.svc-nav a,
.svc-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: #475569;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.svc-nav a:hover,
.svc-actions a:hover {
  background: #eef2ff;
  color: #3730a3;
}

.svc-nav a.is-active {
  background: #eef2ff;
  color: #263ac8;
}

.svc-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#auth-header-area {
  display: flex;
  align-items: center;
}

.auth-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #4f46e5, #2563eb);
  font-family: inherit;
  font-size: 13px;
  font-weight: 1000;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(37, 99, 235, .2);
}

.auth-avatar-btn {
  width: 36px;
  height: 36px;
  border: 2px solid #bfdbfe;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #4f46e5, #2563eb);
  font-family: inherit;
  font-size: 14px;
  font-weight: 1000;
  cursor: pointer;
}

.auth-dropdown {
  position: fixed;
  z-index: 2100;
  min-width: 220px;
  padding: 8px 0;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .18);
}

.auth-dropdown-email {
  padding: 8px 16px 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  word-break: break-all;
}

.auth-dropdown-hr {
  border: 0;
  border-top: 1px solid #e2e8f0;
  margin: 4px 0;
}

.auth-dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 0;
  color: #0f172a;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 850;
  text-align: left;
  cursor: pointer;
}

.auth-dropdown-item:hover {
  background: #f8fafc;
}

.auth-modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2000 !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
  background: rgba(15, 23, 42, .62) !important;
  backdrop-filter: blur(8px);
}

.auth-modal-box {
  position: relative;
  width: min(420px, calc(100vw - 32px));
  max-height: min(90vh, 720px);
  overflow-y: auto;
  box-sizing: border-box;
  padding: 32px;
  border: 1px solid #dbeafe;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
}

.auth-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  color: #64748b;
  background: #f1f5f9;
  font-size: 14px;
  cursor: pointer;
}

.auth-modal-close:hover {
  color: #0f172a;
  background: #e2e8f0;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 24px;
  border-radius: 12px;
  background: #f1f5f9;
}

.auth-tab {
  flex: 1;
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  color: #64748b;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 950;
  cursor: pointer;
}

.auth-tab.active {
  color: #4338ca;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
}

.auth-title {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 24px;
  font-weight: 1000;
  letter-spacing: 0;
}

.auth-desc {
  margin: 0 0 20px;
  color: #475569;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.65;
  word-break: keep-all;
}

.auth-btn-google {
  width: 100%;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
  border: 1.5px solid #dbeafe;
  border-radius: 12px;
  color: #0f172a;
  background: #ffffff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 950;
  cursor: pointer;
}

.auth-btn-google:hover {
  background: #f8fafc;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 850;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.auth-field {
  margin-bottom: 14px;
}

.auth-field label {
  display: block;
  margin-bottom: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 950;
}

.auth-field input {
  width: 100%;
  height: 43px;
  box-sizing: border-box;
  border: 1.5px solid #dbeafe;
  border-radius: 12px;
  padding: 0 13px;
  color: #0f172a;
  background: #ffffff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
}

.auth-field input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, .12);
}

.auth-btn-primary {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #4f46e5, #2563eb);
  font-family: inherit;
  font-size: 15px;
  font-weight: 1000;
  cursor: pointer;
}

.auth-btn-primary:disabled {
  opacity: .62;
  cursor: not-allowed;
}

.auth-error,
.auth-success {
  margin-bottom: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.45;
}

.auth-error {
  color: #b91c1c;
  background: #fef2f2;
}

.auth-success {
  color: #047857;
  background: #ecfdf5;
}

.auth-link {
  display: block;
  width: 100%;
  margin-top: 12px;
  border: 0;
  color: #64748b;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 850;
  text-align: center;
  text-decoration: underline;
  cursor: pointer;
}

.svc-actions .svc-admin {
  color: #ffffff;
  background: #4f46e5;
}

.svc-hero {
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 58px;
  color: #ffffff;
  background:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px),
    radial-gradient(circle at 50% 34%, var(--svc-glow, rgba(83, 101, 246, .30)), transparent 34rem),
    linear-gradient(135deg, #10182e 0%, var(--svc-deep, #17274d) 100%);
  background-size: 40px 40px, 40px 40px, auto, auto;
}

.svc-hero-inner {
  width: min(980px, 100%);
  text-align: center;
}

.svc-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 30px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.24);
  color: #dbeafe;
  background: rgba(255,255,255,.10);
  font-size: 13px;
  font-weight: 1000;
}

.svc-hero h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.08;
  letter-spacing: 0;
  font-weight: 1000;
}

.svc-hero h1 span {
  color: var(--svc-accent, #8fb1ff);
}

.svc-copy {
  max-width: 680px;
  margin: 28px auto 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
  font-weight: 800;
  word-break: keep-all;
}

.svc-hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 38px;
}

.svc-primary,
.svc-secondary {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 28px;
  border-radius: 14px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 1000;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}

.svc-primary {
  background: linear-gradient(135deg, var(--svc-main, #4f6ef7), var(--svc-main-2, #695cff));
  box-shadow: 0 18px 36px var(--svc-shadow, rgba(79, 110, 247, .36));
}

.svc-secondary {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.28);
}

.svc-primary:hover,
.svc-secondary:hover {
  transform: translateY(-2px);
}

.svc-stats {
  width: min(760px, 100%);
  margin: 58px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255,255,255,.09);
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
}

.svc-stats div {
  min-height: 82px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  border-right: 1px solid rgba(255,255,255,.08);
}

.svc-stats div:last-child {
  border-right: 0;
}

.svc-stats strong {
  color: var(--svc-accent, #8fb1ff);
  font-size: 30px;
  line-height: 1;
  font-weight: 1000;
}

.svc-stats span {
  color: #99a8c7;
  font-size: 12px;
  font-weight: 900;
}

.mathlo-landing {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background-color: #0b1026;
  background-image:
    linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 42px 42px;
}

.mathlo-landing-shell {
  width: min(1180px, calc(100% - 48px));
  min-height: 650px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  align-items: center;
  gap: 42px;
  padding: 76px 0 82px;
}

.mathlo-landing-copy {
  min-width: 0;
}

.mathlo-landing-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 24px;
  padding: 8px 14px;
  border: 1px solid rgba(125, 211, 252, .32);
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(15, 23, 42, .68);
  font-size: 13px;
  font-weight: 900;
}

.mathlo-landing h1 {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(40px, 5.8vw, 68px);
  line-height: 1.08;
  letter-spacing: 0;
  font-weight: 1000;
}

.mathlo-landing h1 span {
  color: #93c5fd;
}

.mathlo-landing-copy > p:not(.mathlo-landing-kicker) {
  max-width: 680px;
  margin: 24px 0 0;
  color: #cbd5e1;
  font-size: 17px;
  line-height: 1.78;
  font-weight: 700;
  word-break: keep-all;
}

.mathlo-landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.mathlo-landing-primary,
.mathlo-landing-secondary {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 14px;
  padding: 0 22px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 1000;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.mathlo-landing-primary {
  color: #061326;
  background: #93c5fd;
  box-shadow: 0 18px 36px rgba(59, 130, 246, .28);
}

.mathlo-landing-secondary {
  color: #e0f2fe;
  border: 1px solid rgba(191, 219, 254, .34);
  background: rgba(255,255,255,.08);
}

.mathlo-landing-primary:hover,
.mathlo-landing-secondary:hover {
  transform: translateY(-2px);
}

.mathlo-platform-hero-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 680px;
  margin-top: 22px;
}

.mathlo-platform-hero-card {
  display: grid;
  gap: 6px;
  min-height: 118px;
  padding: 18px;
  border: 1px solid rgba(191, 219, 254, .26);
  border-radius: 18px;
  color: #e0f2fe;
  text-decoration: none;
  background: rgba(15, 23, 42, .72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 18px 34px rgba(0,0,0,.16);
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.mathlo-platform-hero-card:hover {
  transform: translateY(-2px);
  border-color: rgba(147, 197, 253, .72);
  background: rgba(30, 41, 59, .84);
}

.mathlo-platform-hero-card span {
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: .08em;
}

.mathlo-platform-hero-card strong {
  color: #ffffff;
  font-size: 30px;
  font-weight: 1000;
  line-height: 1;
}

.mathlo-platform-hero-card em {
  color: #cbd5e1;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.45;
}

.mathlo-platform-hero-card.is-mathlo {
  border-color: rgba(96, 165, 250, .56);
}

.mathlo-platform-hero-card.is-puzzlelo {
  border-color: rgba(167, 139, 250, .5);
}

.mathlo-platform-hero-panel p {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(125, 211, 252, .28);
  border-radius: 14px;
  color: #bae6fd;
  background: rgba(14, 165, 233, .1);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.45;
}

.mathlo-platform-hero-panel p i {
  margin-right: 7px;
}

.mathlo-command-board {
  display: grid;
  gap: 18px;
  padding: 26px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 24px;
  background: rgba(15, 23, 42, .74);
  box-shadow: 0 26px 60px rgba(0,0,0,.28);
  backdrop-filter: blur(12px);
}

.mathlo-command-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
}

.mathlo-command-top strong {
  color: #e0f2fe;
  letter-spacing: 0;
}

.mathlo-command-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mathlo-command-grid div {
  min-height: 108px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 16px;
  background: rgba(30, 41, 59, .62);
}

.mathlo-command-grid strong {
  color: #bfdbfe;
  font-size: 24px;
  font-weight: 1000;
}

.mathlo-command-grid span,
.mathlo-command-flow span {
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 800;
}

.mathlo-command-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(2, 6, 23, .42);
}

.mathlo-command-flow i {
  color: #38bdf8;
  font-size: 12px;
}

.mathlo-system-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.mathlo-system-entry {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 22px;
  border: 1px solid #dbe4ee;
  border-radius: 18px;
  background: #ffffff;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .07);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.mathlo-system-entry:hover {
  transform: translateY(-6px);
  border-color: #93c5fd;
  box-shadow: 0 22px 42px rgba(37, 99, 235, .14);
}

.mathlo-system-entry i {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 18px;
}

.mathlo-system-entry strong {
  font-size: 22px;
  font-weight: 1000;
}

.mathlo-system-entry span {
  color: #475569;
  font-size: 14px;
  line-height: 1.62;
  font-weight: 700;
  word-break: keep-all;
}

.mathlo-system-entry em {
  margin-top: auto;
  padding: 6px 10px;
  border-radius: 999px;
  color: #075985;
  background: #e0f2fe;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.mathlo-showcase-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.mathlo-showcase-grid article {
  padding: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #f8fafc;
}

.mathlo-showcase-grid i {
  color: #2563eb;
  font-size: 22px;
}

.mathlo-showcase-grid strong {
  display: block;
  margin-top: 18px;
  color: #0f172a;
  font-size: 19px;
  font-weight: 1000;
}

.mathlo-showcase-grid p {
  margin: 10px 0 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.65;
  font-weight: 700;
  word-break: keep-all;
}

.mathlo-white-label-grid {
  display: grid;
  grid-template-columns: minmax(320px, .72fr) minmax(0, 1.28fr);
  gap: 24px;
  align-items: stretch;
}

.mathlo-white-label-controls,
.mathlo-white-label-preview {
  border: 1px solid #dbe4ee;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
}

.mathlo-white-label-controls {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.mathlo-white-label-controls label {
  display: grid;
  gap: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}

.mathlo-white-label-controls input[type="text"],
.mathlo-white-label-controls input[type="file"] {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 11px 12px;
  color: #0f172a;
  background: #ffffff;
  font: 800 14px/1.2 "Inter", "Noto Sans KR", sans-serif;
}

.mathlo-white-label-actions {
  display: grid;
  gap: 10px;
}

.mathlo-white-label-actions button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  color: #1e3a8a;
  background: #eef2ff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.mathlo-white-label-preview {
  display: grid;
  grid-template-columns: minmax(230px, .55fr) minmax(0, 1fr);
  gap: 18px;
  padding: 24px;
  background:
    linear-gradient(rgba(15,23,42,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,.05) 1px, transparent 1px),
    #ffffff;
  background-size: 28px 28px;
}

.mathlo-cover-preview {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 24px;
  border-radius: 20px;
  color: #ffffff;
  background: #111827;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}

.mathlo-cover-logo {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 16px;
  color: #111827;
  background: #bfdbfe;
  font-size: 24px;
  font-weight: 1000;
}

.mathlo-cover-logo img,
.mathlo-custom-print-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mathlo-cover-preview p {
  margin: auto 0 0;
  color: #93c5fd;
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: .18em;
}

.mathlo-cover-preview strong {
  color: #ffffff;
  font-size: 28px;
  line-height: 1.18;
  font-weight: 1000;
}

.mathlo-cover-preview span {
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 800;
}

.mathlo-footer-preview {
  align-self: end;
  display: grid;
  gap: 8px;
  padding: 18px;
  border-top: 2px solid #111827;
  background: rgba(255,255,255,.84);
}

.mathlo-footer-preview strong {
  color: #111827;
  font-size: 17px;
  font-weight: 1000;
}

.mathlo-footer-preview span {
  color: #475569;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 700;
}

.svc-section {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 70px 0 36px;
}

.svc-section-title {
  margin-bottom: 42px;
}

.svc-section-title p {
  margin: 0 0 12px;
  color: var(--svc-main, #5365f6);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: .34em;
}

.svc-section-title h2 {
  margin: 0;
  color: var(--svc-ink);
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.16;
  letter-spacing: 0;
  font-weight: 1000;
}

.svc-section-title span {
  display: block;
  max-width: 760px;
  margin-top: 20px;
  color: #475569;
  font-size: 16px;
  line-height: 1.75;
  word-break: keep-all;
}

.svc-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.svc-feature-card {
  position: relative;
  min-height: 280px;
  padding: 34px 32px;
  border-radius: 20px;
  background: #f8fafc;
  border: 1px solid #dbe4ee;
  overflow: hidden;
}

.svc-feature-card i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: var(--svc-soft, #eef4ff);
  color: var(--svc-main, #5365f6);
  font-size: 21px;
  margin-bottom: 28px;
}

.svc-feature-card em {
  position: absolute;
  top: 20px;
  right: 26px;
  color: #e3e8f2;
  font-size: 56px;
  font-style: normal;
  font-weight: 1000;
  line-height: 1;
}

.svc-feature-card h3 {
  margin: 0;
  color: var(--svc-ink);
  font-size: 20px;
  line-height: 1.35;
  font-weight: 1000;
  letter-spacing: 0;
}

.svc-feature-card p {
  margin: 18px 0 22px;
  color: #475569;
  font-size: 14px;
  line-height: 1.85;
  word-break: keep-all;
}

.svc-feature-card span {
  display: inline-flex;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--svc-soft, #eef4ff);
  color: var(--svc-main, #5365f6);
  font-size: 12px;
  font-weight: 1000;
}

.svc-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.svc-road-card {
  display: flex;
  flex-direction: column;
  min-height: 240px;
  padding: 22px;
  border-radius: 18px;
  border: 1px solid var(--svc-line);
  border-top: 5px solid var(--svc-main, #5365f6);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .05);
}

.svc-road-card strong {
  color: var(--svc-ink);
  font-size: 19px;
  font-weight: 1000;
}

.svc-road-card p {
  margin: 12px 0 18px;
  color: var(--svc-muted);
  font-size: 13px;
  line-height: 1.7;
  word-break: keep-all;
}

.svc-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.svc-chip-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #dbe4ee;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.svc-footer {
  width: min(1180px, calc(100% - 48px));
  margin: 30px auto 70px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  color: #64748b;
  border-top: 1px solid #e5e7eb;
  padding-top: 22px;
  font-size: 12px;
  font-weight: 800;
}

.svc-theme-math {
  --svc-main: #4f6ef7;
  --svc-main-2: #695cff;
  --svc-accent: #8fb1ff;
  --svc-soft: #eef4ff;
  --svc-deep: #17274d;
  --svc-glow: rgba(83, 101, 246, .32);
  --svc-shadow: rgba(79, 110, 247, .36);
}

.svc-theme-board {
  --svc-main: #0891b2;
  --svc-main-2: #2563eb;
  --svc-accent: #67e8f9;
  --svc-soft: #ecfeff;
  --svc-deep: #123a54;
  --svc-glow: rgba(6, 182, 212, .28);
  --svc-shadow: rgba(8, 145, 178, .32);
}

.svc-theme-science {
  --svc-main: #10b981;
  --svc-main-2: #0ea5e9;
  --svc-accent: #86efac;
  --svc-soft: #ecfdf5;
  --svc-deep: #123f35;
  --svc-glow: rgba(16, 185, 129, .26);
  --svc-shadow: rgba(16, 185, 129, .30);
}

.mathlo-platform-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(148, 163, 184, .34);
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
}

.mathlo-platform-switcher a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  color: #475569;
  font-size: 12px;
  font-weight: 1000;
  text-decoration: none;
  transition: transform .16s ease, background .16s ease, color .16s ease;
}

.mathlo-platform-switcher a:hover {
  transform: translateY(-1px);
  background: #eef2ff;
  color: #3730a3;
}

.mathlo-platform-switcher a.is-active {
  background: linear-gradient(135deg, #4f46e5, #2563eb);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, .26);
}

.mathlo-teacher-gateway {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dbeafe;
  border-radius: 22px;
  padding: 26px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .08);
}

.mathlo-gateway-card {
  display: grid;
  grid-template-columns: minmax(220px, 1.15fr) minmax(160px, .75fr) minmax(160px, .75fr) auto;
  gap: 14px;
  align-items: end;
  padding: 18px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: #ffffff;
}

.mathlo-teacher-gateway.is-authenticated .mathlo-gateway-card {
  border-color: #bbf7d0;
  background: linear-gradient(135deg, #f0fdf4, #ffffff);
}

.mathlo-gateway-card strong {
  display: block;
  color: #0f172a;
  font-size: 18px;
  font-weight: 1000;
}

.mathlo-gateway-card span {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.55;
}

.mathlo-gateway-card label,
.mathlo-student-form label {
  display: block;
}

.mathlo-gateway-card input,
.mathlo-student-form input {
  width: 100%;
  height: 42px;
  box-sizing: border-box;
  border: 2px solid #dbeafe;
  border-radius: 12px;
  padding: 0 12px;
  color: #0f172a;
  background: #f8fafc;
  font-family: inherit;
  font-size: 14px;
  font-weight: 900;
}

.mathlo-gateway-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.mathlo-gateway-actions button,
.mathlo-student-form button {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  padding: 0 16px;
  color: #ffffff;
  background: linear-gradient(135deg, #4f46e5, #2563eb);
  font-family: inherit;
  font-weight: 1000;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(79, 70, 229, .22);
}

.mathlo-gateway-actions button[hidden] {
  display: none !important;
}

.mathlo-dashboard-shell {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.mathlo-dashboard-card,
.mathlo-student-manager {
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: #ffffff;
  padding: 18px;
}

.mathlo-dashboard-card p,
.mathlo-student-manager p {
  margin: 0 0 7px;
  color: #4f46e5;
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: .12em;
}

.mathlo-dashboard-card strong,
.mathlo-student-manager h3 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  font-weight: 1000;
}

.mathlo-dashboard-card span,
.mathlo-student-manager span {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.55;
}

.mathlo-student-manager {
  margin-bottom: 16px;
}

.mathlo-student-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 110px auto;
  gap: 10px;
  align-items: end;
  margin-top: 14px;
}

.mathlo-student-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.mathlo-student-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 13px 14px;
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.mathlo-student-chip {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}

.mathlo-student-chip strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 1000;
}

.mathlo-student-chip span {
  width: fit-content;
  margin: 0;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 13px;
  font-weight: 1000;
  font-variant-numeric: tabular-nums;
}

.mathlo-student-chip em {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.mathlo-rule-lab {
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  border: 1px solid #dbeafe;
  border-radius: 22px;
  padding: 26px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .08);
}

.mathlo-builder {
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(0, 1.1fr);
  gap: 22px;
  align-items: start;
}

.mathlo-control-panel,
.mathlo-preview-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 20px;
}

.mathlo-control-panel label {
  display: block;
  color: #334155;
  font-size: 12px;
  font-weight: 1000;
  margin: 0 0 7px;
}

.mathlo-control-panel select,
.mathlo-control-panel input {
  width: 100%;
  height: 42px;
  box-sizing: border-box;
  border: 2px solid #dbeafe;
  border-radius: 12px;
  padding: 0 12px;
  color: #0f172a;
  background: #f8fafc;
  font-family: inherit;
  font-size: 14px;
  font-weight: 900;
}

.mathlo-field {
  margin-bottom: 14px;
}

.mathlo-field[hidden] {
  display: none !important;
}

.mathlo-field-hint {
  margin: 7px 0 0;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

.mathlo-format-field {
  border: 0;
  padding: 0;
}

.mathlo-format-field[hidden] {
  display: none !important;
}

.mathlo-vertical-column-field {
  border: 0;
  padding: 0;
}

.mathlo-vertical-column-field[hidden] {
  display: none !important;
}

.mathlo-format-field legend {
  display: block;
  color: #334155;
  font-size: 12px;
  font-weight: 1000;
  margin: 0 0 7px;
}

.mathlo-vertical-column-field legend {
  display: block;
  color: #334155;
  font-size: 12px;
  font-weight: 1000;
  margin: 0 0 7px;
}

.mathlo-control-panel .mathlo-format-field {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.mathlo-control-panel .mathlo-vertical-column-field {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.mathlo-control-panel .mathlo-format-field legend {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.mathlo-control-panel .mathlo-vertical-column-field legend {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.mathlo-control-panel .mathlo-format-field .mathlo-radio-option {
  min-height: 42px;
  justify-content: center;
  gap: 7px;
  margin: 0;
  padding: 0 8px;
  text-align: center;
  white-space: nowrap;
}

.mathlo-control-panel .mathlo-format-field .mathlo-radio-option span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.mathlo-control-panel .mathlo-vertical-column-field .mathlo-radio-option {
  min-height: 42px;
  justify-content: center;
  gap: 7px;
  margin: 0;
  padding: 0 8px;
  text-align: center;
  white-space: nowrap;
}

.mathlo-control-panel .mathlo-radio-option {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 8px;
  padding: 0 12px;
  border: 2px solid #dbeafe;
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.mathlo-field[hidden],
.mathlo-radio-option[hidden] {
  display: none !important;
}

.mathlo-check-option {
  min-height: 42px;
  display: flex !important;
  align-items: center;
  gap: 9px;
  margin: 2px 0 14px !important;
  padding: 0 12px;
  border: 2px solid #dbeafe;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  font-size: 14px !important;
  font-weight: 700 !important;
  cursor: pointer;
}

.mathlo-check-option[hidden] {
  display: none !important;
}

.mathlo-check-option input {
  width: 17px;
  height: 17px;
  accent-color: var(--svc-main);
}

.mathlo-layout-mode-field,
.mathlo-visual-mode-field {
  padding-bottom: 8px;
}

.mathlo-layout-mode-field .mathlo-radio-option,
.mathlo-visual-mode-field .mathlo-radio-option {
  min-height: 36px;
  margin-bottom: 7px;
}

.mathlo-radio-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--svc-main);
}

.mathlo-generate-btn {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--svc-main), var(--svc-main-2));
  font-family: inherit;
  font-size: 15px;
  font-weight: 1000;
  cursor: pointer;
  box-shadow: 0 12px 26px var(--svc-shadow);
}

.mathlo-print-btn {
  width: 100%;
  min-height: 44px;
  margin-top: 10px;
  border: 2px solid #bfdbfe;
  border-radius: 14px;
  color: #1d4ed8;
  background: #eff6ff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 1000;
  cursor: pointer;
}

.mathlo-print-btn:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}

.mathlo-print-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.mathlo-print-preview-modal.is-open {
  display: flex;
}

.mathlo-print-preview-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .62);
  backdrop-filter: blur(4px);
}

.mathlo-print-preview-dialog {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #dbeafe;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .34);
}

.mathlo-print-preview-header,
.mathlo-print-preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}

.mathlo-print-preview-footer {
  justify-content: flex-end;
  border-top: 1px solid #e2e8f0;
  border-bottom: 0;
}

.mathlo-print-preview-header p {
  margin: 0 0 4px;
  color: #2563eb;
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: .18em;
}

.mathlo-print-preview-header h2 {
  margin: 0;
  color: #0f172a;
  font-size: 22px;
  font-weight: 1000;
}

.mathlo-print-preview-header span {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.mathlo-print-preview-close,
.mathlo-preview-secondary,
.mathlo-preview-primary {
  border: 0;
  font-family: inherit;
  font-weight: 1000;
  cursor: pointer;
}

.mathlo-print-preview-close {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #475569;
  background: #f1f5f9;
  font-size: 17px;
}

.mathlo-print-preview-body {
  min-height: 0;
  overflow: auto;
  background: #e8edf5;
}

.mathlo-a4-preview-stage {
  min-width: 840px;
  padding: 28px;
  display: flex;
  justify-content: center;
}

.mathlo-a4-preview-page {
  width: 794px;
  min-height: 1123px;
  box-sizing: border-box;
  padding: 56px;
  display: flex;
  flex-direction: column;
  position: relative;
  background: #ffffff;
  color: #000000;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .22);
}

.mathlo-print-area {
  position: relative;
}

.mathlo-registration-marks {
  pointer-events: none;
}

.mathlo-registration-mark {
  position: absolute;
  z-index: 5;
  width: 16px;
  height: 16px;
  box-sizing: border-box;
  border-color: #0f172a;
  opacity: .72;
}

.mathlo-registration-mark.is-top-left {
  top: 10px;
  left: 10px;
  border-top: 2px solid #0f172a;
  border-left: 2px solid #0f172a;
}

.mathlo-registration-mark.is-top-right {
  top: 10px;
  right: 10px;
  border-top: 2px solid #0f172a;
  border-right: 2px solid #0f172a;
}

.mathlo-registration-mark.is-bottom-left {
  bottom: 10px;
  left: 10px;
  border-bottom: 2px solid #0f172a;
  border-left: 2px solid #0f172a;
}

.mathlo-registration-mark.is-bottom-right {
  right: 10px;
  bottom: 10px;
  border-right: 2px solid #0f172a;
  border-bottom: 2px solid #0f172a;
}

.mathlo-a4-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 2px solid #111827;
}

.mathlo-a4-preview-head strong {
  display: block;
  color: #000000;
  font-size: 22px;
  font-weight: 700;
}

.mathlo-a4-preview-head span {
  display: block;
  margin-top: 5px;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
}

.mathlo-a4-preview-idbox,
.mathlo-print-sheet-idbox {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.mathlo-a4-preview-head em,
.mathlo-print-sheet-idbox em {
  min-width: 150px;
  color: #111827;
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

.mathlo-unit-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  padding: 0 10px;
  color: #3730a3;
  background: #eef2ff;
  font-size: 12px;
  font-weight: 600;
  font-family: "Inter", "Noto Sans KR", sans-serif;
  white-space: nowrap;
}

.mathlo-a4-preview-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 54px;
  row-gap: 16px;
  align-items: start;
}

.mathlo-a4-preview-list.mathlo-print-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 22px;
}

.mathlo-a4-preview-list.mathlo-vertical-cols-3 .mathlo-question-card.is-vertical {
  min-height: 76px;
}

.mathlo-a4-preview-list.mathlo-vertical-cols-3 .mathlo-vertical-sum {
  min-width: 92px;
  font-size: 19px;
}

.mathlo-a4-preview-list .mathlo-question-card {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.mathlo-a4-preview-list .mathlo-question-card.is-vertical {
  min-height: 92px;
}

.mathlo-a4-preview-list .mathlo-question-top {
  margin-bottom: 6px;
}

.mathlo-a4-preview-list .mathlo-question-top strong,
.mathlo-a4-preview-list .mathlo-question-top span {
  color: #000000;
}

.mathlo-a4-preview-list .mathlo-question-text {
  color: #000000;
  font-size: 20px;
  font-weight: 600;
}

.mathlo-a4-preview-list .mathlo-horizontal-question {
  gap: 12px;
}

.mathlo-a4-preview-list .mathlo-answer-blank {
  width: 96px;
  height: 34px;
  border: 2px solid #111827;
  border-radius: 6px;
}

.mathlo-a4-preview-list .mathlo-question-card.is-geometry {
  min-height: 86px;
}

.mathlo-a4-preview-list .mathlo-geometry-question {
  gap: 14px;
}

.mathlo-a4-preview-list .mathlo-geometry-board {
  --mathlo-shape-fill: #ffffff;
  width: 72px;
  height: 58px;
  flex-basis: 72px;
  border-radius: 10px;
  background: transparent;
}

.mathlo-a4-preview-list .mathlo-shape-rectangle {
  width: 56px;
  height: 40px;
}

.mathlo-a4-preview-list .mathlo-shape-square {
  width: 46px;
  height: 46px;
}

.mathlo-a4-preview-list .mathlo-shape-triangle,
.mathlo-a4-preview-list .mathlo-shape-right-triangle,
.mathlo-a4-preview-list .mathlo-shape-pentagon {
  width: 52px;
  height: 48px;
}

.mathlo-a4-preview-list .mathlo-question-card.is-fraction {
  min-height: 112px;
}

.mathlo-a4-preview-list .mathlo-fraction-question {
  gap: 14px;
}

.mathlo-a4-preview-list .mathlo-fraction-board {
  flex-basis: 154px;
  gap: 8px;
  padding: 8px;
  background: transparent;
}

.mathlo-a4-preview-list .mathlo-fraction-bar {
  width: 108px;
  height: 26px;
}

.mathlo-a4-preview-list .mathlo-stacked-fraction {
  font-size: 14px;
}

.mathlo-a4-preview-list .mathlo-fraction-prompt {
  font-size: 13px;
}

.mathlo-a4-preview-list .mathlo-fraction-symbol-blank {
  width: 48px;
  height: 30px;
}

.mathlo-a4-preview-list .mathlo-question-card.is-decimal {
  min-height: 106px;
}

.mathlo-a4-preview-list .mathlo-decimal-question {
  gap: 10px;
}

.mathlo-a4-preview-list .mathlo-decimal-board {
  flex-basis: 132px;
  gap: 7px;
  padding: 7px;
  background: transparent;
}

.mathlo-a4-preview-list .mathlo-decimal-bar {
  width: 92px;
  height: 16px;
}

.mathlo-a4-preview-list .mathlo-decimal-bar-value {
  min-width: 28px;
  font-size: 13px;
}

.mathlo-a4-preview-list .mathlo-decimal-symbol-box {
  width: 38px;
  height: 28px;
}

.mathlo-a4-preview-list .mathlo-decimal-prompt {
  margin-bottom: 6px;
  font-size: 11px;
  line-height: 1.25;
}

.mathlo-a4-preview-list .mathlo-decimal-expression {
  flex-wrap: nowrap;
  gap: 6px;
  font-size: 18px;
  white-space: nowrap;
}

.mathlo-a4-preview-list .mathlo-decimal-o-label {
  font-size: 12px;
}

.mathlo-a4-preview-list .mathlo-question-card.is-length {
  min-height: 128px;
}

.mathlo-a4-preview-list .mathlo-length-question {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.mathlo-a4-preview-list .mathlo-ruler-board {
  flex: 0 0 auto;
  width: 300px;
}

.mathlo-a4-preview-list .mathlo-ruler-track {
  width: 300px;
  height: 40px;
}

.mathlo-a4-preview-list .mathlo-ruler-caption {
  font-size: 11px;
}

.mathlo-a4-preview-list .mathlo-vertical-sum {
  min-width: 118px;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: #000000;
  font-size: 22px;
  font-weight: 600;
}

.mathlo-a4-preview-list .mathlo-sum-rule {
  border-bottom: 2px solid #111827;
}

.mathlo-a4-preview-list .mathlo-question-card.is-unit-vertical {
  min-height: 132px;
}

.mathlo-a4-preview-list .mathlo-unit-vertical {
  min-width: 168px;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: #000000;
  font-size: 20px;
}

.mathlo-a4-preview-list .mathlo-unit-row {
  grid-template-columns: 28px repeat(2, 54px);
  min-height: 26px;
}

.mathlo-a4-preview-list .mathlo-unit-row.is-mm-only,
.mathlo-a4-preview-list .mathlo-unit-row.mathlo-unit-header.is-mm-only {
  grid-template-columns: 28px 88px;
}

.mathlo-a4-preview-list .mathlo-time-vertical {
  min-width: 172px;
}

.mathlo-a4-preview-list .mathlo-time-line {
  min-height: 27px;
  padding-left: 28px;
  gap: 7px;
}

.mathlo-a4-preview-list .mathlo-time-hour {
  width: 48px;
}

.mathlo-a4-preview-list .mathlo-time-minute {
  width: 64px;
}

.mathlo-a4-preview-list .mathlo-unit-scratch-space {
  min-height: 34px;
}

.mathlo-a4-preview-list .mathlo-unit-answer-blank {
  width: 72px;
  height: 28px;
}

.mathlo-a4-preview-list .mathlo-division-long {
  width: 100%;
  min-height: 168px;
  margin: 0;
  background: transparent;
  color: #000000;
}

.mathlo-a4-preview-list .mathlo-division-css-stage {
  min-width: 148px;
  font-size: 24px;
}

.mathlo-a4-preview-list .mathlo-division-dividend-roof,
.mathlo-a4-preview-list .mathlo-division-quotient-slot {
  min-width: 68px;
}

.mathlo-a4-preview-list .mathlo-division-scratch-space {
  min-height: 56px;
}

.mathlo-a4-preview-list .mathlo-check-formula {
  font-size: 12px;
}

.mathlo-a4-preview-list .mathlo-check-box {
  width: 50px;
  height: 22px;
}

.mathlo-print-sheet-head {
  display: none;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 6mm;
  padding-bottom: 3mm;
  border-bottom: 2px solid #111827;
}

.mathlo-print-sheet-titlebox strong {
  display: block;
  color: #000000;
  font-size: 18pt;
  font-weight: 700;
}

.mathlo-print-sheet-titlebox span {
  display: block;
  margin-top: 1.5mm;
  color: #475569;
  font-size: 9.5pt;
  font-weight: 600;
}

.mathlo-print-sheet-footer {
  display: none;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  box-sizing: border-box;
  border-top: 1px solid #e2e8f0;
  padding-top: 12px;
  margin-top: 18px;
  gap: 18px;
  break-inside: avoid;
  page-break-inside: avoid;
}

.mathlo-a4-preview-footer {
  display: flex;
  margin-top: auto;
}

.mathlo-print-brand {
  min-width: 0;
}

.mathlo-custom-print-brand {
  display: none;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mathlo-custom-print-logo {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  color: #1e3a8a;
  background: #eff6ff;
  font-size: 15px;
  font-weight: 1000;
}

.mathlo-custom-print-brand strong {
  display: block;
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
}

.mathlo-custom-print-brand span {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
}

.mathlo-white-label-enabled .mathlo-custom-print-brand {
  display: flex;
}

.mathlo-print-page-number {
  display: none;
  flex: 1 0 auto;
  color: #64748b;
  font-family: "Inter", "Noto Sans KR", sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  letter-spacing: .04em;
}

.mathlo-source-hidden .mathlo-print-source {
  display: none !important;
}

.mathlo-source-hidden.mathlo-layout-test .mathlo-print-sheet-footer {
  display: none !important;
}

.mathlo-white-label-enabled.mathlo-source-hidden.mathlo-layout-test .mathlo-print-sheet-footer {
  display: flex !important;
}

.mathlo-layout-workbook .mathlo-print-page-number {
  display: block;
}

.mathlo-source-hidden.mathlo-layout-workbook .mathlo-print-sheet-footer {
  justify-content: center;
}

.mathlo-print-brand strong {
  display: block;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.mathlo-print-brand span {
  display: block;
  margin-top: 5px;
  color: #94a3b8;
  font-family: "Inter", "Noto Sans KR", sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .02em;
}

.mathlo-qr-placeholder {
  width: 72px;
  height: 72px;
  box-sizing: border-box;
  flex: 0 0 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 2px dashed #94a3b8;
  border-radius: 10px;
  background: #f8fafc;
  color: #94a3b8;
  font-family: "Inter", "Noto Sans KR", sans-serif;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
  user-select: none;
  break-inside: avoid;
  page-break-inside: avoid;
}

.mathlo-qr-placeholder strong {
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
}

.mathlo-mini-omr-host {
  flex: 0 0 138px;
  min-width: 138px;
}

.mathlo-mini-omr-host[hidden] {
  display: none !important;
}

.mathlo-mini-omr {
  width: 138px;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font-family: "Inter", "Noto Sans KR", sans-serif;
  break-inside: avoid;
  page-break-inside: avoid;
}

.mathlo-mini-omr-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 6px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.mathlo-mini-omr-title strong {
  color: #0f172a;
  font-size: 10px;
  font-weight: 800;
}

.mathlo-mini-omr-title span {
  color: #64748b;
  font-size: 8px;
  font-weight: 700;
}

.mathlo-mini-omr-rows {
  display: grid;
  gap: 2px;
  padding: 5px 6px;
}

.mathlo-mini-omr-row {
  display: grid;
  grid-template-columns: 18px minmax(38px, 1fr) 26px;
  align-items: center;
  gap: 4px;
  min-height: 17px;
  padding: 1px 0;
  border-bottom: 1px solid #eef2f7;
  font-size: 8px;
  font-weight: 700;
}

.mathlo-mini-omr-row:last-child {
  border-bottom: 0;
}

.mathlo-mini-omr-no {
  text-align: right;
}

.mathlo-mini-omr-answer {
  display: block;
  height: 14px;
  box-sizing: border-box;
  border: 1px solid #94a3b8;
  border-radius: 3px;
  background: #ffffff;
}

.mathlo-mini-omr-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 13px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: #64748b;
  font-size: 7px;
  letter-spacing: 0;
}

.mathlo-workbook-omr-note {
  position: relative;
  box-sizing: border-box;
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 34px 30px 28px;
  border: 1px solid #dbe4ee;
  border-radius: 22px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 18px 46px rgba(15, 23, 42, .10);
  break-inside: avoid;
  page-break-inside: avoid;
}

.mathlo-workbook-anchor {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #0f172a;
}

.mathlo-workbook-anchor.is-top-left { top: 12px; left: 12px; }
.mathlo-workbook-anchor.is-top-right { top: 12px; right: 12px; }
.mathlo-workbook-anchor.is-bottom-left { bottom: 12px; left: 12px; }
.mathlo-workbook-anchor.is-bottom-right { bottom: 12px; right: 12px; }

.mathlo-workbook-omr-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 2px solid #111827;
}

.mathlo-workbook-omr-head p {
  margin: 0 0 6px;
  color: #2563eb;
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: .18em;
}

.mathlo-workbook-omr-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 1000;
}

.mathlo-workbook-omr-head span,
.mathlo-workbook-omr-meta span,
.mathlo-workbook-omr-footer span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.mathlo-workbook-omr-meta {
  display: grid;
  gap: 6px;
  min-width: 180px;
  text-align: right;
}

.mathlo-workbook-omr-meta strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
}

.mathlo-workbook-omr-grid {
  display: grid;
  grid-template-columns: repeat(var(--omr-columns, 4), minmax(0, 1fr));
  gap: 10px;
  padding: 18px 0;
}

.mathlo-workbook-omr-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 58px;
  padding: 9px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  break-inside: avoid;
  page-break-inside: avoid;
}

.mathlo-workbook-omr-item strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: #0f172a;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 1000;
}

.mathlo-workbook-omr-roi {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.6px solid #111827;
  border-radius: 8px;
  background: #ffffff;
}

.mathlo-workbook-omr-answer-line {
  width: 72%;
  border-bottom: 1.2px solid #111827;
}

.mathlo-workbook-omr-item em {
  grid-column: 1 / -1;
  color: #64748b;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.35;
}

.mathlo-workbook-omr-item.is-free-writing {
  grid-column: 1 / -1;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: stretch;
  min-height: calc(var(--free-writing-height, 72mm) + 20px);
}

.mathlo-workbook-omr-roi.is-free-writing-zone {
  min-height: var(--free-writing-height, 72mm);
  align-items: stretch;
  justify-content: stretch;
  border-style: solid;
  background: #ffffff;
}

.mathlo-free-writing-zone {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  min-height: var(--free-writing-height, 72mm);
  padding: 10px;
}

.mathlo-free-writing-number {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 8px;
  border: 1px solid #94a3b8;
  border-radius: 8px;
  background: #f8fafc;
}

.mathlo-free-writing-number small {
  color: #64748b;
  font-size: 9px;
  font-weight: 900;
}

.mathlo-free-writing-number b {
  display: block;
  height: 24px;
  border-bottom: 1.5px solid #111827;
}

.mathlo-free-writing-body {
  display: grid;
  align-content: stretch;
  gap: 0;
}

.mathlo-free-writing-body span {
  display: block;
  min-height: 10px;
  border-bottom: 1px dashed #cbd5e1;
}

.mathlo-on-demand-free-writing-zone {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  margin: 10px 0 14px;
  padding: 12px;
  border: 1.8px solid #111827;
  border-radius: 14px;
  background: #ffffff;
  break-inside: avoid;
  page-break-inside: avoid;
}

.mathlo-on-demand-free-writing-zone header {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #cbd5e1;
}

.mathlo-on-demand-free-writing-zone header strong {
  color: #0f172a;
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: .1em;
}

.mathlo-on-demand-free-writing-zone header span,
.mathlo-on-demand-free-writing-zone footer span {
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
}

.mathlo-on-demand-question-field {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  border: 1px solid #94a3b8;
  border-radius: 10px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 16px;
  font-weight: 1000;
}

.mathlo-on-demand-question-field b {
  display: inline-block;
  width: 54px;
  height: 24px;
  border-bottom: 1.8px solid #111827;
}

.mathlo-on-demand-writing-body {
  min-height: var(--on-demand-height, 78mm);
  display: grid;
  align-content: stretch;
}

.mathlo-on-demand-writing-body span {
  min-height: 11px;
  border-bottom: 1px dashed #cbd5e1;
}

.mathlo-on-demand-free-writing-zone footer {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
}

.mathlo-workbook-omr-mini-grid {
  position: relative;
  width: 100%;
  height: 42px;
  display: grid;
  border: 1px solid #111827;
  background: #ffffff;
}

.mathlo-workbook-omr-mini-grid span {
  min-width: 0;
  min-height: 0;
  border-right: 1px solid #cbd5e1;
  border-bottom: 1px solid #cbd5e1;
}

.mathlo-workbook-omr-mini-grid.is-cross::before,
.mathlo-workbook-omr-mini-grid.is-cross::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 1px;
  height: 100%;
  background: #111827;
}

.mathlo-workbook-omr-mini-grid.is-cross::after {
  left: 0;
  top: 50%;
  width: 100%;
  height: 1px;
}

.mathlo-workbook-omr-appendix {
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px dashed #94a3b8;
  break-before: auto;
}

.mathlo-workbook-omr-appendix h3 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 15px;
  font-weight: 1000;
}

.mathlo-workbook-omr-appendix-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.mathlo-workbook-omr-appendix-card {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
}

.mathlo-workbook-omr-appendix-card strong {
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 1000;
}

.mathlo-workbook-omr-appendix-card span {
  color: #475569;
  font-size: 10px;
  font-weight: 700;
}

.mathlo-workbook-omr-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.mathlo-whole-workbook-note {
  display: grid;
  gap: 28px;
  color: #0f172a;
}

.mathlo-whole-cover,
.mathlo-whole-note-page,
.mathlo-whole-appendix-page {
  position: relative;
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 28px;
  border: 1px solid #dbe4ee;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(15, 23, 42, .10);
  break-inside: avoid;
  page-break-inside: avoid;
}

.mathlo-whole-cover-card {
  min-height: 420px;
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 48px;
  border: 2px solid #111827;
  border-radius: 22px;
  background: linear-gradient(135deg, #eef2ff, #ffffff 54%, #f8fafc);
}

.mathlo-whole-cover-card p,
.mathlo-whole-appendix header p {
  margin: 0;
  color: #2563eb;
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: .2em;
}

.mathlo-whole-cover-card h1,
.mathlo-whole-appendix header h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.05;
  font-weight: 1000;
  letter-spacing: 0;
}

.mathlo-whole-cover-card > span,
.mathlo-whole-appendix header span {
  color: #475569;
  font-size: 15px;
  font-weight: 800;
}

.mathlo-whole-cover-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 0;
}

.mathlo-whole-cover-card div {
  padding: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: rgba(255, 255, 255, .84);
}

.mathlo-whole-cover-card dt {
  color: #64748b;
  font-size: 10px;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.mathlo-whole-cover-card dd {
  margin: 4px 0 0;
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
}

.mathlo-page-specific-anchor {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 7px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
}

.mathlo-page-specific-anchor-meta {
  display: grid;
  gap: 2px;
}

.mathlo-page-specific-anchor-meta strong {
  color: #0f172a;
  font-size: 9px;
  font-weight: 1000;
  letter-spacing: .04em;
}

.mathlo-page-specific-anchor-meta span {
  color: #64748b;
  font-size: 9px;
  font-weight: 800;
}

.mathlo-page-specific-anchor-grid {
  display: grid;
  width: 54px;
  height: 54px;
  padding: 3px;
  gap: 1px;
  border: 1px solid #111827;
  background: #ffffff;
}

.mathlo-page-specific-anchor-grid span {
  background: #ffffff;
}

.mathlo-page-specific-anchor-grid span.is-on {
  background: #111827;
}

.mathlo-whole-auto-header {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(260px, 2fr) minmax(120px, auto);
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border: 1.6px solid #111827;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  break-inside: avoid;
  page-break-inside: avoid;
}

.mathlo-whole-auto-header strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: #0f172a;
  font-size: 13px;
  font-weight: 1000;
  letter-spacing: .08em;
}

.mathlo-whole-auto-header strong span {
  width: 18px;
  height: 18px;
  border: 2px solid #2563eb;
  border-radius: 5px;
  background:
    linear-gradient(to top, #2563eb 0 44%, transparent 44%) 3px 6px / 3px 9px no-repeat,
    linear-gradient(to top, #2563eb 0 70%, transparent 70%) 8px 3px / 3px 12px no-repeat,
    linear-gradient(to top, #2563eb 0 56%, transparent 56%) 13px 5px / 3px 10px no-repeat;
}

.mathlo-whole-auto-header em {
  min-width: 0;
  color: #475569;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mathlo-whole-auto-header b {
  color: #0f172a;
  font-weight: 1000;
}

.mathlo-whole-appendix {
  display: grid;
  gap: 18px;
}

.mathlo-whole-appendix header {
  display: grid;
  gap: 6px;
  padding-bottom: 14px;
  border-bottom: 2px solid #111827;
}

.mathlo-student-answer-input {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #ffffff;
}

.mathlo-fraction-input-shell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 78px;
}

.mathlo-fraction-input-shell input {
  width: 56px;
  height: 42px;
  box-sizing: border-box;
  border: 2px solid #6366f1;
  border-radius: 10px;
  color: #0f172a;
  font: 700 22px/1 "Inter", "Noto Sans KR", sans-serif;
  text-align: center;
}

.mathlo-fraction-stack-input {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.mathlo-fraction-stack-input span {
  width: 64px;
  border-top: 2px solid #0f172a;
}

.mathlo-virtual-keypad {
  display: grid;
  gap: 8px;
}

.mathlo-virtual-keypad-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mathlo-virtual-keypad button {
  min-height: 46px;
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  background: #eef2ff;
  color: #312e81;
  font-size: 18px;
  font-weight: 800;
}

.mathlo-preview-secondary,
.mathlo-preview-primary {
  min-height: 42px;
  border-radius: 12px;
  padding: 0 18px;
  font-size: 14px;
}

.mathlo-preview-secondary {
  color: #475569;
  background: #f1f5f9;
}

.mathlo-preview-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  box-shadow: 0 12px 24px rgba(37, 99, 235, .24);
}

.mathlo-rule-title {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 1000;
}

.mathlo-rule-meta {
  margin: 0 0 12px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.mathlo-rule-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.mathlo-rule-tags span {
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 5px 9px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 12px;
  font-weight: 900;
}

.mathlo-generate-status {
  margin: 16px 0 0;
  color: #2563eb;
  font-size: 13px;
  font-weight: 1000;
}

.mathlo-worksheet-list {
  display: grid;
  gap: 12px;
  max-height: 560px;
  overflow: auto;
  padding-right: 4px;
}

.mathlo-concept-block-host:empty {
  display: none;
}

.mathlo-concept-block {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, .75fr);
  gap: 18px;
  align-items: center;
  margin: 0 0 18px;
  padding: 22px;
  border: 1px solid #c7d2fe;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
  color: #0f172a;
  overflow: hidden;
}

.mathlo-concept-eyebrow {
  margin: 0 0 8px;
  color: #4f46e5;
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: .08em;
}

.mathlo-concept-block h2 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 1000;
  letter-spacing: 0;
}

.mathlo-concept-block p,
.mathlo-concept-block li {
  color: #334155;
  font-size: 15px;
  line-height: 1.65;
  font-weight: 700;
  word-break: keep-all;
}

.mathlo-concept-block p {
  margin: 8px 0;
}

.mathlo-concept-block ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

.mathlo-concept-formula {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.45;
  word-break: keep-all;
}

.mathlo-concept-visual {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
}

.mathlo-concept-visual .mathlo-number-line-svg,
.mathlo-concept-visual .mathlo-chart-svg {
  width: 100%;
  max-width: 360px;
}

.mathlo-concept-visual .mathlo-ruler-board {
  transform: scale(.82);
  transform-origin: center;
}

.mathlo-concept-blank {
  display: inline-block;
  width: var(--blank-ch, 8ch);
  min-width: 44px;
  height: 1.05em;
  margin: 0 .14em;
  border-bottom: 2px solid #1d4ed8;
  border-radius: 3px;
  background: rgba(219, 234, 254, .6);
  vertical-align: -0.12em;
}

.mathlo-a4-preview-page .mathlo-concept-block {
  grid-template-columns: 1fr;
  margin-bottom: 22px;
  box-shadow: none;
  border-color: #cbd5e1;
}

.mathlo-a4-preview-page .mathlo-concept-block h2 {
  font-size: 21px;
}

.mathlo-a4-preview-page .mathlo-concept-block p,
.mathlo-a4-preview-page .mathlo-concept-block li {
  font-size: 13px;
}

.mathlo-empty {
  border: 1px dashed #bfdbfe;
  border-radius: 16px;
  padding: 24px;
  color: #64748b;
  background: #eff6ff;
  text-align: center;
  font-size: 14px;
  font-weight: 900;
}

.mathlo-question-card {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  background: #ffffff;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.mathlo-question-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.mathlo-question-top strong {
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
}

.mathlo-question-top .mathlo-question-score {
  margin-left: auto;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.mathlo-layout-workbook .mathlo-question-top strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  color: #3730a3;
  background: #eef2ff;
  font-size: 14px;
  font-weight: 900;
}

.mathlo-question-top span {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 900;
}

.mathlo-workbook-lines {
  display: none;
  grid-template-columns: 1fr;
  gap: 7px;
  margin-top: 12px;
}

.mathlo-solution-lines {
  display: grid;
}

.mathlo-workbook-lines span {
  height: 12px;
  border-bottom: 1px dashed #cbd5e1;
}

.mathlo-question-card.mathlo-solution-none .mathlo-solution-lines {
  display: none;
}

.mathlo-question-card.mathlo-solution-normal .mathlo-solution-lines {
  gap: 8px;
}

.mathlo-question-card.mathlo-solution-wide .mathlo-solution-lines,
.mathlo-question-card.mathlo-solution-extra .mathlo-solution-lines {
  gap: 9px;
  margin-top: 14px;
}

.mathlo-question-card.mathlo-solution-normal .mathlo-solution-lines span {
  height: 14px;
}

.mathlo-question-card.mathlo-solution-wide .mathlo-solution-lines span {
  height: 16px;
}

.mathlo-question-card.mathlo-solution-extra .mathlo-solution-lines span {
  height: 18px;
}

.mathlo-layout-workbook .mathlo-workbook-lines {
  display: grid;
}

.mathlo-layout-workbook .mathlo-question-card {
  border-color: #dbeafe;
  background: #ffffff;
}

.mathlo-question-text {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 19px;
  font-weight: 700;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: keep-all;
  white-space: pre-line;
}

.mathlo-horizontal-question {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  line-height: 1.45;
}

.mathlo-answer-blank {
  display: inline-block;
  width: 96px;
  height: 34px;
  box-sizing: border-box;
  border: 2px solid #bfdbfe;
  border-radius: 9px;
  background: #ffffff;
  vertical-align: middle;
}

.mathlo-geometry-question {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 10px;
}

.mathlo-geometry-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.mathlo-geometry-copy .mathlo-horizontal-question {
  margin: 0;
}

.mathlo-geometry-board {
  --mathlo-shape-fill: #f8fafc;
  width: 84px;
  height: 70px;
  box-sizing: border-box;
  display: flex;
  flex: 0 0 84px;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}

.mathlo-geometry-shape {
  display: block;
  box-sizing: border-box;
  position: relative;
}

.mathlo-shape-rectangle {
  width: 64px;
  height: 46px;
  border: 3px solid #020617;
  border-radius: 3px;
  background: var(--mathlo-shape-fill);
}

.mathlo-shape-square {
  width: 52px;
  height: 52px;
  border: 3px solid #020617;
  border-radius: 3px;
  background: var(--mathlo-shape-fill);
}

.mathlo-shape-triangle,
.mathlo-shape-right-triangle,
.mathlo-shape-pentagon {
  width: 60px;
  height: 54px;
  background: #020617;
}

.mathlo-shape-triangle::after,
.mathlo-shape-right-triangle::after,
.mathlo-shape-pentagon::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: var(--mathlo-shape-fill);
  clip-path: inherit;
}

.mathlo-shape-triangle {
  clip-path: polygon(50% 4%, 7% 93%, 93% 93%);
}

.mathlo-shape-right-triangle {
  clip-path: polygon(9% 9%, 9% 92%, 92% 92%);
}

.mathlo-shape-pentagon {
  clip-path: polygon(50% 4%, 94% 38%, 78% 94%, 22% 94%, 6% 38%);
}

.mathlo-matrix-grid-wrap {
  display: inline-flex;
  align-items: stretch;
  justify-content: center;
  gap: 6px;
  color: #0f172a;
  font-family: "Inter", "Noto Sans KR", sans-serif;
  font-weight: 700;
  line-height: 1;
}

.mathlo-matrix-grid-wrap.is-compact {
  gap: 4px;
  font-size: 14px;
}

.mathlo-matrix-bracket {
  width: 8px;
  min-height: 100%;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.mathlo-matrix-bracket.is-left {
  border-left: 2px solid currentColor;
}

.mathlo-matrix-bracket.is-right {
  border-right: 2px solid currentColor;
}

.mathlo-matrix-grid {
  display: grid;
  grid-template-columns: repeat(var(--mathlo-matrix-cols, 2), minmax(26px, auto));
  gap: 8px 12px;
  align-items: center;
  justify-items: center;
  padding: 6px 2px;
}

.mathlo-matrix-grid span {
  min-width: 22px;
  text-align: center;
  white-space: nowrap;
}

.mathlo-geometry-svg {
  width: 160px;
  max-width: 100%;
  height: auto;
  color: #0f172a;
  overflow: visible;
}

.mathlo-geometry-svg.is-compact {
  width: 112px;
}

.mathlo-geometry-svg rect,
.mathlo-geometry-svg circle,
.mathlo-geometry-svg polygon,
.mathlo-geometry-svg path {
  fill: #ffffff;
  stroke: #0f172a;
  stroke-width: 3;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.mathlo-geometry-svg .guide {
  fill: none;
  stroke: #64748b;
  stroke-width: 2;
  stroke-dasharray: 4 3;
}

.mathlo-geometry-svg text {
  fill: #334155;
  font-size: 10px;
  font-weight: 700;
  font-family: "Inter", "Noto Sans KR", sans-serif;
}

.mathlo-shape-transform-svg {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
  color: #0f172a;
  overflow: visible;
}

.mathlo-shape-transform-svg.is-compact {
  width: 160px;
}

.mathlo-transform-grid-line {
  fill: none;
  stroke: #e2e8f0;
  stroke-width: 1;
}

.mathlo-shape-transform-svg polygon {
  vector-effect: non-scaling-stroke;
  stroke: #0f172a;
  stroke-width: 3;
  stroke-linejoin: round;
}

.mathlo-transform-before polygon {
  fill: rgba(148, 163, 184, .16);
  stroke-dasharray: 5 4;
}

.mathlo-transform-after polygon {
  fill: rgba(99, 102, 241, .16);
}

.mathlo-transform-path {
  fill: none;
  stroke: #4f46e5;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 5 4;
}

.mathlo-transform-arrow-head {
  fill: #4f46e5;
  stroke: none;
}

.mathlo-shape-transform-svg text {
  fill: #0f172a;
  font-family: "Inter", "Noto Sans KR", sans-serif;
  font-size: 11px;
  font-weight: 900;
  paint-order: stroke;
  stroke: #ffffff;
  stroke-width: 3px;
  stroke-linejoin: round;
}

.mathlo-transform-symbol {
  fill: #4f46e5;
  font-size: 10px;
  letter-spacing: 0;
}

.mathlo-geometry-svg.has-internal-grid rect,
.mathlo-geometry-svg.has-internal-grid circle,
.mathlo-geometry-svg.has-internal-grid polygon,
.mathlo-geometry-svg.has-internal-grid path:not(.guide) {
  fill: url("#mathlo-internal-grid-pattern");
}

.mathlo-number-line-svg,
.mathlo-clock-svg,
.mathlo-isometric-svg,
.mathlo-solid-svg {
  display: block;
  max-width: 100%;
  color: #0f172a;
  overflow: visible;
}

.mathlo-number-line-axis,
.mathlo-number-line-tick line {
  stroke: #0f172a;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.mathlo-number-line-arrow {
  fill: #0f172a;
}

.mathlo-number-line-condition line {
  stroke: #4f46e5;
  stroke-width: 5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.mathlo-number-line-condition circle {
  stroke: #0f172a;
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
}

.mathlo-number-line-hatch {
  fill: none;
  stroke: #4f46e5;
  stroke-width: 1.4;
  opacity: .6;
  vector-effect: non-scaling-stroke;
}

.mathlo-number-line-tick text {
  fill: #334155;
  font-size: 12px;
  font-weight: 700;
  font-family: "Inter", "Noto Sans KR", sans-serif;
}

.mathlo-clock-face {
  fill: #ffffff;
  stroke: #0f172a;
  stroke-width: 3;
}

.mathlo-clock-marks line {
  stroke: #0f172a;
  stroke-width: 2;
  stroke-linecap: round;
}

.mathlo-clock-hour-hand,
.mathlo-clock-minute-hand {
  stroke: #0f172a;
  stroke-linecap: round;
}

.mathlo-clock-hour-hand {
  stroke-width: 5;
}

.mathlo-clock-minute-hand {
  stroke-width: 3;
}

.mathlo-clock-center {
  fill: #4f46e5;
}

.mathlo-isometric-svg polygon,
.mathlo-isometric-svg path,
.mathlo-solid-svg ellipse,
.mathlo-solid-svg circle,
.mathlo-solid-svg path {
  fill: #ffffff;
  stroke: #0f172a;
  stroke-width: 3;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.mathlo-isometric-svg .top {
  fill: #eef2ff;
}

.mathlo-isometric-svg .left {
  fill: #f8fafc;
}

.mathlo-isometric-svg .right {
  fill: #e0f2fe;
}

.mathlo-isometric-svg .hidden-edge,
.mathlo-solid-svg .hidden-edge,
.mathlo-solid-svg .dimension-axis {
  fill: none;
  stroke: #64748b;
  stroke-dasharray: 5 4;
}

.mathlo-isometric-svg text,
.mathlo-solid-svg text {
  fill: #334155;
  font-size: 12px;
  font-weight: 700;
  font-family: "Inter", "Noto Sans KR", sans-serif;
}

.mathlo-polyhedron-svg .solid-face,
.mathlo-rotational-svg .sphere-body {
  fill: #ffffff;
  stroke: #0f172a;
  stroke-width: 2.5;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.mathlo-polyhedron-svg .face-top {
  fill: #eef2ff;
}

.mathlo-polyhedron-svg .face-side {
  fill: #f8fafc;
}

.mathlo-polyhedron-svg .face-base {
  fill: #e0f2fe;
}

.mathlo-solid-svg .solid-edge,
.mathlo-solid-svg .solid-edges line {
  fill: none;
  stroke: #0f172a;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.mathlo-solid-svg .dimension-labels .dimension-line {
  fill: none;
  stroke: #475569;
  stroke-width: 1.6;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.mathlo-solid-svg .dimension-labels text {
  fill: #334155;
  font-size: 11px;
  font-weight: 900;
  paint-order: stroke;
  stroke: #ffffff;
  stroke-width: 3px;
  stroke-linejoin: round;
}

.mathlo-solid-svg .dimension-arrow-head {
  fill: #475569;
  stroke: none;
}

.mathlo-block-projection {
  display: inline-grid;
  gap: 3px;
  padding: 6px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}

.mathlo-block-projection-row {
  display: flex;
  gap: 3px;
}

.mathlo-block-projection span {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 800;
}

.mathlo-block-projection span.is-filled {
  border-color: #818cf8;
  background: #eef2ff;
}

.mathlo-number-splitting-svg,
.mathlo-ten-bundle-svg {
  display: block;
  max-width: 100%;
  color: #0f172a;
  overflow: visible;
}

.mathlo-number-split-line {
  fill: none;
  stroke: #4f46e5;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.mathlo-number-split-node circle {
  fill: #ffffff;
  stroke: #0f172a;
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
}

.mathlo-number-split-node .value {
  fill: #3730a3;
  font-size: 19px;
  font-weight: 800;
  font-family: "Inter", "Noto Sans KR", sans-serif;
}

.mathlo-number-split-node .caption,
.mathlo-ten-bundle-svg .caption,
.mathlo-ten-bundle-svg .title {
  fill: #475569;
  font-size: 11px;
  font-weight: 700;
  font-family: "Inter", "Noto Sans KR", sans-serif;
}

.mathlo-number-split-node .blank {
  fill: #ffffff;
  stroke: #94a3b8;
  stroke-width: 2;
  stroke-dasharray: 3 3;
}

.mathlo-concrete-object * {
  vector-effect: non-scaling-stroke;
}

.mathlo-ten-bundle-box,
.mathlo-ten-loose-box {
  fill: #ffffff;
  stroke: #818cf8;
  stroke-width: 2;
  stroke-dasharray: 5 4;
  vector-effect: non-scaling-stroke;
}

.mathlo-ten-loose-box {
  stroke: #94a3b8;
}

.mathlo-expression-renderer {
  display: inline-flex;
  align-items: center;
  gap: .15em;
  color: #0f172a;
  font-family: "Inter", "Noto Sans KR", sans-serif;
  font-size: 1.05em;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.mathlo-expression-renderer.is-display {
  display: flex;
  justify-content: center;
  font-size: 24px;
}

.mathlo-expression-renderer sup,
.mathlo-expression-renderer sub {
  font-size: .62em;
  line-height: 0;
}

.mathlo-expression-fraction {
  display: inline-flex;
  min-width: 1.3em;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  vertical-align: middle;
}

.mathlo-expression-fraction i {
  display: block;
  width: 100%;
  min-width: 1.15em;
  border-top: 2px solid currentColor;
  margin: .08em 0;
}

.mathlo-expression-root {
  display: inline-flex;
  align-items: stretch;
  position: relative;
  padding-left: .72em;
}

.mathlo-expression-root::before {
  content: "√";
  position: absolute;
  left: 0;
  bottom: -.03em;
  font-size: 1.25em;
  line-height: 1;
}

.mathlo-expression-root > span {
  display: inline-block;
  border-top: 2px solid currentColor;
  padding: .03em .12em 0 .16em;
}

.mathlo-mixed-fraction-svg {
  display: block;
  max-width: 100%;
  overflow: visible;
}

.mathlo-mixed-fraction-svg circle,
.mathlo-mixed-fraction-svg path,
.mathlo-mixed-fraction-svg rect {
  stroke: #0f172a;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.mathlo-mixed-fraction-shape.is-full circle,
.mathlo-mixed-bar-full,
.mathlo-mixed-fraction-svg .is-filled {
  fill: #818cf8;
}

.mathlo-mixed-fraction-svg .is-empty {
  fill: #ffffff;
}

.mathlo-mixed-fraction-svg .outline {
  fill: none;
  stroke: #0f172a;
  stroke-width: 2.4;
}

.mathlo-mixed-fraction-svg text {
  fill: #334155;
  font-size: 12px;
  font-weight: 800;
  font-family: "Inter", "Noto Sans KR", sans-serif;
}

.mathlo-lshape-svg,
.mathlo-chart-svg {
  display: block;
  max-width: 100%;
  color: #0f172a;
  overflow: visible;
}

.mathlo-lshape-svg text,
.mathlo-chart-svg text {
  fill: #334155;
  font-family: "Inter", "Noto Sans KR", sans-serif;
}

.mathlo-lshape-svg .title,
.mathlo-chart-svg .title {
  font-size: 12px;
  font-weight: 800;
  fill: #0f172a;
}

.mathlo-lshape-svg .number,
.mathlo-lshape-svg .final-number,
.mathlo-lshape-svg .divisor {
  font-family: "Inter", "Noto Sans KR", sans-serif;
  font-size: 16px;
  font-weight: 800;
  fill: #0f172a;
}

.mathlo-lshape-svg .final-number {
  fill: #4f46e5;
}

.mathlo-lshape-svg .final-label,
.mathlo-lshape-svg .answer {
  font-size: 11px;
  font-weight: 800;
  fill: #475569;
}

.mathlo-lshape-svg .l-shape-line,
.mathlo-chart-axis,
.mathlo-chart-tick line {
  fill: none;
  stroke: #0f172a;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.mathlo-chart-tick line {
  stroke: #e2e8f0;
  stroke-width: 1;
}

.mathlo-chart-bar {
  fill: #818cf8;
  stroke: #4338ca;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.mathlo-chart-line {
  fill: none;
  stroke: #4f46e5;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.mathlo-chart-dot {
  fill: #ffffff;
  stroke: #4f46e5;
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
}

.mathlo-chart-label {
  font-size: 11px;
  font-weight: 700;
}

.mathlo-factor-align-table {
  width: 100%;
  max-width: 420px;
  border-collapse: collapse;
  font-family: "Inter", "Noto Sans KR", sans-serif;
  font-size: 13px;
  color: #0f172a;
  background: #ffffff;
}

.mathlo-factor-align-table th,
.mathlo-factor-align-table td {
  border: 1px solid #cbd5e1;
  padding: 7px 9px;
  text-align: center;
  vertical-align: middle;
}

.mathlo-factor-align-table thead th {
  background: #eef2ff;
  color: #3730a3;
  font-weight: 800;
}

.mathlo-factor-align-table tbody th,
.mathlo-factor-align-table tfoot th {
  background: #f8fafc;
  font-weight: 800;
}

.mathlo-factor-align-table tfoot td {
  text-align: left;
  font-weight: 700;
}

.mathlo-fraction-question {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 10px;
}

.mathlo-fraction-board {
  display: flex;
  flex: 0 0 184px;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}

.mathlo-fraction-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mathlo-fraction-bar {
  display: flex;
  width: 128px;
  height: 32px;
  overflow: hidden;
  box-sizing: border-box;
  border: 2px solid #020617;
  border-radius: 4px;
  background: #ffffff;
}

.mathlo-fraction-cell {
  flex: 1 1 0;
  min-width: 0;
  box-sizing: border-box;
  background: #ffffff;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

.mathlo-fraction-cell + .mathlo-fraction-cell {
  border-left: 1px solid #020617;
}

.mathlo-fraction-cell.is-filled {
  background: #6366f1;
}

.mathlo-fraction-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.mathlo-fraction-prompt {
  margin-bottom: 10px;
  color: #0f172a;
  font-family: "Inter", "Noto Sans KR", sans-serif;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  word-break: keep-all;
}

.mathlo-fraction-group-board {
  flex-basis: 200px;
}

.mathlo-fraction-group-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}

.mathlo-fraction-group {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  min-height: 30px;
  padding: 6px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

.mathlo-fraction-group.is-selected {
  border-color: #4f46e5;
  background: #eef2ff;
}

.mathlo-fraction-dot {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #cbd5e1;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

.mathlo-fraction-group.is-selected .mathlo-fraction-dot {
  background: #4f46e5;
}

.mathlo-fraction-expression {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.mathlo-stacked-fraction {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  color: #020617;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  vertical-align: middle;
}

.mathlo-fraction-numerator,
.mathlo-fraction-denominator {
  display: block;
  min-width: 22px;
  text-align: center;
}

.mathlo-fraction-line {
  width: 28px;
  margin: 3px 0;
  border-top: 2px solid #020617;
}

.mathlo-fraction-symbol-blank {
  width: 52px;
  height: 34px;
}

.mathlo-decimal-question {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 10px;
}

.mathlo-decimal-board {
  display: flex;
  flex: 0 0 188px;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}

.mathlo-decimal-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mathlo-decimal-bar {
  display: flex;
  width: 128px;
  height: 18px;
  overflow: hidden;
  box-sizing: border-box;
  border: 2px solid #020617;
  border-radius: 4px;
  background: #ffffff;
}

.mathlo-decimal-cell {
  flex: 1 1 0;
  min-width: 0;
  box-sizing: border-box;
  background: #ffffff;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

.mathlo-decimal-cell + .mathlo-decimal-cell {
  border-left: 1px solid #020617;
}

.mathlo-decimal-cell.is-filled {
  background: #f59e0b;
}

.mathlo-decimal-bar-value {
  min-width: 34px;
  color: #0f172a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 15px;
  font-weight: 900;
}

.mathlo-decimal-symbol-box {
  display: flex;
  flex: 0 0 52px;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 34px;
  box-sizing: border-box;
  border: 2px solid #94a3b8;
  border-radius: 10px;
  background: #ffffff;
  color: #4f46e5;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 20px;
  font-weight: 900;
}

.mathlo-decimal-symbol-answer {
  opacity: 0;
}

.mathlo-question-card.is-answer-visible .mathlo-decimal-symbol-answer {
  opacity: 1;
}

.mathlo-decimal-copy {
  min-width: 96px;
  flex: 1 1 auto;
}

.mathlo-decimal-prompt {
  margin-bottom: 10px;
  color: #0f172a;
  font-family: "Inter", "Noto Sans KR", sans-serif;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  word-break: keep-all;
}

.mathlo-decimal-expression {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  color: #020617;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 22px;
  font-weight: 900;
  white-space: nowrap;
}

.mathlo-decimal-o-label {
  color: #94a3b8;
  font-size: 14px;
  font-weight: 800;
}

.mathlo-length-question {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 10px;
}

.mathlo-ruler-board {
  flex: 0 0 300px;
  width: 300px;
  min-width: 300px;
}

.mathlo-ruler-track {
  position: relative;
  display: block;
  width: 300px;
  height: 40px;
  box-sizing: content-box;
  margin-bottom: 8px;
  border: 2px solid #020617;
  border-radius: 5px;
  background: #ffffff;
  overflow: visible;
  user-select: none;
}

.mathlo-ruler-tick {
  position: absolute;
  bottom: 0;
  display: block;
  width: 1px;
  height: 16px;
  transform: translateX(-50%);
  background: #94a3b8;
}

.mathlo-ruler-tick.is-half-cm {
  height: 24px;
  background: #475569;
}

.mathlo-ruler-tick.is-cm {
  width: 2px;
  height: 32px;
  background: #020617;
}

.mathlo-ruler-number {
  position: absolute;
  left: 50%;
  bottom: -13px;
  transform: translateX(-50%);
  color: #0f172a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

.mathlo-ruler-pointer {
  position: absolute;
  top: 2px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: auto;
  transform: translateX(-50%);
  background: transparent;
  color: #dc2626;
  pointer-events: none;
}

.mathlo-ruler-pointer-arrow {
  display: block;
  font-family: Arial, "Noto Sans KR", sans-serif;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  user-select: none;
}

.mathlo-ruler-pointer-line {
  display: block;
  width: 1px;
  height: 15px;
  margin-top: -1px;
  background: rgba(220, 38, 38, .86);
}

.mathlo-ruler-caption {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
  font-family: "Inter", "Noto Sans KR", sans-serif;
  font-size: 13px;
  font-weight: 800;
}

.mathlo-ruler-caption span {
  color: #64748b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.mathlo-length-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.mathlo-length-copy .mathlo-question-text {
  margin-bottom: 0;
}

.mathlo-division-long {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 160px;
  margin: 0 0 10px;
  background: transparent;
  color: #0f172a;
  font-family: "Inter", "Noto Sans KR", sans-serif;
  font-weight: 600;
}

.mathlo-division-css-stage {
  min-width: 148px;
  box-sizing: border-box;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  color: #0f172a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.mathlo-division-quotient-row,
.mathlo-division-css-row {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
}

.mathlo-division-quotient-row {
  min-height: 25px;
  margin-bottom: 2px;
}

.mathlo-division-css-row {
  min-height: 44px;
}

.mathlo-division-border-divisor {
  width: 32px;
  box-sizing: border-box;
  padding-right: 4px;
  padding-bottom: 8px;
  color: #475569;
  font-size: .78em;
  font-weight: 500;
  text-align: right;
}

.mathlo-division-css-core {
  position: relative;
  min-width: 80px;
  box-sizing: border-box;
  display: flex;
  align-items: flex-end;
  border-top: 2px solid #020617;
  border-left: 2px solid #020617;
  border-top-left-radius: 10px;
  padding-top: 12px;
  padding-left: 8px;
}

.mathlo-division-curve-layer {
  position: absolute;
  left: 0;
  top: -2px;
  width: 12px;
  height: 42px;
  box-sizing: border-box;
  border: 0;
  background: transparent;
  pointer-events: none;
}

.mathlo-division-dividend-roof {
  min-width: 68px;
  box-sizing: border-box;
  padding-left: 12px;
  padding-bottom: 2px;
  color: #020617;
  font-size: 1em;
  font-weight: 900;
  letter-spacing: .14em;
  text-align: left;
}

.mathlo-division-quotient-slot {
  min-width: 80px;
  box-sizing: border-box;
  padding-left: 22px;
  color: #4f46e5;
  font-size: .82em;
  font-weight: 800;
  letter-spacing: .08em;
  text-align: right;
}

.mathlo-division-css-stage .is-ghost {
  visibility: hidden;
}

.mathlo-division-scratch-space {
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  flex: 1 1 auto;
}

.mathlo-division-check-stage {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-start;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.mathlo-check-formula {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  color: #334155;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.mathlo-check-label {
  margin-right: 4px;
  font-weight: 700;
}

.mathlo-check-box {
  width: 48px;
  height: 24px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #94a3b8;
  border-radius: 4px;
  background: #f8fafc;
  color: #4338ca;
  font-weight: 700;
}

.mathlo-check-box-sm {
  width: 48px;
}

.mathlo-check-box-wide {
  width: 56px;
}

.mathlo-check-answer {
  display: none;
}

.mathlo-question-card.is-answer-visible .mathlo-check-answer {
  display: inline;
}

.mathlo-vertical-sum {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 124px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 14px 18px 16px;
  background: #f8fafc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: 0;
}

.mathlo-sum-row {
  display: grid;
  grid-template-columns: 28px minmax(72px, 1fr);
  align-items: end;
  column-gap: 4px;
  min-height: 28px;
  color: #0f172a;
}

.mathlo-sum-operator,
.mathlo-sum-operator-placeholder {
  display: inline-flex;
  align-items: flex-end;
  justify-content: flex-start;
  min-height: 28px;
  color: #334155;
  font-weight: 700;
  line-height: 1;
}

.mathlo-sum-value {
  display: block;
  min-width: 72px;
  color: #0f172a;
  font-weight: 800;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}

.mathlo-sum-rule {
  width: 100%;
  margin-top: 4px;
  border-bottom: 2px solid #0f172a;
}

.mathlo-unit-vertical {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 176px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 14px 18px 16px;
  background: #f8fafc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
}

.mathlo-unit-row {
  display: grid;
  grid-template-columns: 28px repeat(2, 54px);
  align-items: end;
  column-gap: 4px;
  min-height: 30px;
  color: #0f172a;
}

.mathlo-time-vertical {
  min-width: 184px;
}

.mathlo-time-line {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 8px;
  min-height: 31px;
  padding-left: 30px;
  color: #0f172a;
}

.mathlo-time-operator-placeholder {
  position: absolute;
  left: 4px;
  bottom: 2px;
  width: 24px;
  height: 1em;
}

.mathlo-time-operator {
  position: absolute;
  left: 4px;
  bottom: 2px;
  color: #334155;
  font-weight: 900;
  line-height: 1;
}

.mathlo-time-part {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 2px;
  color: #0f172a;
  font-weight: 800;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}

.mathlo-time-hour {
  width: 3rem;
}

.mathlo-time-minute {
  width: 4rem;
}

.mathlo-time-part em {
  margin-left: 1px;
  color: #334155;
  font-family: "Noto Sans KR", sans-serif;
  font-size: .68em;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}

.mathlo-unit-row.is-mm-only,
.mathlo-unit-row.mathlo-unit-header.is-mm-only {
  grid-template-columns: 28px 88px;
}

.mathlo-unit-header {
  min-height: 22px;
  color: #475569;
  font-size: .62em;
  font-weight: 800;
}

.mathlo-unit-operator,
.mathlo-unit-operator-placeholder {
  display: inline-flex;
  align-items: flex-end;
  justify-content: flex-start;
  min-height: 28px;
  color: #334155;
  font-weight: 800;
  line-height: 1;
}

.mathlo-unit-cell {
  display: block;
  min-width: 42px;
  color: #0f172a;
  font-weight: 800;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}

.mathlo-unit-rule {
  width: 100%;
  margin-top: 5px;
  border-bottom: 2px solid #0f172a;
}

.mathlo-unit-answer-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-height: 36px;
  padding-top: 8px;
  color: #334155;
  font-family: "Inter", "Noto Sans KR", sans-serif;
  font-size: 14px;
  font-weight: 800;
}

.mathlo-unit-answer-row.is-split-answer {
  justify-content: flex-start;
}

.mathlo-unit-answer-blank {
  display: inline-block;
  width: 80px;
  height: 30px;
  box-sizing: border-box;
  border: 2px solid #bfdbfe;
  border-radius: 8px;
  background: #ffffff;
}

.mathlo-unit-answer-blank.is-small {
  width: 46px;
}

.mathlo-unit-answer-label {
  color: #334155;
  line-height: 1;
}

.mathlo-unit-scratch-space {
  width: 100%;
  min-height: 40px;
  box-sizing: border-box;
  flex: 1 1 auto;
}

.mathlo-question-text-vertical {
  display: inline-block;
  min-width: 130px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 14px 18px;
  background: #f8fafc;
  font-family: "JetBrains Mono", "Consolas", monospace;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: 0;
  white-space: pre;
}

.mathlo-question-card summary {
  cursor: pointer;
  color: #475569;
  font-size: 13px;
  font-weight: 900;
}

.mathlo-answer {
  margin-top: 10px;
  color: #16a34a;
  font-size: 14px;
  font-weight: 1000;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: keep-all;
  white-space: pre-line;
}

.mathlo-question-card pre {
  white-space: pre-line;
  word-break: keep-all;
  overflow-wrap: anywhere;
  margin: 10px 0 0;
  color: #334155;
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.65;
}

.mathlo-question-card pre.mathlo-question-text-vertical {
  display: inline-block;
  min-width: 130px;
  margin: 0 0 10px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 14px 18px;
  background: #f8fafc;
  color: #0f172a;
  font-family: "JetBrains Mono", "Consolas", monospace;
  font-size: 22px;
  font-weight: 1000;
  line-height: 1.25;
  letter-spacing: 0;
  white-space: pre;
}

@media print {
  .mathlo-question-card.is-geometry {
    min-height: 24mm !important;
  }

  .mathlo-geometry-question {
    display: flex !important;
    align-items: center !important;
    gap: 5mm !important;
  }

  .mathlo-geometry-board {
    --mathlo-shape-fill: #ffffff;
    width: 20mm !important;
    height: 17mm !important;
    flex-basis: 20mm !important;
    border-color: transparent !important;
    background: transparent !important;
  }

  .mathlo-shape-rectangle {
    width: 16mm !important;
    height: 11mm !important;
    border-color: #000000 !important;
    background: #ffffff !important;
  }

  .mathlo-shape-square {
    width: 13mm !important;
    height: 13mm !important;
    border-color: #000000 !important;
    background: #ffffff !important;
  }

  .mathlo-shape-triangle,
  .mathlo-shape-right-triangle,
  .mathlo-shape-pentagon {
    width: 15mm !important;
    height: 13mm !important;
    background: #000000 !important;
  }

  .mathlo-time-vertical {
    min-width: 44mm !important;
  }

  .mathlo-time-line {
    display: flex !important;
    align-items: baseline !important;
    justify-content: flex-end !important;
    gap: 2mm !important;
    min-height: 7mm !important;
    padding-left: 7mm !important;
  }

  .mathlo-time-operator {
    left: 1mm !important;
    bottom: .7mm !important;
    color: #000000 !important;
  }

  .mathlo-time-hour {
    width: 13mm !important;
  }

  .mathlo-time-minute {
    width: 17mm !important;
  }

  .mathlo-time-part,
  .mathlo-time-part em {
    color: #000000 !important;
  }

  .mathlo-time-part em {
    font-size: 9pt !important;
  }

  .mathlo-question-card.is-fraction {
    min-height: 32mm !important;
  }

  .mathlo-fraction-question {
    display: flex !important;
    align-items: center !important;
    gap: 4mm !important;
  }

  .mathlo-fraction-board {
    flex-basis: 39mm !important;
    gap: 2mm !important;
    padding: 0 !important;
    border-color: transparent !important;
    background: transparent !important;
  }

  .mathlo-fraction-bar {
    width: 30mm !important;
    height: 7mm !important;
    border: 1.2pt solid #000000 !important;
    background: #ffffff !important;
  }

  .mathlo-fraction-cell {
    background: #ffffff !important;
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }

  .mathlo-fraction-cell + .mathlo-fraction-cell {
    border-left: 0.8pt solid #000000 !important;
  }

  .mathlo-fraction-cell.is-filled {
    background: #94a3b8 !important;
  }

  .mathlo-fraction-group-board {
    flex-basis: 42mm !important;
  }

  .mathlo-fraction-group-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1.5mm !important;
  }

  .mathlo-fraction-group {
    min-height: 8mm !important;
    padding: 1.2mm !important;
    border: 0.8pt solid #000000 !important;
    border-radius: 1.5mm !important;
    background: #ffffff !important;
  }

  .mathlo-fraction-group.is-selected {
    background: #e2e8f0 !important;
  }

  .mathlo-fraction-dot {
    width: 1.7mm !important;
    height: 1.7mm !important;
    background: #d1d5db !important;
  }

  .mathlo-fraction-group.is-selected .mathlo-fraction-dot {
    background: #334155 !important;
  }

  .mathlo-fraction-prompt {
    color: #000000 !important;
    font-size: 9pt !important;
  }

  .mathlo-stacked-fraction {
    color: #000000 !important;
    font-size: 12pt !important;
  }

  .mathlo-fraction-line {
    border-top: 1.2pt solid #000000 !important;
  }

  .mathlo-fraction-symbol-blank {
    width: 13mm !important;
    height: 7mm !important;
    border-color: #000000 !important;
  }

  .mathlo-question-card.is-decimal {
    min-height: 30mm !important;
  }

  .mathlo-decimal-question {
    display: flex !important;
    align-items: center !important;
    gap: 3mm !important;
  }

  .mathlo-decimal-board {
    flex-basis: 34mm !important;
    gap: 2mm !important;
    padding: 0 !important;
    border-color: transparent !important;
    background: transparent !important;
  }

  .mathlo-decimal-bar-row {
    gap: 2mm !important;
  }

  .mathlo-decimal-bar {
    width: 25mm !important;
    height: 4.8mm !important;
    border: 1.2pt solid #000000 !important;
    background: #ffffff !important;
  }

  .mathlo-decimal-cell {
    background: #ffffff !important;
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }

  .mathlo-decimal-cell + .mathlo-decimal-cell {
    border-left: 0.8pt solid #000000 !important;
  }

  .mathlo-decimal-cell.is-filled {
    background: #94a3b8 !important;
  }

  .mathlo-decimal-bar-value,
  .mathlo-decimal-prompt,
  .mathlo-decimal-expression,
  .mathlo-decimal-o-label {
    color: #000000 !important;
  }

  .mathlo-decimal-prompt {
    font-size: 8pt !important;
    line-height: 1.2 !important;
  }

  .mathlo-decimal-expression {
    flex-wrap: nowrap !important;
    gap: 1.8mm !important;
    font-size: 12pt !important;
    white-space: nowrap !important;
  }

  .mathlo-decimal-symbol-box {
    width: 11mm !important;
    height: 7mm !important;
    border-color: #000000 !important;
    background: #ffffff !important;
  }

  .mathlo-question-card.is-length {
    min-height: 34mm !important;
  }

  .mathlo-length-question {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2.5mm !important;
  }

  .mathlo-ruler-board {
    flex: 0 0 auto !important;
    width: 300px !important;
    min-width: 300px !important;
  }

  .mathlo-ruler-track {
    width: 300px !important;
    height: 40px !important;
    box-sizing: content-box !important;
    padding: 0 !important;
    border: 1.2pt solid #000000 !important;
    background: #ffffff !important;
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }

  .mathlo-ruler-tick {
    bottom: 0 !important;
    width: 1px !important;
    height: 16px !important;
    transform: translateX(-50%) !important;
    background: #777777 !important;
  }

  .mathlo-ruler-tick.is-half-cm {
    height: 24px !important;
    background: #333333 !important;
  }

  .mathlo-ruler-tick.is-cm {
    width: 2px !important;
    height: 32px !important;
    background: #000000 !important;
  }

  .mathlo-ruler-number {
    bottom: -13px !important;
    color: #000000 !important;
    font-size: 9px !important;
  }

  .mathlo-ruler-pointer {
    top: 2px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: auto !important;
    transform: translateX(-50%) !important;
    color: #000000 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .mathlo-ruler-pointer-arrow {
    color: #000000 !important;
    font-size: 10px !important;
  }

  .mathlo-ruler-pointer-line {
    width: 1px !important;
    height: 15px !important;
    margin-top: -1px !important;
    background: #000000 !important;
  }

  .mathlo-ruler-caption {
    color: #000000 !important;
    font-size: 8pt !important;
  }

  .mathlo-ruler-caption span {
    color: #000000 !important;
  }
}

@media print {
  .sidebar,
  .control-bar,
  .mathlo-control-panel,
  button {
    display: none !important;
  }

  .paper-container,
  .mathlo-worksheet-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 20px !important;
  }

  .mathlo-worksheet-list.mathlo-print-cols-3,
  .mathlo-print-area.mathlo-print-cols-3 .mathlo-worksheet-list {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    column-gap: 10mm !important;
    row-gap: 6mm !important;
  }

  .mathlo-worksheet-list.mathlo-print-cols-2,
  .mathlo-print-area.mathlo-print-cols-2 .mathlo-worksheet-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .mathlo-worksheet-list.mathlo-vertical-cols-3 .mathlo-question-card.is-vertical,
  .mathlo-print-area.mathlo-vertical-cols-3 .mathlo-question-card.is-vertical {
    min-height: 20mm !important;
  }

  .mathlo-worksheet-list.mathlo-vertical-cols-3 .mathlo-vertical-sum,
  .mathlo-print-area.mathlo-vertical-cols-3 .mathlo-vertical-sum {
    min-width: 25mm !important;
    font-size: 15pt !important;
  }

  .mathlo-concept-block-host {
    display: block !important;
  }

  .mathlo-concept-block {
    display: grid !important;
    grid-template-columns: 1fr !important;
    min-height: 230mm !important;
    margin: 0 !important;
    padding: 12mm !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    box-shadow: none !important;
    color: #000000 !important;
    break-after: page !important;
    page-break-after: always !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .mathlo-concept-block h2 {
    color: #000000 !important;
    font-size: 22pt !important;
  }

  .mathlo-concept-eyebrow,
  .mathlo-concept-block p,
  .mathlo-concept-block li,
  .mathlo-concept-formula {
    color: #000000 !important;
  }

  .mathlo-concept-formula,
  .mathlo-concept-visual {
    border-color: #000000 !important;
    background: #ffffff !important;
  }

  .mathlo-concept-blank {
    background: #ffffff !important;
    border-color: #000000 !important;
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }

  .question-item,
  .mathlo-question-card {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .mathlo-mini-omr-host,
  .mathlo-mini-omr {
    display: block !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .mathlo-mini-omr {
    border: 0.8pt solid #000000 !important;
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
  }

  .mathlo-mini-omr-title {
    border-bottom: 0.8pt solid #000000 !important;
    background: #ffffff !important;
    color: #000000 !important;
  }

  .mathlo-mini-omr-title strong,
  .mathlo-mini-omr-title span,
  .mathlo-mini-omr-row,
  .mathlo-mini-omr-mark {
    color: #000000 !important;
  }

  .mathlo-mini-omr-answer {
    border-bottom-color: #000000 !important;
    border-color: #000000 !important;
    background: #ffffff !important;
  }

  .mathlo-mini-omr-mark {
    border-color: #000000 !important;
  }

  .mathlo-registration-mark {
    display: block !important;
    width: 5mm !important;
    height: 5mm !important;
    opacity: 1 !important;
    border-color: #000000 !important;
  }

  .mathlo-registration-mark.is-top-left {
    top: 2mm !important;
    left: 2mm !important;
    border-top: 0.8pt solid #000000 !important;
    border-left: 0.8pt solid #000000 !important;
  }

  .mathlo-registration-mark.is-top-right {
    top: 2mm !important;
    right: 2mm !important;
    border-top: 0.8pt solid #000000 !important;
    border-right: 0.8pt solid #000000 !important;
  }

  .mathlo-registration-mark.is-bottom-left {
    bottom: 2mm !important;
    left: 2mm !important;
    border-bottom: 0.8pt solid #000000 !important;
    border-left: 0.8pt solid #000000 !important;
  }

  .mathlo-registration-mark.is-bottom-right {
    right: 2mm !important;
    bottom: 2mm !important;
    border-right: 0.8pt solid #000000 !important;
    border-bottom: 0.8pt solid #000000 !important;
  }

  .mathlo-source-hidden .mathlo-print-source {
    display: none !important;
  }

  .mathlo-source-hidden.mathlo-layout-test .mathlo-print-sheet-footer {
    display: none !important;
  }

  .mathlo-white-label-enabled.mathlo-source-hidden.mathlo-layout-test .mathlo-print-sheet-footer {
    display: flex !important;
  }

  .mathlo-layout-workbook .mathlo-print-page-number {
    display: block !important;
    color: #000000 !important;
  }

  .mathlo-layout-workbook .mathlo-question-top strong {
    min-width: 7mm !important;
    height: 7mm !important;
    border: 0.8pt solid #000000 !important;
    border-radius: 999px !important;
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 10pt !important;
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }

  .mathlo-solution-lines,
  .mathlo-layout-workbook .mathlo-workbook-lines {
    display: grid !important;
    gap: 2mm !important;
    margin-top: 3mm !important;
  }

  .mathlo-solution-lines span,
  .mathlo-layout-workbook .mathlo-workbook-lines span {
    height: 4mm !important;
    border-bottom: 0.8pt dashed #cbd5e1 !important;
  }

  .mathlo-question-card.mathlo-solution-none .mathlo-solution-lines {
    display: none !important;
  }

  .mathlo-question-card.mathlo-solution-normal .mathlo-solution-lines span {
    height: 5mm !important;
  }

  .mathlo-question-card.mathlo-solution-wide .mathlo-solution-lines span {
    height: 6mm !important;
  }

  .mathlo-question-card.mathlo-solution-extra .mathlo-solution-lines span {
    height: 7mm !important;
  }

  .mathlo-layout-test .mathlo-question-card {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .mathlo-matrix-grid-wrap,
  .mathlo-geometry-svg,
  .mathlo-shape-transform-svg {
    color: #000000 !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .mathlo-matrix-bracket {
    border-color: #000000 !important;
  }

  .mathlo-geometry-svg rect,
  .mathlo-geometry-svg circle,
  .mathlo-geometry-svg polygon,
  .mathlo-geometry-svg path,
  .mathlo-shape-transform-svg polygon,
  .mathlo-shape-transform-svg path {
    fill: #ffffff !important;
    stroke: #000000 !important;
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }

  .mathlo-geometry-svg.has-internal-grid rect,
  .mathlo-geometry-svg.has-internal-grid circle,
  .mathlo-geometry-svg.has-internal-grid polygon,
  .mathlo-geometry-svg.has-internal-grid path:not(.guide) {
    fill: url("#mathlo-internal-grid-pattern") !important;
  }

  .mathlo-geometry-svg text,
  .mathlo-shape-transform-svg text {
    fill: #000000 !important;
    stroke: #ffffff !important;
  }

  .mathlo-number-line-svg,
  .mathlo-clock-svg,
  .mathlo-isometric-svg,
  .mathlo-solid-svg,
  .mathlo-block-projection,
  .mathlo-shape-transform-svg,
  .mathlo-number-splitting-svg,
  .mathlo-ten-bundle-svg,
  .mathlo-mixed-fraction-svg,
  .mathlo-lshape-svg,
  .mathlo-chart-svg,
  .mathlo-factor-align-table,
  .mathlo-expression-renderer {
    color: #000000 !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .mathlo-number-line-axis,
  .mathlo-number-line-tick line,
  .mathlo-number-split-line,
  .mathlo-clock-face,
  .mathlo-clock-marks line,
  .mathlo-clock-hour-hand,
  .mathlo-clock-minute-hand,
  .mathlo-isometric-svg polygon,
  .mathlo-isometric-svg path,
  .mathlo-solid-svg ellipse,
  .mathlo-solid-svg circle,
  .mathlo-solid-svg path,
  .mathlo-shape-transform-svg polygon,
  .mathlo-shape-transform-svg path,
  .mathlo-lshape-svg .l-shape-line,
  .mathlo-chart-axis,
  .mathlo-chart-line,
  .mathlo-chart-tick line {
    stroke: #000000 !important;
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }

  .mathlo-number-line-arrow,
  .mathlo-clock-center {
    fill: #000000 !important;
  }

  .mathlo-number-line-condition line,
  .mathlo-number-line-hatch {
    stroke: #000000 !important;
  }

  .mathlo-number-line-condition circle {
    stroke: #000000 !important;
  }

  .mathlo-number-split-node circle,
  .mathlo-number-split-node .blank,
  .mathlo-ten-bundle-box,
  .mathlo-ten-loose-box,
  .mathlo-concrete-object rect,
  .mathlo-concrete-object circle,
  .mathlo-concrete-object path,
  .mathlo-mixed-fraction-svg circle,
  .mathlo-mixed-fraction-svg path,
  .mathlo-mixed-fraction-svg rect {
    stroke: #000000 !important;
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }

  .mathlo-number-line-tick text,
  .mathlo-number-split-node text,
  .mathlo-ten-bundle-svg text,
  .mathlo-mixed-fraction-svg text,
  .mathlo-lshape-svg text,
  .mathlo-chart-svg text,
  .mathlo-isometric-svg text,
  .mathlo-solid-svg text,
  .mathlo-shape-transform-svg text {
    fill: #000000 !important;
  }

  .mathlo-chart-bar,
  .mathlo-chart-dot {
    fill: #cbd5e1 !important;
    stroke: #000000 !important;
  }

  .mathlo-factor-align-table th,
  .mathlo-factor-align-table td {
    border-color: #000000 !important;
    background: #ffffff !important;
    color: #000000 !important;
  }

  .mathlo-isometric-svg polygon,
  .mathlo-solid-svg ellipse,
  .mathlo-solid-svg circle,
  .mathlo-solid-svg path,
  .mathlo-block-projection,
  .mathlo-block-projection span {
    background: #ffffff !important;
    fill: #ffffff !important;
  }

  .mathlo-block-projection,
  .mathlo-block-projection span {
    border-color: #000000 !important;
    color: #000000 !important;
  }

  .mathlo-concrete-object rect,
  .mathlo-concrete-object circle,
  .mathlo-concrete-object path,
  .mathlo-ten-bundle-box,
  .mathlo-ten-loose-box,
  .mathlo-number-split-node circle,
  .mathlo-mixed-fraction-svg .is-empty {
    fill: #ffffff !important;
  }

  .mathlo-concrete-stone circle:first-child {
    fill: #000000 !important;
  }

  .mathlo-mixed-fraction-shape.is-full circle,
  .mathlo-mixed-bar-full,
  .mathlo-mixed-fraction-svg .is-filled {
    fill: #cbd5e1 !important;
  }

  .mathlo-expression-fraction i,
  .mathlo-expression-root > span {
    border-color: #000000 !important;
  }
}

@media print {
  .mathlo-workbook-omr-note {
    width: 100% !important;
    margin: 0 !important;
    padding: 10mm 8mm 8mm !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .mathlo-workbook-omr-grid {
    gap: 3mm !important;
  }

  .mathlo-workbook-omr-item {
    min-height: 16mm !important;
    padding: 2mm !important;
    border-color: #000000 !important;
    background: #ffffff !important;
  }

  .mathlo-workbook-omr-roi,
  .mathlo-workbook-omr-mini-grid,
  .mathlo-workbook-omr-mini-grid span,
  .mathlo-free-writing-number,
  .mathlo-free-writing-body span,
  .mathlo-on-demand-free-writing-zone,
  .mathlo-on-demand-question-field,
  .mathlo-on-demand-writing-body span,
  .mathlo-workbook-omr-appendix-card {
    border-color: #000000 !important;
    background: #ffffff !important;
  }

  .mathlo-workbook-omr-item.is-free-writing {
    min-height: calc(var(--free-writing-height, 72mm) + 8mm) !important;
  }

  .mathlo-workbook-omr-roi.is-free-writing-zone,
  .mathlo-free-writing-zone {
    min-height: var(--free-writing-height, 72mm) !important;
  }

  .mathlo-free-writing-body span {
    border-bottom-style: dashed !important;
  }

  .mathlo-on-demand-free-writing-zone {
    margin-top: 4mm !important;
    border-radius: 0 !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .mathlo-on-demand-writing-body {
    min-height: var(--on-demand-height, 78mm) !important;
  }

  .mathlo-workbook-omr-appendix {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .mathlo-workbook-omr-appendix-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .mathlo-whole-workbook-note {
    display: block !important;
    color: #000000 !important;
  }

  .mathlo-whole-cover,
  .mathlo-whole-note-page,
  .mathlo-whole-appendix-page {
    width: 100% !important;
    min-height: 267mm !important;
    margin: 0 !important;
    padding: 7mm !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    break-after: page !important;
    page-break-after: always !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .mathlo-whole-workbook-note > :last-child {
    break-after: auto !important;
    page-break-after: auto !important;
  }

  .mathlo-whole-cover-card {
    min-height: 246mm !important;
    border-color: #000000 !important;
    background: #ffffff !important;
  }

  .mathlo-page-specific-anchor {
    border-color: #000000 !important;
    background: #ffffff !important;
    color: #000000 !important;
  }

  .mathlo-page-specific-anchor-grid,
  .mathlo-page-specific-anchor-grid span {
    border-color: #000000 !important;
  }

  .mathlo-whole-auto-header {
    margin-bottom: 3mm !important;
    padding: 3mm 4mm !important;
    border: 1.4px solid #000000 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    color: #000000 !important;
  }

  .mathlo-whole-auto-header strong,
  .mathlo-whole-auto-header em,
  .mathlo-whole-auto-header b {
    color: #000000 !important;
  }

  .mathlo-whole-auto-header strong span {
    border-color: #000000 !important;
    background:
      linear-gradient(to top, #000000 0 44%, transparent 44%) 3px 6px / 3px 9px no-repeat,
      linear-gradient(to top, #000000 0 70%, transparent 70%) 8px 3px / 3px 12px no-repeat,
      linear-gradient(to top, #000000 0 56%, transparent 56%) 13px 5px / 3px 10px no-repeat !important;
  }
}

@media (max-width: 1080px) {
  .svc-header {
    flex-wrap: wrap;
    min-height: auto;
    padding: 12px 18px;
  }

  .svc-nav {
    order: 3;
    flex-basis: 100%;
    overflow-x: auto;
    justify-content: flex-start;
  }

  .svc-feature-grid,
  .svc-card-grid,
  .mathlo-landing-shell,
  .mathlo-white-label-grid,
  .mathlo-builder {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mathlo-system-grid,
  .mathlo-showcase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mathlo-white-label-preview {
    grid-template-columns: 1fr;
  }

  .mathlo-gateway-card {
    grid-template-columns: 1fr 1fr;
  }

  .mathlo-gateway-card > div:first-child,
  .mathlo-gateway-actions {
    grid-column: 1 / -1;
  }

  .mathlo-dashboard-shell,
  .mathlo-student-list {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .svc-header {
    gap: 10px;
  }

  .svc-actions {
    margin-left: auto;
  }

  .svc-actions a:not(.svc-admin) {
    display: none;
  }

  .svc-hero {
    min-height: 470px;
    padding: 34px 16px 44px;
  }

  .svc-hero h1 {
    font-size: 37px;
  }

  .svc-copy {
    font-size: 15px;
  }

  .svc-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .svc-stats div:nth-child(2) {
    border-right: 0;
  }

  .svc-stats div:nth-child(1),
  .svc-stats div:nth-child(2) {
    border-bottom: 1px solid rgba(255,255,255,.08);
  }

  .svc-section,
  .svc-footer {
    width: min(100% - 24px, 640px);
  }

  .svc-feature-grid,
  .svc-card-grid,
  .mathlo-landing-shell,
  .mathlo-system-grid,
  .mathlo-showcase-grid,
  .mathlo-white-label-grid,
  .mathlo-builder {
    grid-template-columns: 1fr;
  }

  .svc-primary,
  .svc-secondary,
  .mathlo-landing-primary,
  .mathlo-landing-secondary {
    width: 100%;
  }

  .mathlo-platform-hero-panel {
    grid-template-columns: 1fr;
  }

  .mathlo-platform-hero-card {
    min-height: 0;
  }

  .mathlo-landing-shell {
    width: min(100% - 24px, 640px);
    min-height: 0;
    padding: 42px 0 50px;
  }

  .mathlo-command-flow {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .mathlo-platform-switcher {
    order: 4;
    width: 100%;
    justify-content: center;
  }

  .mathlo-gateway-card,
  .mathlo-dashboard-shell,
  .mathlo-student-form,
  .mathlo-student-list {
    grid-template-columns: 1fr;
  }

  .mathlo-gateway-actions {
    justify-content: stretch;
  }

  .mathlo-gateway-actions button,
  .mathlo-student-form button {
    width: 100%;
  }
}
.mathlo-subtraction-borrow-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(220px, 1.1fr);
  gap: 16px;
  align-items: center;
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 18px;
  border: 1px solid #bfdbfe;
  border-radius: 18px;
  background: #f8fbff;
}

.mathlo-subtraction-vertical {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 52px);
  gap: 4px;
  justify-content: center;
  padding: 8px 10px 10px 28px;
  color: #0f172a;
  font-weight: 800;
}

.mathlo-subtract-sign {
  position: absolute;
  left: 14px;
  top: 84px;
  font-size: 28px;
  line-height: 1;
}

.mathlo-subtract-col {
  display: grid;
  grid-template-rows: 20px 20px 36px 36px 38px;
  justify-items: center;
  align-items: center;
}

.mathlo-place-label {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.mathlo-borrow-mark {
  min-height: 20px;
  color: #2563eb;
  font-size: 20px;
  line-height: 1;
}

.mathlo-top-digit,
.mathlo-bottom-digit,
.mathlo-result-digit {
  font-size: 30px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.mathlo-bottom-digit {
  width: 100%;
  border-bottom: 3px solid #0f172a;
  text-align: center;
}

.mathlo-result-digit {
  color: #1d4ed8;
}

.mathlo-borrow-notes {
  margin: 0;
  padding-left: 18px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
}

@media (max-width: 720px) {
  .mathlo-subtraction-borrow-card {
    grid-template-columns: 1fr;
  }
}
.mathlo-dashboard-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 34px;
  margin-top: 10px;
  padding: 7px 11px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.mathlo-dashboard-link:hover {
  background: #dbeafe;
}
