/* ============================================
   寫出我的故事 - 全站樣式
   設計風格:活潑、繽紛、溫暖,適合小學 3-5 年級
   ============================================ */

:root {
  /* 主色票 */
  --c-orange:  #FF9B4D;
  --c-orange-deep: #FF7A1F;
  --c-yellow:  #FFD15C;
  --c-yellow-soft: #FFE9A8;
  --c-pink:    #FF8FB1;
  --c-pink-soft: #FFD3DF;
  --c-sky:     #74C8FF;
  --c-sky-deep: #2EA1F2;
  --c-mint:    #8FE2B6;
  --c-mint-deep: #34C77B;
  --c-cream:   #FFF8EC;
  --c-paper:   #FFFCF5;
  --c-ink:     #3B2E2A;
  --c-ink-soft: #6B5B53;

  /* 圓潤字體堆疊 */
  --font-display: "Zen Maru Gothic", "Noto Sans TC", "PingFang TC", "微軟正黑體", system-ui, sans-serif;
  --font-body:    "Noto Sans TC", "PingFang TC", "微軟正黑體", system-ui, sans-serif;
  --font-hand:    "Zen Maru Gothic", "Comic Sans MS", "Noto Sans TC", sans-serif;

  /* 圓角 */
  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-pill: 999px;

  /* 陰影 */
  --shadow-sm: 0 4px 14px rgba(255, 155, 77, 0.18);
  --shadow-md: 0 10px 30px rgba(255, 155, 77, 0.22);
  --shadow-card: 0 6px 22px rgba(59, 46, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

html {
  /* 防止任何子元素造成橫向滾動 */
  overflow-x: hidden;
  /* iOS safe-area 預留空間 */
  scroll-padding-top: env(safe-area-inset-top);
}

body {
  /* 防止下拉/上拉 refresh 觸發(尤其 iOS Safari) */
  overscroll-behavior-y: contain;
  /* 支援 dvh 喺 iOS 用動態 viewport,fallback 返 vh */
  min-height: 100vh;
  min-height: 100dvh;
}

body {
  font-family: var(--font-body);
  color: var(--c-ink);
  background:
    radial-gradient(ellipse at 10% 10%, #FFE9A8 0%, transparent 50%),
    radial-gradient(ellipse at 90% 30%, #FFD3DF 0%, transparent 50%),
    radial-gradient(ellipse at 80% 90%, #C6EFFF 0%, transparent 50%),
    radial-gradient(ellipse at 20% 80%, #D9F7E4 0%, transparent 50%),
    var(--c-cream);
  min-height: 100vh;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ============== 頂部 Header / 語言切換 ============== */
.page-toolbar {
  position: fixed;
  top: 14px;
  right: 18px;
  z-index: 120;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(255, 252, 245, 0.92);
  border: 2px dashed rgba(255, 155, 77, 0.35);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-card);
}
.page-toolbar__label {
  font-size: 12px;
  color: var(--c-ink-soft);
  margin-right: 4px;
}
.lang-switch {
  border: 0;
  background: transparent;
  color: var(--c-ink);
  font-weight: 700;
  font-size: 14px;
  padding: 8px 14px;
  min-height: 44px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.lang-switch:hover { background: var(--c-yellow-soft); }
.lang-switch.is-selected,
.lang-switch[aria-pressed="true"] {
  background: var(--c-orange);
  color: white;
}
.lang-switch:focus-visible { outline: 3px solid var(--c-sky); outline-offset: 2px; }
@media (max-width: 600px) {
  .page-toolbar { top: 8px; right: 8px; }
  .lang-switch { padding: 6px 10px; min-height: 40px; font-size: 13px; }
}

/* ============== 頂部 Header ============== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 248, 236, 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 2px dashed rgba(255, 155, 77, 0.3);
}

.site-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand__logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--c-orange) 0%, var(--c-pink) 100%);
  display: grid;
  place-items: center;
  font-size: 26px;
  box-shadow: var(--shadow-sm);
}

.brand__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.02em;
  margin: 0;
  line-height: 1.1;
}

.brand__subtitle {
  font-size: 12px;
  color: var(--c-ink-soft);
  letter-spacing: 0.1em;
}

.header-nav {
  display: flex;
  gap: 8px;
}

.header-nav a {
  text-decoration: none;
  color: var(--c-ink);
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  transition: all 0.2s ease;
}

.header-nav a:hover {
  background: var(--c-yellow-soft);
}

.header-nav a.active {
  background: var(--c-orange);
  color: white;
}

/* ============== 主畫面容器 ============== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px 24px 80px;
}

/* ============== Hero 區 ============== */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 40px 0 56px;
}

.hero__greeting {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 14px;
  color: var(--c-orange-deep);
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.15;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}

.hero__title .hl-orange { color: var(--c-orange-deep); }
.hero__title .hl-pink   { color: var(--c-pink); }
.hero__title .hl-sky    { color: var(--c-sky-deep); }

.hero__lead {
  font-size: 18px;
  color: var(--c-ink-soft);
  margin: 0 0 28px;
  max-width: 540px;
}

.hero__cta-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero__illustration {
  position: relative;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}

.hero__illustration .blob {
  position: absolute;
  inset: 8%;
  background: linear-gradient(135deg, #FFE9A8 0%, #FFD3DF 50%, #C6EFFF 100%);
  border-radius: 48% 52% 64% 36% / 52% 36% 64% 48%;
  filter: blur(2px);
  animation: morph 18s ease-in-out infinite;
  z-index: 0;
}

@keyframes morph {
  0%, 100% { border-radius: 48% 52% 64% 36% / 52% 36% 64% 48%; }
  33%      { border-radius: 60% 40% 50% 50% / 40% 60% 40% 60%; }
  66%      { border-radius: 36% 64% 56% 44% / 60% 40% 50% 50%; }
}

.hero__illustration .character {
  position: relative;
  z-index: 1;
  width: 280px;
  height: auto;
  max-width: 100%;
  filter: drop-shadow(0 14px 20px rgba(255, 122, 31, 0.25));
  animation: float 5s ease-in-out infinite;
  display: block;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

.hero__speech {
  position: absolute;
  z-index: 2;
  background: white;
  border-radius: var(--r-md);
  padding: 10px 16px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--shadow-card);
}

.hero__speech.s1 { top: 6%; left: 4%; transform: rotate(-6deg); }
.hero__speech.s2 { bottom: 12%; right: 4%; transform: rotate(4deg); }

/* ============== 按鈕 ============== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  border: none;
  cursor: pointer;
  padding: 14px 28px;
  border-radius: var(--r-pill);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-decoration: none;
  /* 防止雙擊 zoom & 加速 multi-touch gesture */
  touch-action: manipulation;
  /* 防止長按選到字 */
  -webkit-user-select: none;
  user-select: none;
  /* Tap highlight 唔顯示 iOS 預設灰底 */
  -webkit-tap-highlight-color: transparent;
}

/* 觸覺反饋:按下縮細 + 變暗 */
.btn:active { transform: translateY(2px) scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn:disabled:active { transform: none; }

.btn--primary {
  background: linear-gradient(135deg, var(--c-orange) 0%, var(--c-pink) 100%);
  color: white;
  box-shadow: 0 8px 22px rgba(255, 122, 31, 0.4);
}
.btn--primary:hover { box-shadow: 0 12px 30px rgba(255, 122, 31, 0.5); }
.btn--primary:active { box-shadow: 0 4px 12px rgba(255, 122, 31, 0.3); }

.btn--ghost {
  background: white;
  color: var(--c-ink);
  border: 2px solid var(--c-orange);
  box-shadow: var(--shadow-card);
}
.btn--ghost:hover { background: var(--c-yellow-soft); }

.btn--sky {
  background: var(--c-sky-deep);
  color: white;
}
.btn--sky:hover { background: var(--c-sky); }
.btn--sky:active { background: var(--c-sky-deep); filter: brightness(0.92); }

.btn--mint {
  background: var(--c-mint-deep);
  color: white;
}

.btn--sm { padding: 10px 18px; font-size: 14px; min-height: 44px; }  /* Apple HIG ≥44px touch target */

/* ============== 卡片 ============== */
.card {
  background: white;
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
  border: 2px solid rgba(255, 215, 92, 0.4);
}

.card__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card__title .badge {
  font-size: 12px;
  background: var(--c-orange);
  color: white;
  padding: 2px 10px;
  border-radius: var(--r-pill);
  font-weight: 700;
}

/* ============== 區塊 ============== */
.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 8px 0 20px;
}

.section-title h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  margin: 0;
}

.section-title .sub {
  font-size: 13px;
  color: var(--c-ink-soft);
}

/* ============== 額度資訊 ============== */
.usage-strip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: white;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  border: 2px solid var(--c-yellow);
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--shadow-card);
  white-space: nowrap;
}

.usage-strip__icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-yellow) 0%, var(--c-orange) 100%);
  display: grid;
  place-items: center;
  font-size: 16px;
}

