/* 발표자료 만들기 — 마법사 화면 (노인 친화: 큰 글자·큰 버튼·고대비) */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 20px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #f4f6f9; color: #1a1a1a;
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 1rem; line-height: 1.6; word-break: keep-all; overflow-wrap: break-word;
}
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
a { color: #0b57d0; }
[hidden] { display: none !important; }
:focus-visible { outline: 4px solid #002b80; outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 0; background: #fff; padding: 12px; z-index: 99; }
.skip:focus { left: 8px; }

/* 머리 */
.top { background: #fff; border-bottom: 2px solid #d5dbe3; }
.top-in { display: flex; justify-content: space-between; align-items: center; min-height: 64px; gap: 12px; }
.app-h1 { font-size: 1.3rem; margin: 0; }
.home-link { font-size: 1rem; padding: 12px 4px; }
.steps ol { list-style: none; display: flex; gap: 8px; margin: 0; padding: 0 0 12px; }
.steps li { flex: 1; }
.step-btn {
  width: 100%; min-height: 64px; border: 3px solid #b8c2cf; border-radius: 12px;
  background: #fff; color: #3d4652; font: inherit; font-size: 1.05rem; font-weight: 700; cursor: pointer; padding: 6px 8px;
}
.step-btn .num { font-size: 1.3rem; }
.step-btn[aria-current="step"] { background: #0b57d0; border-color: #0b57d0; color: #fff; }

/* 공통 */
main { padding: 20px 16px 48px; }
.step-title { font-size: 1.6rem; margin: 8px 0 4px; }
.lead { font-size: 1.05rem; margin: 0 0 16px; }
.sub { font-size: 1.25rem; margin: 28px 0 12px; }
.count { font-weight: 400; color: #4a5361; font-size: 1rem; }
.panel { background: #fff; border: 2px solid #d5dbe3; border-radius: 14px; padding: 18px; margin: 0 0 16px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; }
.lbl { display: block; font-weight: 700; margin: 14px 0 6px; }
.lbl:first-child { margin-top: 0; }
.opt { font-weight: 400; color: #4a5361; }
.inp, textarea.inp {
  width: 100%; min-height: 56px; font: inherit; font-size: 1.05rem; color: #1a1a1a;
  border: 2px solid #6b7684; border-radius: 10px; padding: 10px 12px; background: #fff;
}
textarea.inp { min-height: 140px; resize: vertical; line-height: 1.5; }
.inp:focus { border-color: #0b57d0; }
.inp::placeholder { color: #5f6670; opacity: 1; }
.hint { color: #4a5361; font-size: 1rem; margin: 4px 0 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 10px 22px; font: inherit; font-size: 1.05rem; font-weight: 700;
  border: 3px solid #0b57d0; border-radius: 12px; background: #fff; color: #0b57d0; cursor: pointer; text-decoration: none;
}
.btn:hover { background: #e8f0fe; }
.btn.primary { background: #0b57d0; color: #fff; }
.btn.primary:hover { background: #0842a0; border-color: #0842a0; }
.btn.danger { border-color: #b3261e; color: #b3261e; }
.btn.danger:hover { background: #fdecea; }
.btn.small { min-height: 56px; padding: 8px 14px; font-size: 1rem; }
.btn:disabled, .btn:disabled:hover { background: #e4e7eb; color: #4a5361; border-color: #c4cad2; cursor: not-allowed; }
.btn.wide { width: 100%; }
.nav-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.notice { background: #fff4e5; border: 3px solid #b35c00; color: #5c2e00; border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; font-weight: 700; }
.privacy { background: #e7f4ea; border: 2px solid #1e7b34; color: #124d20; border-radius: 12px; padding: 12px 16px; font-weight: 700; }
.empty { color: #4a5361; }

/* 쪽 카드 */
.slide-card { background: #fff; border: 3px solid #b8c2cf; border-radius: 14px; margin: 0 0 16px; overflow: hidden; }
.slide-card.flash { border-color: #b3261e; box-shadow: 0 0 0 4px #f6c9c5; }
.slide-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; background: #eef2f7; padding: 10px 14px; }
.slide-name { font-size: 1.15rem; font-weight: 700; margin: 0; display: flex; align-items: center; gap: 10px; }
.slide-name svg { width: 40px; height: 30px; flex: none; }
.slide-tools { display: flex; gap: 8px; flex-wrap: wrap; flex: 1 1 320px; justify-content: flex-start; }
.slide-tools .del-slide { margin-left: auto; }
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.photo-safe { color: #124d20; font-weight: 700; font-size: 1rem; flex-basis: 100%; }
.slide-body { padding: 14px 16px 18px; }
.sub-card { border: 2px dashed #9aa5b3; border-radius: 12px; padding: 12px 14px; margin-top: 14px; }
.sub-card legend { font-weight: 700; padding: 0 6px; }
.chart-row { display: grid; grid-template-columns: 1fr 140px auto; gap: 8px; align-items: end; margin-top: 8px; }
.chart-row .lbl { margin: 0 0 4px; font-size: 1rem; }

/* 사진 */
.photo-box { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.photo-box img { width: 120px; height: 90px; object-fit: cover; border-radius: 8px; border: 2px solid #b8c2cf; }
.file-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.file-hidden:focus-visible + label { outline: 4px solid #002b80; outline-offset: 3px; }

/* 종류 고르기 */
.picker-h { margin: 0 0 12px; font-size: 1.2rem; }
.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 12px; }
.type-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 140px; padding: 12px; border: 3px solid #0b57d0; border-radius: 14px; background: #fff;
  color: #1a1a1a; font: inherit; font-size: 1.1rem; font-weight: 700; cursor: pointer;
}
.type-btn:hover { background: #e8f0fe; }
.type-btn svg { width: 72px; height: 54px; }
.type-btn small { font-weight: 400; font-size: 1rem; color: #3d4652; }

/* 모양 고르기 */
.skin-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.skin-card {
  display: block; width: 100%; text-align: left; padding: 12px; border: 4px solid #b8c2cf; border-radius: 16px;
  background: #fff; font: inherit; color: #1a1a1a; cursor: pointer;
}
.skin-card[aria-checked="true"] { border-color: #0b57d0; box-shadow: 0 0 0 4px #c2d6fb; }
.skin-name { display: flex; justify-content: space-between; align-items: center; font-size: 1.2rem; font-weight: 700; margin: 10px 2px 2px; }
.skin-pick { font-size: 1rem; color: #0b57d0; }
.skin-desc { margin: 0 2px; color: #3d4652; font-size: 1rem; }
.skin-prev { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: #dde3ea; pointer-events: none; }
.skin-prev > .fallback { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 6%; gap: 6%; }

/* 보기 */
.stage-box { background: #222; border-radius: 14px; padding: 8px; }
/* 발표 화면 높이 = 쪽(16:9) + 아래 단추줄 */
.stage-box { container-type: inline-size; }
.stage { position: relative; width: 100%; aspect-ratio: 16 / 10.5; overflow: hidden; border-radius: 8px; background: #fff; }
@supports (height: 1cqw) { .stage { aspect-ratio: auto; height: calc(100cqw * 9 / 16 + 84px); } }
@container (max-width: 600px) { .stage { height: calc(100cqw * 9 / 16 + 150px); } }
.skin-prev .de-bar { display: none !important; }
.check-note { font-weight: 700; color: #7a3e00; margin: 12px 0; }
.action-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: stretch; }
.action-row .btn { width: 100%; min-height: 72px; }
.action-row .btn.save { background: #0842a0; border-color: #0842a0; }
.done { margin-top: 12px; }
.m-only { display: none; }
.done { background: #e7f4ea; border: 3px solid #1e7b34; color: #124d20; border-radius: 12px; padding: 14px 16px; font-weight: 700; }
.warn { background: #fdecea; border: 3px solid #b3261e; color: #6b1510; border-radius: 12px; padding: 12px 16px; margin-bottom: 12px; font-weight: 700; }
.warn ul { margin: 0; padding-left: 1.2em; }
.warn ul { list-style: none; padding: 0; }
.warn li { margin: 6px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.no-engine { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 20px; color: #3d4652; background: #f4f6f9; }

.resume h2 { margin-top: 0; }
.foot { border-top: 2px solid #d5dbe3; background: #fff; padding: 16px 0; color: #3d4652; }
.foot p { margin: 0; }
.print-area { position: absolute; left: -20000px; top: 0; width: 1100px; visibility: hidden; }
.print-area:empty { display: none; }
.print-page { width: 1100px; height: 619px; position: relative; overflow: hidden; }

/* 휴대폰 */
@media (max-width: 640px) {
  .wrap { padding: 0 12px; }
  main { padding: 16px 12px 40px; }
  .steps ol { gap: 6px; }
  .step-btn { font-size: 1rem; height: 76px; padding: 2px; line-height: 1.3; white-space: nowrap; letter-spacing: -0.5px; }
  .step-btn .num { display: block; }
  .pc-only { display: none; }
  .m-only { display: inline; }
  .action-row { grid-template-columns: 1fr; }
  .slide-tools .btn.del-slide { flex: 0 0 auto; margin-left: 16px; padding: 8px 14px; }
  .type-grid { grid-template-columns: repeat(2, 1fr); }
  .type-btn { min-height: 120px; font-size: 1rem; }
  .skin-grid { grid-template-columns: 1fr; }
  .chart-row { grid-template-columns: 1fr 96px; }
  .chart-row .del { grid-column: 1 / -1; }
  .nav-row .btn { flex: 1 1 100%; }
  .slide-tools { width: 100%; }
  .slide-tools .btn { flex: 1; padding: 8px 6px; }
}

/* 인쇄: 엔진의 인쇄용 모양(한 장에 한 쪽, 1280×720)을 그대로 쓴다 */
@media print {
  body { background: #fff; }
  .top, main, .foot, .skip { display: none !important; }
  .print-area { display: block !important; position: static; visibility: visible; width: auto; }
  .print-page { width: auto; height: auto; overflow: visible; }
}
.stage .no-engine { position: static; min-height: 220px; }
