:root {
  --canvas: #f4f8f9;
  --surface: #ffffff;
  --surface-soft: #f9fbfc;
  --ink: #172329;
  --muted: #667780;
  --line: #cbd9df;
  --line-strong: #b9ccd4;
  --accent: #0d415b;
  --accent-active: #092f41;
  --shadow: 0 18px 45px rgba(26, 55, 66, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--canvas);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(135deg, rgba(13, 65, 91, 0.04), transparent 42%),
    var(--canvas);
  color: var(--ink);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  letter-spacing: 0;
}

button {
  font: inherit;
}

a {
  color: inherit;
}

.page-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 40px);
}

.index-shell {
  place-items: start center;
  padding-top: clamp(36px, 9vw, 86px);
}

.index-panel {
  width: min(100%, 708px);
  padding: clamp(24px, 5vw, 34px);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.index-kicker {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
  text-transform: uppercase;
}

.index-panel h1 {
  margin: 0 0 26px;
  color: #111d23;
  font-size: clamp(2rem, 7vw, 2.7rem);
  line-height: 1.15;
  font-weight: 800;
}

.lesson-link {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  align-items: center;
  min-height: 104px;
  padding: 18px;
  border: 2px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-soft);
  text-decoration: none;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.lesson-link + .lesson-link {
  margin-top: 14px;
}

.lesson-link:hover,
.lesson-link:focus-visible {
  background: #eef6f9;
  border-color: #8fb0be;
  transform: translateY(-1px);
}

.lesson-link:focus-visible {
  outline: 3px solid rgba(13, 65, 91, 0.22);
  outline-offset: 3px;
}

.lesson-number {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 800;
}

.lesson-copy {
  display: grid;
  gap: 7px;
}

.lesson-copy strong {
  color: var(--ink);
  font-size: clamp(1.2rem, 4vw, 1.45rem);
  line-height: 1.25;
}

.lesson-copy span {
  color: var(--muted);
  font-size: clamp(1rem, 3.4vw, 1.13rem);
  line-height: 1.45;
  font-weight: 700;
}

.prompt-card {
  width: min(100%, 708px);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.prompt-header {
  background: var(--surface-soft);
  border-bottom: 2px solid var(--line);
  padding: clamp(24px, 4.5vw, 32px) clamp(24px, 5vw, 26px) 22px;
}

.prompt-header h1 {
  margin: 0;
  color: #111d23;
  font-size: clamp(1.7rem, 5.8vw, 2rem);
  line-height: 1.2;
  font-weight: 800;
}

.prompt-header p {
  margin: 18px 0 16px;
  color: var(--muted);
  font-size: clamp(1.15rem, 4.2vw, 1.45rem);
  line-height: 1.45;
  font-weight: 700;
}

.copy-button {
  width: 100%;
  min-height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--accent);
  cursor: pointer;
  font-size: clamp(1.45rem, 5vw, 1.7rem);
  font-weight: 800;
  line-height: 1.2;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.copy-button:hover,
.copy-button:focus-visible {
  background: #eef6f9;
  border-color: #8fb0be;
  color: var(--accent-active);
}

.copy-button:active {
  transform: translateY(1px);
}

.copy-button:focus-visible {
  outline: 3px solid rgba(13, 65, 91, 0.22);
  outline-offset: 3px;
}

.prompt-body {
  min-height: 710px;
  padding: clamp(26px, 5vw, 32px) clamp(24px, 5vw, 26px) 58px;
  background: var(--surface);
  color: #263139;
  font-size: clamp(1.25rem, 4.7vw, 1.58rem);
  font-weight: 700;
  line-height: 1.56;
  white-space: normal;
}

.prompt-body p {
  margin: 0 0 40px;
}

.prompt-body p:last-child {
  margin-bottom: 0;
}

@media (max-width: 560px) {
  .page-shell {
    align-items: start;
    padding: 10px;
  }

  .index-shell {
    padding: 10px;
  }

  .index-panel {
    padding: 22px 20px;
  }

  .lesson-link {
    grid-template-columns: 52px 1fr;
    gap: 14px;
    min-height: 92px;
    padding: 14px;
  }

  .lesson-number {
    width: 52px;
    height: 52px;
    font-size: 1.12rem;
  }

  .prompt-card {
    border-radius: 10px;
  }

  .prompt-header {
    padding: 20px 20px 18px;
  }

  .copy-button {
    min-height: 64px;
  }

  .prompt-body {
    min-height: auto;
    padding: 24px 20px 42px;
    line-height: 1.62;
  }

  .prompt-body p {
    margin-bottom: 32px;
  }
}