.usage-strip strong {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--c-orange-deep);
}

/* ============== 最近作品列表 ============== */
.recent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.story-card {
  background: white;
  border-radius: var(--r-md);
  padding: 22px;
  border: 2px solid transparent;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  cursor: pointer;
}

.story-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.story-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--r-md);
  border: 2px solid var(--c-yellow);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.story-card:hover::before { opacity: 1; }

.story-card__type {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 10px;
}
.story-card__type.story { background: var(--c-pink-soft); color: #B23A66; }
.story-card__type.diary { background: var(--c-yellow-soft); color: #8A5800; }

.story-card__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 18px;
  margin: 0 0 6px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.story-card__author {
  font-size: 13px;
  color: var(--c-ink-soft);
  margin-bottom: 8px;
}

.story-card__summary {
  font-size: 14px;
  color: var(--c-ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.story-card__meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--c-ink-soft);
  border-top: 1px dashed #EADFCB;
  padding-top: 10px;
}

/* ============== 寫作流程 ============== */
.step-wrap {
  background: white;
  border-radius: var(--r-lg);
  padding: 28px 28px 36px;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
}

.step-progress {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

/* 一步一屏:PC 兩欄 / mobile 單欄 */
.step-pane {
  display: none;
}
.step-pane.active {
  display: block;
}

.step-screen {
  display: block;
}

.step-screen__form {
  width: 100%;
}

.step-progress__item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--c-ink-soft);
  font-weight: 700;
  font-size: 13px;
}

.step-progress__item .dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--c-cream);
  border: 2px solid #EADFCB;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
}

