.stone-document, .stone-image-viewer { margin: auto; padding: 0; border: 0; color: #202b2a; background: #fafcfc; border-radius: 6px; font-family: system-ui, "Noto Sans TC", sans-serif; letter-spacing: 0; }
.stone-document::backdrop, .stone-image-viewer::backdrop { background: #081010c9; }
.stone-document { width: min(1180px, calc(100vw - 32px)); height: min(900px, calc(100dvh - 32px)); max-width: none; max-height: none; overflow: auto; overscroll-behavior: contain; }
.stone-heading { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; border-bottom: 1px solid #d6e2e1; background: #fafcfc; }
.stone-heading h2 { margin: 0; font-size: 1.35rem; line-height: 1.4; overflow-wrap: anywhere; }
.stone-heading h2:focus { outline: none; }
.stone-document .stone-command, .stone-image-viewer .stone-command { flex: 0 0 auto; min-width: 44px; height: 44px; border: 1px solid #8aa5a1; background: #fff; color: #174940; font-size: 1.25rem; border-radius: 4px; }
.stone-command:focus-visible, .stone-image-button:focus-visible, .stone-document a:focus-visible, .stone-image-viewer a:focus-visible { outline: 3px solid #167766; outline-offset: 3px; }
.stone-content { display: grid; grid-template-columns: minmax(260px, .9fr) minmax(0, 1.1fr); gap: 36px; padding: 28px 32px; align-items: start; }
.stone-figure { margin: 0; }
.stone-image-button { display: block; width: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; background: #ebeeee; }
.stone-preview-image { display: block; width: 100%; height: auto; aspect-ratio: 2000 / 2637; object-fit: contain; }
.stone-figure figcaption { margin-top: 10px; font-size: .9rem; line-height: 1.5; color: #45625d; }
.stone-reading { min-width: 0; }
.stone-reading h3 { margin: 0 0 8px; font-size: 1.15rem; line-height: 1.5; }
.stone-reading h3:not(:first-child) { margin-top: 24px; }
.stone-reading p { margin: 0 0 14px; font-size: 1rem; line-height: 1.85; overflow-wrap: anywhere; }
.stone-reading .stone-transcription { font-family: "Noto Serif TC", "Microsoft JhengHei", serif; font-size: 1.15rem; line-height: 2; }
.stone-small { font-size: .85rem !important; color: #45625d; line-height: 1.7; }
.stone-document a, .stone-image-viewer a { color: #116d5c; text-underline-offset: 3px; overflow-wrap: anywhere; }
.stone-attribution { padding: 16px 24px; border-top: 1px solid #d6e2e1; background: #eef4f3; }
.stone-attribution p { margin: 0 0 8px; line-height: 1.6; font-size: .85rem; overflow-wrap: anywhere; }
.stone-attribution nav { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-bottom: 8px; font-size: .9rem; }
.stone-image-viewer { width: calc(100vw - 16px); height: calc(100dvh - 16px); max-width: none; max-height: none; overflow: hidden; }
.stone-image-viewer[open] { display: flex; flex-direction: column; }
.stone-image-viewer .stone-heading, .stone-image-viewer .stone-attribution { flex-shrink: 0; }
.stone-image-viewer .stone-heading h2 { font-size: 1.1rem; }
.stone-actions { display: flex; gap: 8px; flex-shrink: 0; }
.stone-image-scroll { flex: 1; min-height: 0; min-width: 0; overflow: auto; overscroll-behavior: contain; background: #e2e6e5; }
.stone-full-image { display: block; margin: 0 auto; }
.stone-image-viewer[data-size="fit"] .stone-image-scroll { display: flex; align-items: center; justify-content: center; }
.stone-image-viewer[data-size="fit"] .stone-full-image { width: 100%; height: 100%; object-fit: contain; }
.stone-image-viewer[data-size="original"] .stone-full-image { width: 2000px; height: 2637px; max-width: none; }
@media (max-width: 700px) {
  .stone-document { width: 100vw; height: 100dvh; border-radius: 0; }
  .stone-heading { padding: 12px 16px; gap: 10px; }
  .stone-heading h2 { font-size: 1.15rem; }
  .stone-content { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 20px 16px; }
  .stone-preview-image { max-height: 440px; }
  .stone-attribution { padding: 12px 16px; }
  .stone-image-viewer { width: 100vw; height: 100dvh; border-radius: 0; }
  .stone-image-viewer .stone-heading h2 { font-size: .95rem; }
}
