/* Unified, zero-repaint loading & skeleton system for 竹音跟读 / kikohana.
   Pure GPU opacity pulse on containers (no background-position repaints) so loading
   stays smooth while JS/CSS hydrate. Each view mirrors its real rendered structure. */

:root {
  --loading-speed: 800ms;
  --loading-ink: var(--muted, #777);
  --skeleton-base: rgba(255, 255, 255, 0.08);
  --skeleton-cover-base: rgba(255, 255, 255, 0.14);
  --skeleton-radius: 8px;
}

:root[data-design='focus'][data-color-mode='light'] {
  --skeleton-base: rgba(20, 44, 36, 0.075);
  --skeleton-cover-base: rgba(255, 249, 232, 0.16);
}

@keyframes loading-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .52; }
}
@keyframes loading-spin { to { transform: rotate(360deg); } }
@keyframes loading-dots { 0%, 100% { opacity: .32; } 50% { opacity: .95; } }
@keyframes loading-travel { from { transform: translateX(-110%); } to { transform: translateX(390%); } }
@keyframes loading-settle { from { opacity: .72; } to { opacity: 1; } }

/* Flat, zero-repaint skeleton primitives (no background-position animation!) */
.journey-skeleton,
.ui-skeleton,
.shared-skeleton span,
.rewards-skeleton i {
  display: block;
  max-width: 100%;
  border-radius: var(--skeleton-radius);
  background: var(--skeleton-base);
}

.ui-skeleton-pill { border-radius: 999px; }
.ui-skeleton-circle { border-radius: 50%; }
.ui-skeleton-btn { border-radius: var(--apple-radius-control, 11px); }

/* Single GPU-composited opacity breath per loading container (0 CPU paint cost) */
.journey-loading-grid .journey-feature .journey-skeleton,
.journey-loading-grid .journey-feature .ui-skeleton,
.journey-loading-grid .journey-route .journey-skeleton,
.journey-loading-grid .journey-route .ui-skeleton,
.journey-courses-loading,
.checkin-week-loading,
.rewards-task-skeleton-list,
.rewards-loading-shop,
.materials-loading,
.shared-skeleton-list,
.listening-loading,
.recent-loading-grid,
#reader-opening,
.member-loading-list {
  animation: loading-pulse 1900ms ease-in-out infinite;
  will-change: opacity;
}

/* Hero card cover surface (obsidian / forest green) */
html[data-design='focus'] #view-daily .journey-feature :is(.journey-skeleton, .ui-skeleton) {
  background: var(--skeleton-cover-base);
}

/* Top feathered hairline indicator — GPU transform only */
.page-load-indicator {
  position: fixed;
  inset: 0 0 auto;
  height: 2px;
  overflow: hidden;
  z-index: 120;
  pointer-events: none;
  display: none;
}
.page-load-indicator::before {
  content: '';
  display: block;
  height: 100%;
  width: 30%;
  background: linear-gradient(90deg, transparent 0%, var(--accent, #e2bd8d) 50%, transparent 100%);
  animation: loading-travel 1500ms cubic-bezier(0.4, 0, 0.2, 1) infinite;
  will-change: transform;
}
html[data-shell-loading='true']:not([data-design='classic']) .page-load-indicator,
#view-daily:not([hidden]):has(> #journey-home-content[aria-busy='true']) ~ .page-load-indicator,
#view-materials:not([hidden])[aria-busy='true'] ~ .page-load-indicator,
#view-listening:not([hidden])[aria-busy='true'] ~ .page-load-indicator,
#view-materials:not([hidden]):has(> #shared-materials-panel:not([hidden])[aria-busy='true']) ~ .page-load-indicator,
#view-points-shop:not([hidden]):has(.rewards-loading-shop) ~ .page-load-indicator,
#view-my-learning:not([hidden]):has(.recent-learning[aria-busy='true']) ~ .page-load-indicator,
#reader-opening:not([hidden]) ~ .page-load-indicator {
  display: block;
}

/* Compact inline spinner for active buttons and in-place tool operations */
button[aria-busy='true']:not(.icon-action)::after,
#dictionary-panel:has(#dictionary-results[aria-busy='true']) #dictionary-status::before,
#furigana-status[data-state='loading']::before,
#ocr-status[data-state='processing']::before {
  content: '';
  display: inline-block;
  vertical-align: -.12em;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  box-sizing: border-box;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  margin-inline: 8px;
  animation: loading-spin var(--loading-speed) linear infinite;
}
html[data-design='focus'] .icon-action[aria-busy='true']::before {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
  box-sizing: border-box;
  mask: none;
  background: transparent;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: loading-spin var(--loading-speed) linear infinite;
}

