:root {
  color-scheme: light;
  --green: #5f7f62;
  --green-dark: #3f6249;
  --green-soft: #e8f0e4;
  --cream: #fffaf2;
  --paper: rgba(255, 255, 255, 0.9);
  --honey: #dca75f;
  --honey-soft: #fff0d5;
  --ink: #433f37;
  --muted: #776f63;
  --line: rgba(95, 127, 98, 0.18);
  --shadow: 0 16px 40px rgba(77, 93, 69, 0.12);
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 13px;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #e9eee5;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 5%, rgba(255, 240, 213, 0.8), transparent 30%),
    linear-gradient(180deg, #eef4ea 0%, #fbf7ef 55%, #fff9f3 100%);
}

button {
  font: inherit;
}

button:focus-visible {
  outline: 3px solid rgba(220, 167, 95, 0.45);
  outline-offset: 3px;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

.app-shell {
  width: min(100%, 560px);
  min-height: 100dvh;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(245, 248, 240, 0.96), rgba(255, 249, 243, 0.97));
  box-shadow: 0 0 55px rgba(62, 80, 57, 0.16);
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  padding: calc(13px + env(safe-area-inset-top)) 18px 12px;
  border-bottom: 1px solid rgba(95, 127, 98, 0.11);
  background: rgba(247, 249, 243, 0.9);
  backdrop-filter: blur(16px);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 54px;
  height: 54px;
  padding: 4px;
  border-radius: 17px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 18px rgba(76, 95, 70, 0.12);
}

.app-kicker,
.eyebrow {
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.brand-row h1 {
  margin-top: 2px;
  color: var(--green-dark);
  font-size: 1.42rem;
  line-height: 1.1;
}

.screen {
  display: grid;
  gap: 18px;
  padding: 18px 16px calc(104px + env(safe-area-inset-bottom));
}

.hero-card,
.flow-card,
.quiet-figure,
.gallery-panel,
.study-intro,
.study-card,
.asset-guide {
  overflow: hidden;
  border: 1px solid rgba(95, 127, 98, 0.14);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.hero-card picture,
.hero-card picture img {
  width: 100%;
}

.hero-card picture img {
  aspect-ratio: 3 / 1;
  object-fit: contain;
  background: #f6eee2;
}

.hero-copy {
  padding: 20px 20px 22px;
}

.hero-copy h2,
.flow-card h2,
.study-intro h2,
.asset-guide h2 {
  margin-top: 6px;
  color: var(--green-dark);
  font-size: clamp(1.3rem, 5vw, 1.72rem);
  line-height: 1.22;
}

.hero-copy > p:last-child,
.study-intro p:last-child {
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.65;
}

.reminder-grid {
  display: grid;
  gap: 11px;
}

.reminder-card {
  position: relative;
  min-height: 112px;
  padding: 17px 18px 17px 68px;
  border: 1px solid rgba(220, 167, 95, 0.2);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(255, 250, 242, 0.98), rgba(240, 245, 236, 0.95));
  box-shadow: 0 9px 22px rgba(89, 91, 67, 0.08);
}

.reminder-card > span {
  position: absolute;
  top: 18px;
  left: 17px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 0.78rem;
  font-weight: 900;
}

.reminder-card h3 {
  color: var(--green-dark);
  font-size: 1.02rem;
}

.reminder-card p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.flow-card {
  padding: 20px;
  background: linear-gradient(145deg, #f1f6ed, #fffaf2);
}

.flow-card ol {
  display: grid;
  gap: 10px;
  margin: 17px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: flow;
}

.flow-card li {
  position: relative;
  padding: 12px 12px 12px 48px;
  border-radius: var(--radius-sm);
  color: #544f45;
  background: rgba(255, 255, 255, 0.72);
  line-height: 1.55;
  counter-increment: flow;
}

.flow-card li::before {
  position: absolute;
  top: 11px;
  left: 12px;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--green);
  content: counter(flow);
  font-size: 0.76rem;
  font-weight: 800;
}

.quiet-figure {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(140px, 0.8fr);
  align-items: center;
}

.quiet-figure img {
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: contain;
  background: #f7eee2;
}

.quiet-figure figcaption {
  display: grid;
  gap: 7px;
  padding: 18px;
}

.quiet-figure strong {
  color: var(--green-dark);
  font-size: 1.08rem;
}

.quiet-figure span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.section-toggle,
.study-toggle {
  width: 100%;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  text-align: left;
}

.section-toggle span {
  display: grid;
  gap: 3px;
}

.section-toggle small {
  color: var(--muted);
  font-size: 0.76rem;
}

.section-toggle strong {
  color: var(--green-dark);
  font-size: 1.08rem;
}

.section-toggle b,
.study-toggle > b {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 1.25rem;
}

.companion-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 14px 16px;
}

.companion-gallery figure {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--cream);
}

