:root {
  --accent: #ff6000;
  --accent-light: rgba(255, 96, 0, 0.08);
  --accent-border: rgba(255, 96, 0, 0.25);
  --dark: #1c1c1c;
  --text: #2c2c2c;
  --sub: #6b6b6b;
  --text-muted: #6b6b6b;
  --bg: #fafaf9;
  --card: #ffffff;
  --border: #e5e5e3;
  --guide: #fcfbfa;
  --soft: #f5f5f4;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  padding: 10mm 12mm;
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap.worksheet {
  width: 100%;
  max-width: 277mm;
  margin: 0 auto;
  border: 1px solid var(--border);
  background: var(--card);
}

.back-link {
  display: inline-flex;
  margin: 5mm 10mm 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 9pt;
  font-weight: 700;
  position: relative;
  z-index: 2;
}

.back-link:hover {
  color: #ffffff;
}

.header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10mm;
  margin-top: -9mm;
  padding: 13mm 10mm 7mm;
  border-bottom: 3px solid var(--accent);
  background: var(--dark);
  color: #ffffff;
}

.header::after {
  display: grid;
  grid-template-columns: 18mm 1fr;
  gap: 3mm 4mm;
  min-width: 82mm;
  padding: 4mm 5mm;
  border-radius: 2mm;
  background: #ffffff;
  color: var(--text);
  font-size: 9.5pt;
  font-weight: 600;
  content: "작성자" "____________________" "날짜" "2026-05-06";
  white-space: pre;
}

.doc-tag {
  display: inline-block;
  margin-bottom: 2.5mm;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: 9pt;
  font-weight: 700;
  letter-spacing: 0.3px;
}

h1 {
  margin-bottom: 1.5mm;
  color: #ffffff;
  font-size: 19pt;
  font-weight: 800;
  letter-spacing: -0.2px;
  line-height: 1.15;
}

.subtitle {
  max-width: 132mm;
  color: rgba(255, 255, 255, 0.66);
  font-size: 9.5pt;
}

.intro {
  margin: 0;
  padding: 5mm 10mm;
  border-bottom: 1px solid var(--border);
  background: var(--guide);
  color: var(--text);
  font-size: 10pt;
}

.intro b {
  color: var(--accent);
}

.sheet-section {
  padding: 7mm 10mm;
  border-bottom: 1px solid var(--border);
}

.sheet-section:last-child {
  border-bottom: 0;
}

.sheet-section h2 {
  margin-bottom: 4mm;
  color: var(--text);
  font-size: 12pt;
  font-weight: 800;
}

.section-note {
  margin: -2mm 0 4mm;
  color: var(--sub);
  font-size: 9pt;
}

.worksheet-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 3mm;
}

.prompt-card {
  min-height: 31mm;
  padding: 3.5mm 4mm;
  border: 1px solid var(--border);
  border-left: 2.5px solid var(--accent);
  border-radius: 1.5mm;
  background: #ffffff;
}

.prompt-card b {
  display: block;
  margin-bottom: 1.2mm;
  color: var(--accent);
  font-size: 9.5pt;
  font-weight: 800;
}

.prompt-card span {
  display: block;
  color: var(--sub);
  font-size: 8.8pt;
  line-height: 1.55;
}

.matrix-wrapper {
  position: relative;
  margin: 10mm 8mm 8mm;
}

.matrix-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 105mm;
  border: 2px solid var(--dark);
  background: #ffffff;
}

.quadrant {
  position: relative;
  min-height: 52mm;
  padding: 4mm;
  border: 1px solid var(--border);
}

.quadrant-label {
  position: absolute;
  right: 3mm;
  top: 3mm;
  color: var(--sub);
  font-size: 8pt;
  font-weight: 700;
  text-align: right;
}

.quadrant-title {
  color: var(--accent);
  font-size: 11pt;
  font-weight: 800;
}