:is(#tts-status[aria-busy='true'], #translation-display[aria-busy='true'], #phase-status[aria-busy='true'], .sentence-review[aria-busy='true'] .sentence-review-note)::after {
  content: '•••';
  display: inline-block;
  letter-spacing: 3px;
  padding-left: 8px;
  font-size: 11px;
  animation: loading-dots 1400ms ease-in-out infinite;
}

#journey-home-content[aria-busy='false'] > .journey-grid,
#view-materials[data-materials-state='READY'] #materials-list,
.sentence-review[aria-busy='false'] .sentence-review-list {
  animation: loading-settle 160ms ease-out;
}

/* 1. Home (#view-daily): matches real 2-col Hero + tape, 7-day strip, 3-row tasks, disc Listening card */
#view-daily .journey-loading-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
#view-daily .journey-loading-grid .journey-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 24px;
  align-items: center;
}
#view-daily .journey-loading-grid .skeleton-tape {
  width: 204px;
  aspect-ratio: 1.58;
  border-radius: 14px;
  justify-self: end;
  transform: rotate(7deg);
}
#view-daily .journey-loading-grid .skeleton-title {
  width: 78%;
  height: 36px;
  margin: 14px 0 12px;
  border-radius: 9px;
}
#view-daily .journey-loading-grid .skeleton-description {
  width: 86%;
  height: 15px;
  margin-bottom: 14px;
}
#view-daily .journey-loading-grid .skeleton-metadata {
  width: 176px;
  height: 15px;
  margin: 0 0 20px;
  border-radius: 6px;
}
#view-daily .journey-loading-grid .skeleton-button {
  width: 132px;
  height: 44px;
  border-radius: var(--apple-radius-control, 11px);
}
#view-daily .journey-loading-grid .skeleton-button-short {
  width: 92px;
  height: 44px;
  border-radius: var(--apple-radius-control, 11px);
}
#view-daily .journey-loading-grid .skeleton-sample > span {
  width: 68%;
  height: 14px;
}
@media (max-width: 860px) {
  #view-daily .journey-loading-grid .journey-hero-layout { grid-template-columns: minmax(0, 1fr); }
  #view-daily .journey-loading-grid .skeleton-tape { display: none; }
}

/* Home bottom-left "按主题学习" 2x2 grid skeleton */
.journey-courses-loading .skeleton-courses-head { width: 96px; height: 20px; }
.journey-courses-loading .skeleton-courses-link { width: 60px; height: 14px; }
.journey-courses-loading .journey-course-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
}
.skeleton-course-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--apple-hairline, var(--line));
}
.skeleton-course-copy { flex: 1; display: grid; gap: 8px; }
.skeleton-course-copy > :first-child { width: 38%; height: 15px; }
.skeleton-course-copy > :last-child { width: 78%; height: 12px; }
.skeleton-course-count { width: 34px; height: 13px; flex: 0 0 34px; }
@media (max-width: 640px) {
  .journey-courses-loading .journey-course-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Home Listening card skeleton matches real disc-art + bottom wave/pill bar */
#view-daily .journey-loading-grid .journey-route .route-deck-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
#view-daily .journey-loading-grid .journey-route .route-deck-copy { flex: 1; min-width: 0; }
#view-daily .journey-loading-grid .skeleton-route-sub {
  width: 64%;
  height: 14px;
  margin-top: 10px;
}
#view-daily .journey-loading-grid .skeleton-disc {
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
}
#view-daily .journey-loading-grid .journey-route .route-deck-bar {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#view-daily .journey-loading-grid .skeleton-route-action {
  width: 128px;
  height: 40px;
  margin: 0;
  border-radius: 999px;
}

/* Home 7-day check-in strip skeleton */
.checkin-week-loading {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}
.checkin-week-loading li { height: 46px; border-radius: 12px; }