.step-progress__item.active { color: var(--c-orange-deep); }
.step-progress__item.active .dot {
  background: var(--c-orange);
  color: white;
  border-color: var(--c-orange);
  box-shadow: 0 0 0 4px rgba(255, 155, 77, 0.18);
}

.step-progress__item.done { color: var(--c-mint-deep); }
.step-progress__item.done .dot {
  background: var(--c-mint-deep);
  color: white;
  border-color: var(--c-mint-deep);
}

.step-progress__sep {
  flex: 1;
  height: 2px;
  background: #EADFCB;
  margin: 0 8px;
  min-width: 24px;
}

.step-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.step-emoji {
  font-size: 56px;
  line-height: 1;
}

.step-heading h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 28px;
  margin: 0;
}

.step-heading p {
  margin: 4px 0 0;
  color: var(--c-ink-soft);
  font-size: 14px;
}

/* 弱化版 prompt-card:作為 step 內小提示,不再喧賓奪主 */
.prompt-card {
  background: rgba(255, 248, 236, 0.6);
  border-radius: var(--r-md);
  padding: 14px 18px;
  margin: 12px 0 20px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--c-ink-soft);
  border: 1px dashed rgba(255, 155, 77, 0.3);
}

.prompt-card strong {
  color: var(--c-orange-deep);
}

/* 輸入元件 */
.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 8px;
  color: var(--c-ink);
}

.field .hint {
  font-size: 13px;
  color: var(--c-ink-soft);
  margin-bottom: 8px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  padding: 14px 18px;
  border: 2px solid #F0E2C6;
  border-radius: var(--r-md);
  background: var(--c-paper);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  color: var(--c-ink);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--c-orange);
  box-shadow: 0 0 0 4px rgba(255, 155, 77, 0.18);
}

.field textarea { min-height: 120px; resize: vertical; }

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.choice {
  position: relative;
  background: white;
  border: 2px solid #F0E2C6;
  border-radius: var(--r-md);
  padding: 18px;
  text-align: center;
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  transition: all 0.15s ease;
}

.choice:hover {
  border-color: var(--c-orange);
  background: var(--c-yellow-soft);
}

.choice.is-selected {
  border-color: var(--c-orange);
  background: linear-gradient(135deg, #FFE9A8 0%, #FFD3DF 100%);
  box-shadow: var(--shadow-sm);
}

.choice .emoji {
  display: block;
  font-size: 38px;
  margin-bottom: 6px;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: var(--c-cream);
  border: 2px solid transparent;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip:hover { border-color: var(--c-yellow); }
.chip.is-selected {
  background: var(--c-sky);
  color: white;
  border-color: var(--c-sky-deep);
}

/* 按鈕組 */
.step-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

/* ===== 步驟 2 單頁表單 ===== */
.three-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.three-fields .field { margin-bottom: 0; }

#in-event {
  min-height: 140px;
  font-family: var(--font-hand);
  font-size: 16px;
  line-height: 1.7;
}

/* 16 種心情 grid(預設一排 16 個;窄螢幕再 wrap) */
.mood-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 40px);
  gap: 6px;
  max-width: 100%;
  justify-content: start;
}

.mood-pick {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--c-cream);
  border: 2px solid #F0E2C6;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 18px;
  padding: 0;
  transition: all 0.15s ease;
}

.mood-pick:hover {
  border-color: var(--c-orange);
  transform: translateY(-2px);
}