.quadrant-subtitle {
  margin-top: 1.5mm;
  color: var(--sub);
  font-size: 8.5pt;
}

.data-step {
  margin: 0 10mm 5mm;
  padding: 4.5mm 5mm;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 2mm;
  background: #ffffff;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 3mm;
  margin-bottom: 2mm;
}

.step-number {
  width: 7mm;
  height: 7mm;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-size: 9pt;
  font-weight: 800;
  line-height: 7mm;
  text-align: center;
  flex: 0 0 auto;
}

.step-title {
  color: var(--text);
  font-size: 11pt;
  font-weight: 800;
}

.step-subtitle {
  margin-bottom: 3mm;
  color: var(--sub);
  font-size: 9pt;
}

.checklist-items {
  display: grid;
  gap: 2.5mm;
}

.checklist-item {
  display: grid;
  grid-template-columns: 5mm 1fr;
  gap: 3mm;
  align-items: start;
  padding: 2.5mm 3mm;
  border: 1px solid var(--border);
  border-radius: 1.5mm;
  background: var(--guide);
}

.checkbox {
  width: 4mm;
  height: 4mm;
  margin-top: 0.8mm;
  border: 1.4px solid var(--accent);
  border-radius: 0.8mm;
  background: #ffffff;
}

.checklist-label {
  color: var(--text);
  font-size: 9pt;
  line-height: 1.55;
}

.checklist-desc {
  margin-top: 0.8mm;
  color: var(--sub);
  font-size: 8.2pt;
}

.emphasis {
  color: var(--accent);
  font-weight: 800;
}

.example-panel {
  margin-top: 4mm;
  padding: 4.5mm 5mm;
  border: 1px solid var(--accent-border);
  border-left: 3px solid var(--accent);
  border-radius: 2mm;
  background: #ffffff;
}

.example-label {
  display: inline-flex;
  margin-bottom: 2.5mm;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 8.8pt;
  font-weight: 800;
}

.example-title {
  margin-bottom: 3mm;
  color: var(--text);
  font-size: 12pt;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.example-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3mm;
}

.answer-card {
  padding: 3mm 3.5mm;
  border: 1px solid var(--border);
  border-radius: 1.5mm;
  background: var(--guide);
}

.answer-card b {
  display: block;
  margin-bottom: 1mm;
  color: var(--accent);
  font-size: 8.8pt;
  font-weight: 800;
}

.answer-card span,
.answer-card li {
  color: var(--text);
  font-size: 8.6pt;
  line-height: 1.55;
}

.answer-card ul {
  padding-left: 4mm;
}

.check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5mm 5mm;
  padding: 4.5mm 5mm;
  border: 1px solid var(--border);
  border-radius: 2mm;
  background: var(--guide);
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 6mm;
  color: var(--text);
  font-size: 9pt;
}

.check-list li::before {
  position: absolute;
  left: 0;
  top: 0.2mm;
  width: 4mm;
  height: 4mm;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-size: 7pt;
  font-weight: 800;
  line-height: 4mm;
  text-align: center;
  content: "✓";
}

.simple-table {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 2mm;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
}

.simple-table th,
.simple-table td {
  padding: 3mm 3.5mm;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 8.8pt;
  text-align: left;
  vertical-align: top;
}

.simple-table th {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 800;
}

.simple-table tr:last-child td {
  border-bottom: 0;
}

.copy-box {
  overflow-x: auto;
  white-space: pre-wrap;
  padding: 4.5mm 5mm;
  border: 1px solid var(--border);
  border-radius: 2mm;
  background: #111827;
  color: #e5e7eb;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 8.8pt;
  line-height: 1.6;
}

@media print {
  body {
    padding: 0;
  }

  .back-link {
    display: none;
  }

  .wrap.worksheet {
    max-width: none;
    border: 0;
  }
}

