.photo-reading { width: min(100% - 24px, 1040px); max-height: 94dvh; margin: auto; padding: 24px; border: 0; border-radius: 24px; background: #fffaf3; color: #323044; box-shadow: 0 20px 80px #34264240; overflow-y: auto; }
.photo-reading::backdrop { background: #25203999; }
.photo-reading [hidden] { display: none !important; }
.photo-reading button, .photo-reading select { min-height: 44px; padding: 10px 14px; border: 1px solid #ded5e3; border-radius: 12px; background: white; color: #413749; font: inherit; cursor: pointer; }
.photo-reading button:disabled { opacity: .5; cursor: default; }
.photo-reading button:focus-visible, .photo-reading select:focus-visible, .photo-reading textarea:focus-visible { outline: 3px solid #8855b9; outline-offset: 2px; }
.pr-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; position: sticky; top: -24px; z-index: 2; background: #fffaf3; padding: 8px 0; }
.pr-header h2 { font-size: 1.8rem; margin: 4px 0 12px; }
.pr-header small { color: #765784; letter-spacing: .08em; }
.pr-note { font-size: .92rem; color: #6d6473; line-height: 1.6; margin: 12px 0; }
.pr-add, .pr-player { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 16px 0; }
.pr-workspace { display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 28px; }
.pr-workspace main, .pr-workspace aside { min-width: 0; }
.pr-workspace h3 { margin: 10px 0; }
#pr-thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-height: 480px; overflow-y: auto; }
.pr-thumb { display: flex; flex-direction: column; gap: 6px; min-width: 0; text-align: center; }
.pr-thumb > button:first-child { padding: 5px; }
.pr-thumb img { width: 100%; height: 96px; object-fit: cover; border-radius: 8px; display: block; margin-bottom: 4px; }
.pr-thumb button[aria-pressed=true] { border: 2px solid #a65684; background: #fff0f5; }
.pr-thumb small { color: #76617c; }
.photo-reading .pr-primary { width: 100%; margin-top: 16px; background: #7d426d; color: white; border-color: #7d426d; font-weight: 700; }
.pr-player { padding: 12px 0; background: #fffaf3; border-bottom: 1px solid #e8dce4; }
.pr-sentence { display: grid; grid-template-columns: 24px minmax(0,1fr) auto; gap: 8px; align-items: start; margin: 14px 0; }
.pr-sentence > small { padding-top: 16px; color: #836d8b; }
.photo-reading .pr-sentence-play { text-align: left; font-size: 1.18rem; line-height: 1.65; overflow-wrap: anywhere; padding: 14px 18px; }
.photo-reading .pr-speaking { background: #f4e4ff; border-color: #9453b6; box-shadow: 0 0 0 2px #9453b622; }
.pr-sentence textarea { grid-column: 1 / -1; width: 100%; min-height: 110px; font: inherit; line-height: 1.6; padding: 12px; box-sizing: border-box; border: 1px solid #bba5c8; border-radius: 12px; }
.pr-error { color: #963d32; grid-column: 2 / -1; }
.pr-image-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.pr-image-viewport { overflow: auto; max-height: 70dvh; border: 1px solid #ded5e3; border-radius: 10px; background: #eee9e3; }
.pr-image-stage { position: relative; line-height: 0; }
.pr-original { display: block; width: 100%; height: auto; }
.photo-reading .pr-image-sentence { position: absolute; min-height: 0; padding: 0; border: 1px solid #996a2299; border-radius: 3px; background: #ffd65a16; }
.photo-reading .pr-image-sentence:hover { background: #ffd65a40; }
.photo-reading .pr-image-sentence.pr-speaking { background: #ad68e24d; border-color: #7835a6; box-shadow: 0 0 0 2px #9453b644; }
.pr-usage { margin: 14px 0; font-size: .9rem; color: #6d6473; }
#pr-video { display: block; width: 100%; max-height: 45vh; border-radius: 14px; background: #24212a; object-fit: contain; }
#pr-status, #pr-play-status { min-height: 1.5em; color: #794662; }
.pr-empty-icon { font-size: 64px; margin-top: 45px; }
@media (max-width: 650px) {
  .photo-reading { width: calc(100% - 12px); padding: 16px; max-height: 96dvh; border-radius: 18px; box-sizing: border-box; }
  .pr-header h2 { font-size: 1.5rem; }
  .pr-workspace { grid-template-columns: minmax(0,1fr); gap: 8px; }
  #pr-thumbs { display: flex; max-height: none; overflow-x: auto; }
  .pr-thumb { min-width: 100px; width: 100px; }
  .pr-header { top: -16px; }
  .pr-sentence { grid-template-columns: 20px minmax(0,1fr); }
  .pr-sentence > button:last-of-type { grid-column: 2; justify-self: end; }
  .photo-reading .pr-sentence-play { font-size: 1.12rem; padding: 12px; }
}
.pr-library { padding: 12px 16px; background: #f7edf3; border: 1px solid #e7d7e1; border-radius: 16px; }
.pr-library .pr-add { margin: 8px 0; }
.pr-library label { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.pr-library input { width: min(220px,100%); min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid #ded5e3; border-radius: 10px; font: inherit; box-sizing: border-box; }
#pr-books { max-height: 160px; overflow-y: auto; }
.pr-book { max-width: 100%; overflow-wrap: anywhere; text-align: left; }
.pr-book[aria-pressed=true] { background: #ead5e5; border-color: #a65684; }
#pr-book-status { font-size: .92rem; color: #794662; line-height: 1.6; }