.mood-pick.is-selected {
  background: linear-gradient(135deg, var(--c-orange) 0%, var(--c-pink) 100%);
  border-color: var(--c-orange);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.mood-pick[data-label]::after {
  content: attr(data-label);
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 700;
  color: var(--c-ink-soft);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.mood-pick:hover[data-label]::after,
.mood-pick.is-selected[data-label]::after {
  opacity: 1;
  color: var(--c-orange-deep);
}

/* 心情變體按鈕列 */
.mood-variations {
  background: linear-gradient(135deg, #FFF8E8 0%, #FFEAF1 100%);
  border-radius: var(--r-md);
  padding: 16px;
  margin-top: 28px;
  border: 2px dashed var(--c-orange);
}

.mood-variations__title {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--c-orange-deep);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mood-variation-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: white;
  border: 2px solid transparent;
  border-radius: var(--r-md);
  padding: 12px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.6;
  transition: all 0.15s ease;
}

.mood-variation-btn:hover {
  border-color: var(--c-orange);
  background: var(--c-yellow-soft);
}

/* 柔和提示:選了心情但還沒用變體 */
.mood-hint {
  margin-top: 10px;
  padding: 10px 14px;
  background: #FFF9E6;
  border-left: 4px solid var(--c-yellow);
  border-radius: 8px;
  font-size: 13px;
  color: var(--c-ink);
  line-height: 1.6;
  animation: mood-hint-fade 0.3s ease;
}

@keyframes mood-hint-fade {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mood-variation-btn .tag-mini {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 800;
  margin-right: 6px;
  background: var(--c-orange);
  color: white;
}

.mood-variation-btn .tag-mini.body   { background: var(--c-sky-deep); }
.mood-variation-btn .tag-mini.simile { background: var(--c-pink); }

/* 連接詞按鈕列 */
.connector-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
}

.connector-btn {
  padding: 8px 16px;
  border-radius: var(--r-pill);
  background: white;
  border: 2px solid #F0E2C6;
  color: var(--c-ink);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.connector-btn:hover {
  background: var(--c-yellow-soft);
  border-color: var(--c-orange);
}

.connector-btn:active {
  transform: scale(0.96);
}

/* 即時結果框(contenteditable) */
.live-preview {
  background: linear-gradient(135deg, #FFFCF5 0%, #FFF8E8 100%);
  border: 3px dashed var(--c-orange);
  border-radius: var(--r-lg);
  padding: 20px 24px;
  margin-top: 12px;
  position: relative;
}

.live-preview__label {
  position: absolute;
  top: -12px;
  left: 16px;
  background: white;
  padding: 2px 12px;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  color: var(--c-orange-deep);
  box-shadow: var(--shadow-card);
  letter-spacing: 0.05em;
}

.live-preview__content {
  font-family: var(--font-hand);
  font-size: 17px;
  line-height: 1.85;
  color: var(--c-ink);
  min-height: 80px;
  outline: none;
  white-space: pre-wrap;
  word-break: break-word;
}

.live-preview__content:empty::before {
  content: "📖 你的故事會在這裡即時出現…";
  color: var(--c-ink-soft);
  font-style: italic;
  opacity: 0.6;
}

.live-preview__meta {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #EADFCB;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--c-ink-soft);
  font-weight: 700;
}

@media (max-width: 640px) {
  .three-fields { grid-template-columns: 1fr; }
  #in-event { min-height: 120px; }
  .mood-grid { grid-template-columns: repeat(auto-fill, 40px); gap: 6px; }
  .mood-pick { font-size: 16px; border-radius: 10px; }
  .live-preview { padding: 16px; }
  .live-preview__content { font-size: 16px; }
}

@media (max-width: 420px) {
  .mood-grid { grid-template-columns: repeat(auto-fill, 40px); gap: 4px; }
  .mood-pick { font-size: 14px; }
}

/* 大綱卡片 */
.outline-card {
  background: var(--c-cream);
  border: 2px dashed var(--c-orange);
  border-radius: var(--r-md);
  padding: 18px 22px;
  margin-top: 24px;
  font-size: 15px;
  line-height: 1.8;
}
.outline-card h4 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  color: var(--c-orange-deep);
}

/* 情緒對比 */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 12px 0 16px;
}

.compare-card {
  border-radius: var(--r-md);
  padding: 16px 18px;
  border: 2px solid;
  font-size: 14px;
  line-height: 1.7;
}

.compare-card.before {
  background: #F5F0E6;
  border-color: #D4C9B0;
}

.compare-card.after {
  background: linear-gradient(135deg, #FFF5DD 0%, #E5FBE5 100%);
  border-color: var(--c-mint-deep);
}

.compare-card h5 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

/* AI 結果區 */
.ai-result {
  background: white;
  border-radius: var(--r-lg);
  padding: 32px;
  box-shadow: var(--shadow-card);
  border: 3px solid var(--c-yellow);
}

/* ============== 小兔子老師評分卡 ============== */
.eval-card {
  background: linear-gradient(160deg, #FFF8E8 0%, #FFEAF1 60%, #E8F6FF 100%);
  border-radius: var(--r-lg);
  padding: 28px;
  margin-top: 24px;
  border: 3px solid var(--c-orange);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.eval-card::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(255, 209, 92, 0.4) 0%, transparent 70%);
  pointer-events: none;
}

.eval-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.eval-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-orange) 0%, var(--c-pink) 100%);
  display: grid;
  place-items: center;
  font-size: 34px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.eval-title {
  flex: 1;
  min-width: 0;
}

.eval-title h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  color: var(--c-orange-deep);
}

