:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --ink: #2b2620;
  --ink-soft: #6b6255;
  --accent: #b5652f;
  --accent-soft: #f1e2d3;
  --accent-deep: #8a4a1f;
  --line: #ece4d8;
  --green: #4c7a5e;
  --danger: #b33b3b;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(60, 45, 25, 0.06);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

a { color: var(--accent-deep); }

.hidden { display: none !important; }

/* ---------- Header ---------- */
.topbar {
  background: linear-gradient(135deg, #fffaf3 0%, #f6ebdd 100%);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 24px 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}

.brand-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-deep);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.brand-title {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-sub {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  max-width: 520px;
}

.progress-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  min-width: 220px;
  box-shadow: var(--shadow);
}

.progress-label {
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.progress-bar-track {
  background: var(--accent-soft);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}
.progress-bar-track.small { height: 8px; }

.progress-bar-fill {
  background: linear-gradient(90deg, var(--accent), var(--accent-deep));
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.progress-percent {
  margin-top: 6px;
  font-weight: 700;
  font-size: 13px;
  color: var(--accent-deep);
}

/* ---------- Tabs ---------- */
.tabnav {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  gap: 4px;
  padding: 0 20px;
  overflow-x: auto;
}

.tab-btn {
  border: none;
  background: transparent;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  position: relative;
}

.tab-btn:hover { color: var(--ink); }

.tab-btn.active {
  color: var(--accent-deep);
  border-bottom-color: var(--accent);
}

.tab-btn.tab-done::after {
  content: "✓";
  margin-left: 4px;
  color: var(--green);
  font-weight: 800;
}

/* ---------- Main / Panels ---------- */
main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.panel-head h2 {
  font-size: 22px;
  margin: 0 0 10px;
  font-weight: 800;
}

.lead {
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 780px;
}

.section-title {
  font-size: 16px;
  font-weight: 800;
  margin: 28px 0 12px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

/* ---------- Card grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 20px;
}
.card-grid.five { grid-template-columns: repeat(5, 1fr); }

@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.info-card-label { font-size: 12px; color: var(--ink-soft); margin-bottom: 6px; }
.info-card-value { font-size: 16px; font-weight: 800; margin-bottom: 6px; }
.info-card-note { font-size: 12.5px; color: var(--ink-soft); }

.domain-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 14px;
  text-align: center;
  box-shadow: var(--shadow);
}
.domain-icon { font-size: 26px; margin-bottom: 8px; }
.domain-name { font-weight: 800; font-size: 14px; margin-bottom: 6px; }
.domain-desc { font-size: 12px; color: var(--ink-soft); }

/* ---------- Timeline ---------- */
.timeline {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.timeline-item {
  display: flex;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.timeline-dot {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.timeline-date { font-size: 12px; color: var(--accent-deep); font-weight: 700; }
.timeline-title { font-size: 15px; font-weight: 800; margin: 3px 0; }
.timeline-desc { font-size: 13px; color: var(--ink-soft); }

/* ---------- Callout ---------- */
.callout {
  margin-top: 24px;
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 13.5px;
}
.callout strong { display: block; margin-bottom: 6px; color: var(--accent-deep); }
.callout.warn { background: #fdeeee; }
.callout.warn strong { color: var(--danger); }
.callout ul { margin: 6px 0 0; padding-left: 18px; }
.callout ul li { margin-bottom: 4px; }

/* ---------- Field / Persona ---------- */
.field-block { margin-top: 18px; max-width: 480px; }
.field-block label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 13px; }
.field-block input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  background: var(--surface);
}
.field-hint { font-size: 12px; color: var(--ink-soft); margin-top: 6px; }

.persona-card {
  margin-top: 16px;
  display: flex;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.persona-avatar { font-size: 40px; }
.persona-name { font-weight: 800; margin-bottom: 8px; }
.persona-list { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--ink-soft); }
.persona-list li { margin-bottom: 4px; }

/* ---------- Week panel ---------- */
.week-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.week-pill {
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.week-date { font-size: 12.5px; color: var(--ink-soft); }
.week-deadline {
  font-size: 12.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
}
.cd-normal { background: #eef3ee; color: var(--green); }
.cd-soon { background: #fdf1e3; color: var(--accent-deep); }
.cd-past { background: #fdeeee; color: var(--danger); }

.week-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 6px;
}
.week-progress-row .progress-bar-track { flex: 1; }
.week-progress-text { font-size: 12.5px; font-weight: 700; color: var(--accent-deep); white-space: nowrap; }

.understand-list, .check-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.understand-list li {
  font-size: 13.5px;
  color: var(--ink-soft);
  padding: 6px 0 6px 18px;
  position: relative;
}
.understand-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.check-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.check-item label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13.5px;
}
.check-item input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.assignment-text, .handoff-text {
  font-size: 13.5px;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 0 8px;
}
.handoff-text { color: var(--accent-deep); font-weight: 600; background: var(--accent-soft); border-color: transparent; }

.memo-textarea, .deliverable-textarea {
  width: 100%;
  min-height: 110px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13.5px;
  font-family: inherit;
  resize: vertical;
  background: var(--surface);
}

.save-hint {
  font-size: 11.5px;
  color: var(--ink-soft);
  margin-top: 6px;
}

/* ---------- Deliverables ---------- */
.deliverable-block { margin-bottom: 22px; }
.deliverable-block h3 {
  font-size: 15px;
  font-weight: 800;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tag {
  font-size: 11px;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent-deep);
  padding: 2px 8px;
  border-radius: 999px;
}

/* ---------- Convert steps ---------- */
.convert-steps {
  margin-top: 18px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.convert-steps li::marker { color: var(--accent); font-weight: 800; }
.convert-title { font-weight: 800; font-size: 14px; margin-bottom: 4px; }
.convert-desc { font-size: 13.5px; color: var(--ink-soft); }

/* ---------- Resources ---------- */
.resource-list { padding-left: 18px; }
.resource-list li { margin-bottom: 6px; }
.footnote { font-size: 12px; color: var(--ink-soft); margin-top: 20px; }

/* ---------- Footer ---------- */
.page-footer {
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
}