/* Home daily tasks skeleton (#rewards-panel) */
#rewards-panel .rewards-loading { min-height: 0; padding: 4px 0 2px; }
.rewards-loading-error {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
}
.rewards-loading-error p { margin: 0; color: var(--muted); font-size: 14px; }
.rewards-task-skeleton-list { display: grid; gap: 6px; }
.rewards-task-skeleton-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 68px;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--apple-hairline, var(--line));
}
.rewards-task-skeleton-row:last-child { border-bottom: 0; }
.rewards-task-skeleton-row .ui-skeleton-circle { width: 18px; height: 18px; }
.rewards-task-skeleton-copy { display: grid; gap: 7px; }
.rewards-task-skeleton-copy > :first-child { width: 58%; height: 14px; }
.rewards-task-skeleton-copy > :last-child { width: 34%; height: 11px; }
.rewards-task-skeleton-row .ui-skeleton-pill { width: 68px; height: 30px; justify-self: end; }
.rewards-task-skeleton-foot {
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid var(--apple-hairline, var(--line));
}
.rewards-task-skeleton-foot > span { height: 12px; width: 76px; }

/* 2. Points Shop (#view-points-shop): matches 2-column points-shop-layout */
#points-shop-content .rewards-loading-shop { min-height: 0; }
.rewards-shop-skeleton-card {
  padding: 24px;
  border-radius: var(--apple-radius-card, 20px);
  background: var(--surface);
  border: 1px solid var(--apple-hairline, var(--line));
  box-shadow: var(--apple-shadow-card, none), var(--apple-specular, none);
}
.rewards-shop-skeleton-heading { width: 92px; height: 18px; margin-bottom: 18px; }
.rewards-shop-skeleton-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 124px;
  gap: 20px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--apple-hairline, var(--line));
}
.rewards-shop-skeleton-item:first-of-type { border-top: 0; padding-top: 4px; }
.rewards-shop-skeleton-section {
  margin-top: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--apple-hairline, var(--line));
}
.rewards-shop-skeleton-ledger { padding: 18px 24px; }
.rewards-shop-skeleton-ledger > span { width: 88px; height: 16px; }
.rewards-shop-skeleton-copy { display: grid; gap: 10px; }
.rewards-shop-skeleton-copy > :first-child { width: 42%; height: 17px; }
.rewards-shop-skeleton-copy > :nth-child(2) { width: 76%; height: 13px; }
.rewards-shop-skeleton-copy > :last-child { width: 34%; height: 12px; }
.rewards-shop-skeleton-cta { display: grid; justify-items: end; gap: 10px; }
.rewards-shop-skeleton-cta > :first-child { width: 64px; height: 20px; }
.rewards-shop-skeleton-cta > :last-child { width: 112px; height: 38px; }
.rewards-shop-skeleton-wallet { display: grid; gap: 14px; }
.rewards-shop-skeleton-balance { display: grid; gap: 10px; }
.rewards-shop-skeleton-balance > :nth-child(1) { width: 72px; height: 14px; }
.rewards-shop-skeleton-balance > :nth-child(2) { width: 112px; height: 38px; border-radius: 10px; }
.rewards-shop-skeleton-progress { display: grid; gap: 10px; }
.rewards-shop-skeleton-progress > :nth-child(1) { width: 58%; height: 13px; }
.rewards-shop-skeleton-progress > :nth-child(2) { width: 100%; height: 6px; border-radius: 999px; }
.rewards-shop-skeleton-progress > :nth-child(3) { width: 66%; height: 13px; }
.rewards-shop-skeleton-wallet-btn { width: 100%; height: 42px; margin-top: 4px; }
.rewards-shop-skeleton-wallet-link { width: 64px; height: 14px; justify-self: center; margin-top: 2px; }
@media (max-width: 800px) {
  .rewards-shop-skeleton-wallet {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
  }
  .rewards-shop-skeleton-progress,
  .rewards-shop-skeleton-wallet-link { display: none; }
  .rewards-shop-skeleton-wallet-btn { width: 96px; height: 40px; margin-top: 0; }
}