.eval-title p {
  margin: 4px 0 0;
  color: var(--c-ink-soft);
  font-size: 13px;
}

.eval-score {
  display: flex;
  align-items: baseline;
  gap: 8px;
  background: white;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-card);
}

.eval-score__num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 32px;
  color: var(--c-orange-deep);
  line-height: 1;
}

.eval-score__label {
  font-size: 12px;
  color: var(--c-ink-soft);
  font-weight: 700;
}

.eval-stars {
  font-size: 22px;
  letter-spacing: 4px;
  margin-bottom: 12px;
}

.eval-grade {
  background: white;
  padding: 10px 18px;
  border-radius: var(--r-md);
  font-weight: 800;
  color: var(--c-orange-deep);
  margin-bottom: 18px;
  display: inline-block;
  font-size: 15px;
  box-shadow: var(--shadow-card);
}

.eval-section {
  background: white;
  border-radius: var(--r-md);
  padding: 16px 20px;
  margin-bottom: 12px;
  border-left: 5px solid;
  position: relative;
  z-index: 1;
}

.eval-section h5 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.eval-section ul {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--c-ink);
}

.eval-section.strengths  { border-color: var(--c-mint-deep); }
.eval-section.strengths h5 { color: var(--c-mint-deep); }

.eval-section.improvements { border-color: var(--c-orange); }
.eval-section.improvements h5 { color: var(--c-orange-deep); }

.eval-section.suggestions { border-color: var(--c-sky-deep); }
.eval-section.suggestions h5 { color: var(--c-sky-deep); }