.companion-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #f6eee3;
}

.companion-gallery figcaption {
  min-height: 48px;
  padding: 9px 10px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.study-intro {
  display: grid;
  grid-template-columns: minmax(130px, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
}

.study-intro > img {
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: contain;
  background: #f6eee2;
}

.study-intro > div {
  padding: 20px;
}

.quality-grid {
  display: grid;
  gap: 10px;
}

.quality-grid article {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 13px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.78);
}

.quality-grid img {
  width: 76px;
  height: 76px;
  border-radius: 15px;
  object-fit: contain;
  background: var(--honey-soft);
}

.quality-grid h3 {
  color: var(--green-dark);
  font-size: 1rem;
}

.quality-grid p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.study-list {
  display: grid;
  gap: 12px;
}

.study-toggle {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 34px;
  gap: 13px;
  align-items: center;
  padding: 14px;
  text-align: left;
}

.study-toggle > img {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  object-fit: contain;
  background: #f7efe2;
}

.study-toggle > span {
  display: grid;
  gap: 5px;
}

.study-toggle strong {
  color: var(--green-dark);
  font-size: 1rem;
}

.study-toggle small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.study-body {
  display: grid;
  gap: 12px;
  padding: 0 16px 17px;
}

.study-body section {
  padding: 14px 15px;
  border-radius: var(--radius-sm);
  background: #f2f6ee;
}

.study-body .mistake-panel {
  background: #fff5e5;
}

.study-body h3 {
  color: var(--green-dark);
  font-size: 0.9rem;
}

.study-body ul {
  display: grid;
  gap: 7px;
  margin: 10px 0 0;
  padding-left: 19px;
}

.study-body li {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.asset-guide {
  padding: 20px;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 17px;
}

.asset-grid figure {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fffaf2;
}

.asset-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #f7efe2;
}

.asset-grid figcaption {
  padding: 8px 5px 9px;
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}

.bottom-nav {
  position: fixed;
  z-index: 30;
  bottom: 0;
  left: 50%;
  display: grid;
  width: min(100%, 560px);
  grid-template-columns: repeat(2, 1fr);
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(95, 127, 98, 0.14);
  background: rgba(255, 252, 246, 0.95);
  box-shadow: 0 -12px 28px rgba(65, 78, 58, 0.08);
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
}

.nav-item {
  display: grid;
  min-height: 58px;
  place-items: center;
  gap: 2px;
  border: 0;
  border-radius: 17px;
  color: #756e63;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.nav-item.is-active {
  color: var(--green-dark);
  background: var(--green-soft);
}

.nav-icon {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

@media (max-width: 480px) {
  .screen {
    padding-right: 13px;
    padding-left: 13px;
  }

  .quiet-figure,
  .study-intro {
    grid-template-columns: 1fr;
  }

  .quiet-figure img,
  .study-intro > img {
    min-height: 0;
    aspect-ratio: 3 / 1;
  }

  .study-intro > div {
    padding: 17px 18px 20px;
  }
}

@media (max-width: 360px) {
  .companion-gallery {
    grid-template-columns: 1fr;
  }

  .asset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .study-toggle {
    grid-template-columns: 58px minmax(0, 1fr) 30px;
  }

  .study-toggle > img {
    width: 58px;
    height: 58px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