/* 3. Materials Library (#view-materials): search bar + level tabs + 3-col rows */
#view-materials[aria-busy='true'] #materials-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.materials-loading { display: none; padding: 12px 0 24px; }
#view-materials[aria-busy='true'] .materials-loading {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}
.materials-loading > .materials-loading-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 0 14px;
}
.materials-loading-search { flex: 1; height: 42px; border-radius: 12px; }
.materials-loading-bar-actions { display: flex; gap: 12px; flex: none; }
.materials-loading-bar-actions > :first-child { width: 56px; height: 34px; border-radius: 9px; }
.materials-loading-bar-actions > :last-child { width: 88px; height: 34px; border-radius: 9px; }
.materials-loading > .materials-loading-levels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0 16px;
  border-bottom: 1px solid var(--apple-hairline, var(--line));
}
.materials-loading-tabs { display: flex; gap: 10px; }
.materials-loading-tabs > span { width: 34px; height: 28px; border-radius: 8px; }
.materials-loading-count { width: 120px; height: 14px; }
.materials-loading > .materials-loading-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 72px;
  align-items: start;
  gap: 16px;
  padding: 20px 8px;
  border-bottom: 1px solid var(--apple-hairline, var(--line));
}
.materials-loading > .materials-loading-row:last-child { border-bottom: 0; }
.materials-loading-row > .journey-skeleton:first-child { width: 26px; height: 14px; margin-top: 4px; border-radius: 4px; }
.materials-loading-main { display: grid; gap: 10px; min-width: 0; }
.materials-loading-main > .journey-skeleton:nth-child(1) { width: min(44%, 280px); height: 20px; }
.materials-loading-main > .journey-skeleton:nth-child(2) { width: min(74%, 480px); height: 14px; }
.materials-loading-tags { display: flex; gap: 8px; margin-top: 2px; }
.materials-loading-tags > span { width: 44px; height: 20px; border-radius: 6px; }
.materials-loading-tags > :last-child { width: 58px; }
.materials-loading-action { width: 58px; height: 14px; align-self: center; justify-self: end; }
@media (max-width: 600px) {
  .materials-loading > .materials-loading-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 18px 4px;
  }
  .materials-loading-action { display: none; }
}

/* 4. Shared Materials (#shared-materials-panel) */
.shared-skeleton-list { display: flex; flex-direction: column; gap: 12px; }
.shared-skeleton {
  display: grid;
  gap: 12px;
  min-height: 126px;
  background: var(--surface);
  border: 1px solid var(--apple-hairline, var(--line));
  box-shadow: var(--apple-shadow-card, none), var(--apple-specular, none);
  padding: 20px 22px;
  border-radius: 18px;
}
.shared-skeleton-head { display: flex; align-items: center; gap: 10px; }
.shared-skeleton-head > :first-child { width: 46px; height: 22px; border-radius: 999px; }
.shared-skeleton-head > :last-child { width: 92px; height: 13px; }
.shared-skeleton-title { width: min(52%, 320px); height: 20px; }
.shared-skeleton-body { width: min(84%, 560px); height: 13px; }
.shared-skeleton-foot { width: min(40%, 220px); height: 12px; margin-top: 2px; }

/* 5. Listening Practice (#view-listening): matches real left question + right answer-card rail */
.listening-loading {
  display: none;
  width: 100%;
  margin-inline: auto;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding: 4px 0 32px;
}
#view-listening[aria-busy='true']:has(#listening-content[hidden]) .listening-loading { display: grid; }
.listening-loading-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 4px 14px;
  border-bottom: 1px solid var(--apple-hairline, var(--line));
}
.listening-loading-bar > :first-child { width: 180px; height: 24px; border-radius: 8px; }
.listening-loading-bar > :last-child { width: min(32%, 180px); height: 18px; }
.listening-loading-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(250px, 26%, 340px);
  gap: clamp(16px, 1.6vw, 26px);
  align-items: start;
}
.listening-loading-sidebar {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: var(--apple-radius-card, 20px);
  background: var(--surface);
  border: 1px solid var(--apple-hairline, var(--line));
}
.listening-loading-side-head { width: 48%; height: 16px; }
.listening-loading-dots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.listening-loading-dots > span { height: 36px; border-radius: 10px; }
.listening-loading-side-cta { width: 100%; height: 40px; margin-top: 6px; }
.listening-loading-card {
  display: grid;
  gap: 18px;
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--apple-hairline, var(--line));
  border-radius: var(--apple-radius-card, 22px);
  box-shadow: var(--apple-shadow-card, none), var(--apple-specular, none);
}
.listening-loading-heading { width: min(46%, 240px); height: 22px; }
.listening-loading-player { width: 100%; height: 48px; border-radius: 14px; }
.listening-loading-options { display: grid; gap: 10px; margin-top: 4px; }
.listening-loading-options > span { width: 100%; height: 46px; border-radius: 12px; }
@media (max-width: 1099px) {
  .listening-loading { width: min(100%, 820px); }
  .listening-loading-grid { grid-template-columns: minmax(0, 1fr); }
  .listening-loading-sidebar { display: none; }
}

