:root {
  --bg: #faf7f3;
  --surface: #ffffff;
  --ink: #2f241f;
  --muted: #7a675a;
  --line: #efe5dc;
  --orange: #ff6f0f;
  --orange-soft: #fff0e2;
  --orange-deep: #d45200;
  --shadow: 0 12px 28px rgba(120, 70, 28, 0.1);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 12%, #fff3e7 0%, transparent 26%),
    radial-gradient(circle at 92% 90%, #ffedda 0%, transparent 24%),
    var(--bg);
  color: var(--ink);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

h1,
h2,
.slide-no,
.takeaway,
#pageIndicator,
button {
  font-family: "Manrope", "Pretendard", "Apple SD Gothic Neo", sans-serif;
}

.deck {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0.72rem;
  padding: 0.9rem;
}

.topbar,
.bottombar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 8px 18px rgba(99, 63, 35, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.68rem 0.9rem;
}

.meta {
  margin: 0;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: #aa7d5d;
}

h1 {
  margin: 0.2rem 0 0;
  font-size: clamp(1.02rem, 1.85vw, 1.42rem);
  font-weight: 800;
  line-height: 1.23;
}

.status {
  min-width: 170px;
}

#pageIndicator {
  margin: 0 0 0.35rem;
  text-align: right;
  color: #8c6547;
  font-size: 0.86rem;
}

.progress {
  background: #f6e9dc;
  border-radius: 999px;
  height: 7px;
  overflow: hidden;
}

#progressBar {
  display: block;
  width: 8.3%;
  height: 100%;
  background: linear-gradient(90deg, #ff8b36, #ff6f0f);
  transition: width 280ms ease;
}

.stage {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.slides {
  width: 100%;
  height: 100%;
  display: flex;
  transition: transform 440ms cubic-bezier(0.22, 1, 0.36, 1);
}

.slide {
  min-width: 100%;
  height: 100%;
  overflow: auto;
  padding: clamp(1.1rem, 2.8vw, 2.25rem);
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(250px, 0.88fr);
  grid-template-areas:
    "no visual"
    "title visual"
    "sub visual"
    "bullets visual"
    "takeaway visual";
  align-content: center;
  gap: 0.65rem 1rem;
  opacity: 0.5;
  transform: scale(0.99);
  transition: opacity 300ms ease, transform 300ms ease;
  border-left: 7px solid transparent;
}

.slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.slide-no {
  grid-area: no;
  margin: 0;
  color: #b58a69;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
}

h2 {
  grid-area: title;
  margin: 0;
  font-size: clamp(1.6rem, 3.55vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-width: 900px;
}

.sub {
  grid-area: sub;
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.25vw, 1.08rem);
  line-height: 1.5;
  max-width: 880px;
}

.bullets {
  grid-area: bullets;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.42rem;
}

.bullets li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #4c3f35;
  font-size: clamp(0.92rem, 1.14vw, 1rem);
  line-height: 1.4;
}

.bullets li::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #ff9a53;
  flex: 0 0 auto;
}

.takeaway {
  grid-area: takeaway;
  margin: 0;
  border-radius: 14px;
  border: 1px solid #ffd6b7;
  background: var(--orange-soft);
  color: var(--orange-deep);
  font-size: clamp(0.95rem, 1.2vw, 1.06rem);
  font-weight: 800;
  line-height: 1.45;
  padding: 0.72rem 0.82rem;
}

.visual {
  grid-area: visual;
  align-self: stretch;
  border-radius: 18px;
  border: 1px solid #f0e4d9;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  display: grid;
  gap: 0.56rem;
  padding: 0.74rem;
  animation: fadeRise 460ms ease;
  overflow: hidden;
  position: relative;
}

.visual::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(180deg, #fff4ea, #fffdfa);
  border-bottom: 1px solid #f3e6db;
  pointer-events: none;
}

@keyframes fadeRise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-cards {
  grid-template-rows: 1fr 1fr;
}

.hero-cards div,
.icon-grid div,
.matrix div,
.ecosystem div,
.dashboard div,
.roadmap div {
  border: 1px solid #f1dcca;
  border-radius: 16px;
  background: #fff;
  display: grid;
  place-items: center;
  text-align: center;
  color: #4b3d32;
  font-weight: 700;
  padding: 0.56rem;
  box-shadow: 0 6px 12px rgba(70, 43, 20, 0.04);
}

.bridge-row {
  align-content: start;
}

.mini-flow {
  display: flex;
  align-items: center;
  gap: 0.34rem;
}

.mini-flow span {
  flex: 1;
  border-radius: 12px;
  border: 1px solid #f1dcca;
  background: #fff;
  text-align: center;
  padding: 0.52rem 0.3rem;
  font-size: 0.77rem;
  font-weight: 700;
  color: #5a493c;
}

.mini-flow i {
  width: 18px;
  height: 2px;
  background: #d0ac90;
}

.bridge-wrap {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #f0ddcc;
  padding: 0.5rem;
}

.bridge {
  margin: 0;
  font-size: 0.8rem;
  color: #6f5b4d;
  line-height: 1.4;
}