@media (max-width: 900px) {
  body {
    padding: 0;
  }

  .wrap.worksheet {
    border: 0;
  }

  .back-link {
    margin: 16px 20px 0;
    color: var(--sub);
  }

  .back-link:hover {
    color: var(--accent);
  }

  .header {
    display: block;
    margin-top: 0;
    padding: 28px 20px 22px;
  }

  .header::after {
    display: block;
    min-width: 0;
    margin-top: 18px;
    content: "작성자 ____________________    날짜 2026-05-06";
    white-space: normal;
  }

  h1 {
    font-size: 27px;
  }

  .intro,
  .sheet-section {
    padding: 22px 20px;
  }

  .worksheet-grid,
  .example-grid,
  .check-list {
    grid-template-columns: 1fr;
  }

  .prompt-card {
    min-height: 0;
  }

  .simple-table {
    display: block;
    overflow-x: auto;
  }
}

/* Screen-stable worksheet overrides */
body {
  padding: 40px 24px 72px;
}

.wrap.worksheet {
  max-width: 1120px;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.08);
}

.back-link {
  margin: 20px 28px 0;
  color: var(--sub);
}

.back-link:hover {
  color: var(--accent);
}

.header {
  display: block;
  margin-top: 0;
  padding: 42px 48px 36px;
}

.header::after {
  display: none;
  content: none;
}

.doc-tag {
  margin-bottom: 12px;
  font-size: 12px;
}

h1 {
  font-size: 34px;
  letter-spacing: -0.4px;
}

.subtitle {
  max-width: 760px;
  font-size: 16px;
}

.intro {
  padding: 24px 48px;
  font-size: 15px;
}

.sheet-section {
  padding: 34px 48px;
}

.sheet-section h2 {
  font-size: 22px;
}

.worksheet-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.prompt-card {
  min-height: 124px;
  padding: 18px 20px;
  border-radius: 12px;
}

.prompt-card b {
  font-size: 14px;
}

.prompt-card span {
  font-size: 13.5px;
}

.example-panel {
  margin-top: 16px;
  padding: 24px;
  border-radius: 14px;
}

.example-label {
  font-size: 12px;
}

.example-title {
  font-size: 19px;
}

.example-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.answer-card {
  padding: 16px 18px;
  border-radius: 10px;
}

.answer-card b,
.answer-card span,
.answer-card li {
  font-size: 13.5px;
}

.check-list {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  padding: 20px 22px;
  border-radius: 12px;
}

.check-list li {
  font-size: 14px;
}

.simple-table th,
.simple-table td {
  padding: 14px 16px;
  font-size: 14px;
}

.copy-box {
  padding: 20px 22px;
  border-radius: 12px;
  font-size: 13px;
}

.matrix-wrapper {
  margin: 40px 42px 48px;
}

.matrix-grid {
  min-height: 460px;
}

.quadrant {
  min-height: 230px;
  padding: 22px;
}

.data-step {
  margin: 0 48px 18px;
  padding: 22px 24px;
  border-radius: 12px;
}

.step-number {
  width: 30px;
  height: 30px;
  font-size: 14px;
  line-height: 30px;
}

.step-title {
  font-size: 17px;
}

.step-subtitle,
.checklist-label {
  font-size: 13.5px;
}

.checklist-item {
  grid-template-columns: 20px 1fr;
  padding: 12px 14px;
  border-radius: 8px;
}

.checkbox {
  width: 18px;
  height: 18px;
}

@media (max-width: 760px) {
  body {
    padding: 0;
  }

  .wrap.worksheet {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .header {
    padding: 30px 22px 26px;
  }

  h1 {
    font-size: 28px;
  }

  .intro,
  .sheet-section {
    padding: 22px;
  }

  .matrix-wrapper {
    margin: 24px 0 34px;
  }

  .matrix-wrapper [style*="left: -50px"],
  .matrix-wrapper [style*="bottom: -40px"] {
    display: none !important;
  }

  .matrix-grid {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .quadrant {
    min-height: 150px;
  }

  .data-step {
    margin: 0 22px 16px;
  }
}