.listening-figure-loading { display: none; color: var(--muted); font-size: 13px; padding: 12px 0; }
.listening-figure-loading .journey-skeleton { height: 160px; border-radius: 14px; margin-bottom: 10px; }
#listening-task:has(#listening-figure[aria-busy='true']) .listening-figure-loading { display: block; }
#listening-figure[aria-busy='true'] { display: none; }

/* 6. My Learning (#view-my-learning): full-width 3-column grid */
.recent-loading-grid {
  display: none;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 8px 0 24px;
}
#view-my-learning .recent-learning[aria-busy='true'] .recent-loading-grid { display: grid; }
#view-my-learning .recent-learning[aria-busy='true'] #recent-learning-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.recent-loading-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 164px;
  padding: 20px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--apple-hairline, var(--line));
  box-shadow: var(--apple-shadow-card, none), var(--apple-specular, none);
}
.recent-loading-card > :nth-child(1) { width: 58px; height: 20px; border-radius: 999px; }
.recent-loading-card > :nth-child(2) { width: 82%; height: 18px; }
.recent-loading-card > :nth-child(3) { width: 54%; height: 13px; }
.recent-loading-card > :nth-child(4) { width: 76px; height: 14px; margin-top: 18px; }
@media (max-width: 1099px) { .recent-loading-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .recent-loading-grid { grid-template-columns: minmax(0, 1fr); } }

/* 7. Opening Shadowing Reader (#reader-opening): matches real full-height sheet + right source column */
#reader-opening {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
#reader-opening[hidden] { display: none; }
.reader-opening-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(260px, 22vw, 320px);
  column-gap: 24px;
  align-items: start;
}
.reader-opening-sheet {
  display: flex;
  flex-direction: column;
  height: max(460px, calc(100dvh - 56px));
  box-sizing: border-box;
  padding: 24px clamp(24px, 3.6vw, 56px) 20px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--apple-hairline, var(--line));
  box-shadow: var(--apple-shadow-card, none), var(--apple-specular, none);
}
.reader-opening-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--apple-hairline, var(--line));
}
.reader-opening-head { display: flex; align-items: center; gap: 12px; flex: 1; }
.reader-opening-head > :first-child { width: 24px; height: 24px; border-radius: 7px; }
.reader-opening-head > :last-child { width: min(36%, 200px); height: 18px; }
.reader-opening-flag { width: 22px; height: 22px; border-radius: 6px; flex: none; }
.reader-opening-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0 28px;
}
.reader-opening-toggles { display: flex; align-items: center; gap: 10px; }
.reader-opening-toggles > :nth-child(1) { width: 34px; height: 20px; }
.reader-opening-toggles > :nth-child(2) { width: 72px; height: 15px; }
.reader-opening-toggles > :nth-child(3) { width: 52px; height: 15px; }
.reader-opening-counter { width: 72px; height: 14px; }
.reader-opening-lines {
  flex: 1 1 auto;
  display: grid;
  align-content: start;
  gap: 32px;
  padding: 12px 0;
}
.reader-opening-lines > span { height: 22px; }
.reader-opening-lines > :nth-child(1) { width: 90%; }
.reader-opening-lines > :nth-child(2) { width: 82%; }
.reader-opening-lines > :nth-child(3) { width: 64%; }
.reader-opening-lines > :nth-child(4) { width: 88%; }
.reader-opening-lines > :nth-child(5) { width: 42%; }
.reader-opening-footer {
  flex: none;
  display: grid;
  justify-items: center;
  gap: 12px;
  padding-top: 16px;
}
.reader-opening-dock {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}
.reader-opening-pages { display: flex; gap: 6px; }
.reader-opening-pages > span { width: 34px; height: 34px; border-radius: 10px; }
.reader-opening-play { width: 96px; height: 42px; }
.reader-opening-icons { display: flex; gap: 8px; }
.reader-opening-icons > span { width: 34px; height: 34px; border-radius: 10px; }
.reader-opening-note { width: min(56%, 280px); height: 12px; }