.bridge-thumb {
  width: 105px;
  max-width: 36%;
  height: auto;
  border-radius: 12px;
  border: 1px solid #f1dcca;
  box-shadow: 0 6px 14px rgba(71, 44, 20, 0.1);
}

.funnel {
  align-content: start;
}

.funnel div {
  border-radius: 10px;
  border: 1px solid #f0d8c4;
  background: #fff;
  text-align: center;
  padding: 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #5a4638;
}

.funnel div:nth-child(1) { margin: 0 11%; }
.funnel div:nth-child(2) { margin: 0 8%; }
.funnel div:nth-child(3) { margin: 0 5%; }
.funnel div:nth-child(4) { margin: 0 2%; }

.device-frame {
  place-items: center;
}

.phone {
  width: 76%;
  max-width: 220px;
  aspect-ratio: 9 / 18;
  border-radius: 24px;
  border: 2px solid #f0dcca;
  background: #fff;
  padding: 0.46rem;
  display: grid;
  grid-template-rows: 14px 1fr auto auto;
  gap: 0.45rem;
}

.phone header {
  border-radius: 999px;
  background: #fde4cf;
}

.phone .map {
  border-radius: 12px;
  background: linear-gradient(145deg, #fff1e4, #ffe5d0);
}

.phone .list {
  height: 26px;
  border-radius: 8px;
  background: #f6ebe1;
}

.icon-grid,
.matrix,
.dashboard,
.ecosystem {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ecosystem .karrot-node {
  grid-column: 1 / -1;
  border-color: #ffbb87;
  background: #fff2e6;
  color: #b54900;
  font-weight: 800;
}

.risk-bars {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  min-height: 185px;
}

.risk-bars div {
  display: grid;
  justify-items: center;
  gap: 0.32rem;
}

.risk-bars span {
  width: 36px;
  min-height: 24px;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, #ffc38b, #ff7f2a);
}

.risk-bars em {
  font-style: normal;
  font-size: 0.74rem;
  color: #7a685b;
}

.roadmap strong {
  font-size: 0.86rem;
}

.roadmap p {
  margin: 0.24rem 0 0;
  color: #7b685b;
  font-size: 0.82rem;
}

.dashboard h4 {
  margin: 0;
  color: #9a7962;
  font-size: 0.75rem;
}

.dashboard p {
  margin: 0.25rem 0 0;
  color: #3a2c22;
  font-size: 1.23rem;
  font-weight: 800;
}

.flow-3 {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.flow-3 div {
  flex: 1;
  border-radius: 12px;
  border: 1px solid #f1dccb;
  background: #fff;
  text-align: center;
  padding: 0.57rem 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.flow-3 span {
  width: 20px;
  height: 2px;
  background: #d0ac90;
}

.closing-mark {
  align-content: center;
  justify-items: center;
}

.closing-mark .circle {
  width: 84px;
  height: 84px;
  border-radius: 999px;
  border: 2px solid #ff8b36;
  background: #fff0e2;
}

.closing-mark .line {
  width: 4px;
  height: 48px;
  background: #ff8b36;
  border-radius: 4px;
}

.closing-mark .label {
  color: #b14a07;
  font-size: 0.82rem;
  font-weight: 700;
}

.accent-a { border-left-color: #ff6f0f; }
.accent-b { border-left-color: #ff8b36; }
.accent-c { border-left-color: #ff7a22; }
.accent-d { border-left-color: #ff9b52; }
.accent-e { border-left-color: #ff6f0f; }
.accent-f { border-left-color: #de5e08; }
.accent-g { border-left-color: #ff7f2a; }
.accent-h { border-left-color: #ea6c1b; }
.accent-i { border-left-color: #ff8a3a; }
.accent-j { border-left-color: #ff6f0f; }
.accent-k { border-left-color: #ff7b26; }
.accent-l { border-left-color: #e66109; }

#downloadStatus {
  margin: 0;
  color: #8a6d57;
  font-size: 0.8rem;
}

#downloadStatus.status-ok {
  color: #176534;
  font-weight: 700;
}

#downloadStatus.status-error {
  color: #991b1b;
  font-weight: 700;
}

.controls {
  display: flex;
  gap: 0.45rem;
}

button {
  border: 1px solid #ebd6c4;
  background: #fff;
  color: #4c3a2e;
  border-radius: 12px;
  padding: 0.5rem 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

#downloadPptBtn {
  background: linear-gradient(90deg, #ff8b36, #ff6f0f);
  color: #fff;
  border-color: transparent;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.44;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 980px) {
  .deck {
    padding: 0.6rem;
  }

  .slide {
    grid-template-columns: 1fr;
    grid-template-areas:
      "no"
      "title"
      "sub"
      "bullets"
      "takeaway"
      "visual";
  }

  h2 {
    font-size: clamp(1.45rem, 6.6vw, 2.15rem);
  }

  .status {
    min-width: 120px;
  }

  .bridge-wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  .bridge-thumb {
    width: 150px;
    max-width: 58%;
  }

  #downloadStatus {
    display: none;
  }
}