.eval-section.demo {
  border-color: var(--c-pink);
  background: linear-gradient(135deg, #FFFCF5 0%, #FFF0F5 100%);
}
.eval-section.demo h5 { color: #B23A66; }

.eval-demo-text {
  font-family: var(--font-hand);
  font-size: 16px;
  line-height: 1.85;
  white-space: pre-wrap;
  color: var(--c-ink);
}
.feedback-translation { font-size: 13px; color: var(--c-ink-soft); margin-top: 4px; }
.feedback-grade-translation { font-size: 14px; }
.feedback-encouragement { font-size: 14px; }
.feedback-failure { border-color: #C0392B; background: #FFF3F0; }
.feedback-card { margin-top:16px; background:#FFF5DD; border-left:6px solid var(--c-orange); padding:16px; border-radius:14px; }
.feedback-card .eval-section { margin-top: 10px; }
.feedback-plain { white-space: pre-wrap; font-size: 14px; line-height: 1.8; }
.eval-section.feedback-failure { border-color:#C0392B; background:#FFF3F0; }
.eval-section.rubric ul li { font-size: 14px; line-height: 1.8; }

/* 老師示範嘅對白框:highlight 內嵌「…」對話 */
.dialogue {
  display: inline-block;
  background: linear-gradient(135deg, #FFF6D6 0%, #FFEFC9 100%);
  border-left: 4px solid var(--c-orange);
  padding: 3px 10px 3px 8px;
  border-radius: 4px 10px 10px 4px;
  font-weight: 700;
  color: var(--c-orange-deep);
  font-style: italic;
  margin: 0 2px;
  box-shadow: 0 2px 6px rgba(255, 155, 77, 0.15);
  white-space: pre-wrap;
}

.eval-encouragement {
  text-align: center;
  margin-top: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--r-pill);
  font-weight: 800;
  font-size: 16px;
  color: var(--c-orange-deep);
  position: relative;
  z-index: 1;
}

@media (max-width: 640px) {
  .eval-card { padding: 20px 18px; border-radius: var(--r-md); }
  .eval-avatar { width: 52px; height: 52px; font-size: 28px; }
  .eval-title h4 { font-size: 18px; }
  .eval-score { padding: 8px 14px; }
  .eval-score__num { font-size: 26px; }
  .eval-stars { font-size: 18px; letter-spacing: 2px; }
  .eval-section { padding: 14px 16px; }
  .eval-section ul { font-size: 13px; }
  .eval-demo-text { font-size: 15px; }
}

.ai-result__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--c-orange) 0%, var(--c-pink) 100%);
  color: white;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 16px;
}

.ai-result__story {
  font-family: var(--font-hand);
  font-size: 18px;
  line-height: 2;
  white-space: pre-wrap;
  padding: 20px;
  background: var(--c-cream);
  border-radius: var(--r-md);
  margin-bottom: 24px;
}

.ai-result__feedback {
  background: #FFF5DD;
  border-left: 6px solid var(--c-orange);
  padding: 20px 24px;
  border-radius: var(--r-md);
  white-space: pre-wrap;
  font-size: 15px;
  line-height: 1.8;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 248, 236, 0.85);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  z-index: 1000;
}

.loading-card {
  background: white;
  padding: 28px 36px;
  border-radius: var(--r-lg);
  text-align: center;
  box-shadow: var(--shadow-md);
  max-width: calc(100vw - 32px);
}

.loading-card p {
  margin: 8px 0 0;
  color: var(--c-ink-soft);
  font-weight: 600;
}

.loading-card .spinner {
  width: 64px;
  height: 64px;
  border: 6px solid var(--c-yellow-soft);
  border-top-color: var(--c-orange);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin: 0 auto 12px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============== 完整列表 (Table) ============== */
.table-wrap {
  background: white;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  border: 2px solid rgba(255, 215, 92, 0.4);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.data-table thead {
  background: linear-gradient(135deg, #FFE9A8 0%, #FFD3DF 100%);
}

.data-table th {
  padding: 14px 16px;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  color: var(--c-ink);
  letter-spacing: 0.04em;
}

.data-table td {
  padding: 14px 16px;
  border-top: 1px dashed #EADFCB;
  vertical-align: middle;
}

.data-table tbody tr:hover { background: var(--c-cream); }

.data-table .actions {
  display: flex;
  gap: 6px;
}

.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 800;
}

.tag.story { background: var(--c-pink-soft); color: #B23A66; }
.tag.diary { background: var(--c-yellow-soft); color: #8A5800; }

/* 漫畫結果 */
.comic-viewer {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 16px 0;
}
.comic-viewer.six { grid-template-columns: repeat(3, 1fr); }
.comic-viewer img {
  width: 100%;
  border-radius: var(--r-md);
  border: 3px solid white;
  box-shadow: var(--shadow-card);
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--c-cream);
}
/* 單張漫畫圖(一張圖內含 4/6 格) */
.comic-viewer.single {
  display: block;
  text-align: center;
}
.comic-viewer.single img.comic-single-img {
  width: 100%;
  max-width: 720px;
  max-height: 60vh;             /* 限住高度,避免 modal 內容過長 */
  object-fit: contain;
  background: var(--c-cream);
  border-radius: var(--r-md);
  border: 3px solid white;
  box-shadow: var(--shadow-md);
  display: inline-block;
}
.comic-panels-summary {
  margin-top: 16px;
  background: var(--c-cream);
  padding: 14px 18px;
  border-radius: var(--r-md);
  text-align: left;
  border-left: 6px solid var(--c-orange);
}
.comic-panels-summary strong {
  display: block;
  margin-bottom: 8px;
  color: var(--c-orange-deep);
}
.comic-panels-summary ol {
  margin: 0;
  padding-left: 22px;
  line-height: 1.7;
  font-size: 14px;
}
.comic-panels-summary li {
  margin-bottom: 4px;
}
.comic-panel {
  background: white;
  border-radius: var(--r-md);
  padding: 8px;
  box-shadow: var(--shadow-card);
}
.comic-panel img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  background: var(--c-cream);
  display: block;
}
.comic-panel__caption {
  font-size: 13px;
  color: var(--c-ink-soft);
  margin-top: 8px;
  line-height: 1.5;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(59, 46, 42, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;     /* 由 start 開始，咁 max-height 嘅 modal 內部可 scroll */
  justify-content: center;
  z-index: 200;
  padding: 24px;
  padding-top: calc(24px + env(safe-area-inset-top));
  padding-bottom: calc(24px + env(safe-area-inset-bottom));  /* iOS home indicator 預留 */
  overflow-y: auto;             /* 後備：若 modal 都 height 自己超，backdrop 自身也 scroll */
  overscroll-behavior: contain;  /* 防止 iOS pull-to-refresh */
}

.modal {
  background: white;
  border-radius: var(--r-lg);
  max-width: 520px;
  width: 100%;
  /* iOS dynamic viewport:用 dvh 排除 URL bar,fallback 返 vh */
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;             /* 內容長過時 modal 內部 scroll */
  padding: 32px;
  box-shadow: var(--shadow-md);
  /* 平滑 scroll */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.modal h3 {
  font-family: var(--font-display);
  margin: 0 0 8px;
  font-size: 22px;
}

/* ============== 提示訊息 ============== */
.toast {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: var(--c-ink);
  color: white;
  padding: 14px 22px;
  border-radius: var(--r-pill);
  font-weight: 700;
  box-shadow: var(--shadow-md);
  z-index: 500;
  animation: slideUp 0.25s ease;
  max-width: calc(100vw - 32px);
  text-align: center;
}

.toast.error { background: #C0392B; }
.toast.success { background: var(--c-mint-deep); }

@keyframes slideUp {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ============== Footer ============== */
.site-footer {
  text-align: center;
  padding: 40px 24px calc(60px + env(safe-area-inset-bottom));
  color: var(--c-ink-soft);
  font-size: 14px;
}

/* iOS safe area for sticky header */
.site-header {
  padding-top: env(safe-area-inset-top);
}

/* ============== 管理員入口 / 管理員模式 ============== */

/* 底部低調入口:唔搶小朋友注意力,但揾得返 */
.admin-entry {
  display: inline-block;
  color: var(--c-ink-soft);
  opacity: .55;
  font-size: 13px;
  text-decoration: none;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px dashed rgba(107, 91, 83, .35);
  transition: opacity .2s ease, border-color .2s ease;
  cursor: pointer;
}
.admin-entry:hover,
.admin-entry:focus-visible {
  opacity: 1;
  border-color: var(--c-orange);
  color: var(--c-orange);
}

/* 放喺 footer 一行文字入面:完全跟左邊文字個樣 */
.site-footer .admin-entry {
  padding: 0;
  border: 0;
  border-radius: 0;
  color: inherit;
  opacity: 1;
  font-size: inherit;
}
.site-footer .admin-entry:hover,
.site-footer .admin-entry:focus-visible {
  color: var(--c-orange);
  border-color: transparent;
}

/* 管理員模式提示列 */
.admin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: #FFF1D6;
  border: 2px solid var(--c-orange);
  border-radius: 14px;
  padding: 12px 18px;
  margin-bottom: 18px;
  font-weight: 700;
  color: #A05A00;
  font-size: 14px;
}

/* 危險操作按鈕(刪除) */
.btn--danger {
  background: #E8544A;
  color: #fff;
  border-color: #E8544A;
  box-shadow: 0 4px 0 #B93A32;
}
.btn--danger:hover {
  background: #D8453B;
  border-color: #D8453B;
}
.btn--danger:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #B93A32;
}
.btn--danger:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* ============== 響應式 ============== */

/* === 平板:≤900px === */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px 0 36px;
    text-align: center;
  }
  .hero__illustration { max-width: 280px; margin: 0 auto; order: -1; }
  .hero__lead { margin-left: auto; margin-right: auto; }
  .hero__cta-group { justify-content: center; }
  .hero__greeting { margin: 0 auto 16px; }
}

/* === 中手機:≤640px === */
@media (max-width: 640px) {
  /* Header 簡化 */
  .site-header__inner { padding: 12px 16px; flex-wrap: wrap; gap: 8px; }
  .brand { flex: 1; min-width: 0; }
  .brand__title { font-size: 18px; }
  .brand__subtitle { display: none; }
  .header-nav { width: 100%; justify-content: center; gap: 4px; }
  .header-nav a { padding: 8px 12px; font-size: 13px; flex: 1; text-align: center; max-width: 120px; }

  /* Container 留白 */
  .container { padding: 20px 14px 60px; }

  /* Hero */
  .hero { padding: 16px 0 24px; }
  .hero__title { font-size: 30px; line-height: 1.2; }
  .hero__lead { font-size: 15px; }
  .hero__illustration { max-width: 220px; }
  .hero__speech { font-size: 12px; padding: 8px 12px; }

  /* 卡片內距 */
  .card, .step-wrap, .ai-result { padding: 18px; border-radius: var(--r-md); }
  .ai-result__story { padding: 16px; font-size: 16px; line-height: 1.85; }
  .ai-result__feedback { padding: 16px; font-size: 14px; }

  /* 觸控目標 ≥44px */
  .btn { padding: 14px 22px; min-height: 48px; font-size: 15px; }
  .btn--sm { padding: 10px 14px; min-height: 40px; font-size: 13px; }
  .field input, .field textarea, .field select {
    padding: 14px 16px;
    font-size: 16px; /* 防止 iOS 自動放大 */
    border-radius: var(--r-md);
  }

  /* 步驟區 */
  .step-progress {
    margin-bottom: 18px;
    gap: 4px;
    justify-content: space-between;
  }
  .step-progress__item { font-size: 11px; gap: 4px; }
  .step-progress__item .dot { width: 24px; height: 24px; font-size: 11px; }
  .step-progress__item .label { display: none; }
  .step-progress__sep { display: none; }

  /* 選擇格:手機 2 欄(emotion 6 個剛好 3 行) */
  .choice-grid { gap: 10px; }
  .choice { padding: 14px 10px; font-size: 14px; border-radius: var(--r-md); }
  .choice .emoji { font-size: 32px; margin-bottom: 4px; }

  /* 情緒 16 個改 4×4 排列,每格更大,更易點 */
  .mood-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 10px !important;
  }
  .mood-pick {
    font-size: 28px !important;
    min-height: 56px;
  }

  /* 步驟進度:dot 加大 + 完成態打剔 */
  .step-progress .dot {
    width: 32px !important;
    height: 32px !important;
    font-size: 14px !important;
  }
  .step-progress__item.done .dot::before {
    content: "✓";
  }
  .step-progress__item.done .dot {
    font-size: 0 !important;  /* 隱藏原本數字 */
  }
  .step-progress__item.done .dot::before {
    font-size: 16px;
  }

  /* 連接詞 chip */
  .chip { padding: 7px 12px; font-size: 13px; }

  /* 漫畫單圖:mobile 大圖降 max-height 避免大過 screen */
  .comic-viewer.single img.comic-single-img {
    max-height: 50vh;
  }

  /* 比較卡 */
  .compare-grid { grid-template-columns: 1fr; gap: 12px; }
  .compare-card { padding: 14px; font-size: 13px; }

  /* 漫畫 */
  .comic-viewer, .comic-viewer.six { grid-template-columns: 1fr 1fr; gap: 10px; }
  .comic-panel__caption { font-size: 12px; }

  /* Step actions:按鈕換行,主按鈕全寬 */
  .step-actions {
    flex-direction: column-reverse;
    gap: 10px;
    margin-top: 20px;
  }
  .step-actions .btn { width: 100%; }
  .step-actions > span { display: none; }
  .ai-result .step-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .ai-result .step-actions .btn { flex: 1; min-width: 0; width: auto; }

  /* Modal */
  .modal { padding: 22px; border-radius: var(--r-md); }
  .modal-backdrop { padding: 14px; align-items: flex-end; }
  .modal h3 { font-size: 19px; }

  /* 大綱卡 */
  .outline-card { padding: 14px 16px; font-size: 14px; }

  /* 表格 → 卡片模式 */
  .table-wrap { border: none; box-shadow: none; background: transparent; }
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table tr {
    background: white;
    border-radius: var(--r-md);
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-card);
    border: 2px solid rgba(255, 215, 92, 0.4);
  }
  .data-table td {
    padding: 4px 0;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
  }
  .data-table td + td { margin-top: 6px; }
  .data-table td[data-label]::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--c-ink-soft);
    font-size: 13px;
    flex-shrink: 0;
    min-width: 60px;
  }
  .data-table td:first-child { display: none; } /* 編號 */
  .data-table td:nth-child(2)::before { content: "作者"; }
  .data-table td:nth-child(3)::before { content: "類型"; }
  .data-table td:nth-child(4) {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .data-table td:nth-child(4)::before { content: "作品"; }
  .data-table td:nth-child(5) { font-size: 12px; }
  .data-table td:nth-child(5)::before { content: "建立"; }
  .data-table td:nth-child(6) {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #EADFCB;
  }
  .data-table td:nth-child(6)::before { content: ""; display: none; }
  .data-table .actions { width: 100%; }
  .data-table .actions .btn { flex: 1; }
  .data-table td > strong,
  .data-table td > div { text-align: right; }

  /* 最近作品 grid */
  .recent-grid { grid-template-columns: 1fr; gap: 12px; }

  /* Footer */
  .site-footer { padding: 32px 16px 48px; font-size: 13px; }
}

/* === 極小手機:≤420px === */
@media (max-width: 420px) {
  .container { padding: 16px 12px 56px; }
  .site-header__inner { padding: 10px 12px; }
  .brand__logo { width: 40px; height: 40px; font-size: 22px; border-radius: 12px; }
  .brand__title { font-size: 16px; }
  .header-nav a { padding: 6px 8px; font-size: 12px; }

  .hero__title { font-size: 26px; }
  .hero__cta-group { flex-direction: column; width: 100%; }
  .hero__cta-group .btn { width: 100%; }

  /* 漫畫 1 欄 */
  .comic-viewer, .comic-viewer.six { grid-template-columns: 1fr; }

  /* Modal 從底部彈出 */
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal { border-radius: var(--r-lg) var(--r-lg) 0 0; max-width: 100%; padding: 20px 18px 28px; }
}
/* === Reduced motion 對 accessibility === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .btn:active { transform: none; }
}