/* Right column: read-only Japanese source sidebar skeleton */
.reader-opening-source {
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  height: max(460px, calc(100dvh - 56px));
  box-sizing: border-box;
}
.reader-opening-source-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--apple-hairline, var(--line));
}
.reader-opening-source-head > :first-child { width: 64px; height: 15px; }
.reader-opening-source-head > :last-child { width: 56px; height: 13px; }
.reader-opening-source-lines {
  flex: 1 1 auto;
  display: grid;
  align-content: start;
  gap: 14px;
}
.reader-opening-source-lines > span { height: 14px; }
.reader-opening-source-lines > :nth-child(3n+1) { width: 94%; }
.reader-opening-source-lines > :nth-child(3n+2) { width: 86%; }
.reader-opening-source-lines > :nth-child(3n) { width: 68%; }
.reader-opening-source-foot {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  padding-top: 14px;
  margin-top: 16px;
  border-top: 1px solid var(--apple-hairline, var(--line));
}
.reader-opening-source-foot > span { width: 58px; height: 14px; }
@media (max-width: 999px) {
  .reader-opening-layout { grid-template-columns: minmax(0, 1fr); }
  .reader-opening-source { display: none; }
  .reader-opening-sheet { height: max(400px, calc(100dvh - 130px)); padding: 20px 18px 16px; border-radius: 20px; }
  .reader-opening-pages, .reader-opening-icons > :nth-child(n+3) { display: none; }
}

/* 8. Member / Inbox Drawer loading */
.member-loading-list { display: grid; gap: 4px; padding: 6px 0; }
.member-loading-row {
  display: grid;
  gap: 9px;
  padding: 16px 0;
  border-bottom: 1px solid var(--apple-hairline, var(--line));
}
.member-loading-row:last-child { border-bottom: 0; }
.member-loading-row > :nth-child(1) { width: 52%; height: 15px; }
.member-loading-row > :nth-child(2) { width: 88%; height: 13px; }
.member-loading-row > :nth-child(3) { width: 32%; height: 11px; }

/* Determinate progress bar (OCR) */
.loading-progress { display: block; width: 100%; height: 4px; border: 0; border-radius: 999px; accent-color: var(--accent); margin: 12px 0; }
.loading-progress[hidden] { display: none; }
.loading-progress::-webkit-progress-bar { background: var(--skeleton-base); border-radius: 999px; }
.loading-progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; }

@media (max-width: 600px) {
  .rewards-shop-skeleton-item { grid-template-columns: minmax(0, 1fr) 104px; gap: 12px; }
  .rewards-shop-skeleton-cta > :last-child { width: 96px; height: 36px; }
  .listening-loading-card { padding: 20px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .journey-loading-grid .journey-feature .journey-skeleton,
  .journey-loading-grid .journey-feature .ui-skeleton,
  .journey-loading-grid .journey-route .journey-skeleton,
  .journey-loading-grid .journey-route .ui-skeleton,
  .journey-courses-loading,
  .checkin-week-loading,
  .rewards-task-skeleton-list,
  .rewards-loading-shop,
  .materials-loading,
  .shared-skeleton-list,
  .listening-loading,
  .recent-loading-grid,
  #reader-opening,
  .member-loading-list,
  .page-load-indicator::before,
  button[aria-busy='true']::after,
  html[data-design='focus'] .icon-action[aria-busy='true']::before,
  #dictionary-panel:has(#dictionary-results[aria-busy='true']) #dictionary-status::before,
  #furigana-status[data-state='loading']::before,
  #ocr-status[data-state='processing']::before,
  :is(#tts-status, #translation-display, #phase-status, .sentence-review-note)::after,
  #journey-home-content > .journey-grid,
  #view-materials #materials-list,
  .sentence-review .sentence-review-list {
    animation: none;
    will-change: auto;
  }
  .page-load-indicator::before { margin-inline: auto; opacity: .65; }
}
