/* V9.2 | Shared, Markdown-backed oral report reader.
   Independent native dialog, accessible on desktop, tablets and phones. */
#speaker-script-open-site{
  white-space:nowrap;
  display:inline-flex;align-items:center;justify-content:center;
}
#book-reader[data-os-family] #speaker-script-open-book{
  flex:none;min-height:36px;padding:.46rem .65rem;
  font:750 .76rem/1.2 var(--os-ui-font,"Noto Sans TC",sans-serif);
  border:1px solid var(--os-line,#829797)!important;
  border-radius:var(--os-radius,3px)!important;
  background:var(--os-button,#edf1f2)!important;
  color:var(--os-button-ink,#163f42)!important;
  box-shadow:none;
  white-space:nowrap;cursor:pointer;
}
#book-reader[data-os-family] #speaker-script-open-book:hover{
  filter:brightness(1.07);
}
#book-reader[data-os-family] #speaker-script-open-book:focus-visible,
#speaker-script-open-site:focus-visible{
  outline:3px solid #dea055;outline-offset:2px;
}
.speaker-script-dialog{
  position:fixed;inset:0;margin:auto;padding:0;
  width:min(1240px,96vw);height:min(900px,94dvh);
  max-width:96vw;max-height:94dvh;overflow:hidden;
  background:#fcf9f1;color:#203330;
  border:2px solid var(--os-line,#a4b5b4);
  border-radius:clamp(5px,var(--os-radius,8px),16px);
  box-shadow:0 24px 80px #0009;
  font-family:"Noto Sans TC","Microsoft JhengHei",system-ui,sans-serif;
}
.speaker-script-dialog::backdrop{
  background:#08131bcf;backdrop-filter:blur(6px);
}
.speaker-script-dialog[open]{display:block;}
.speaker-script-shell{
  display:flex;flex-direction:column;width:100%;height:100%;min-height:0;
}
.speaker-script-toolbar{
  display:flex;align-items:center;justify-content:space-between;
  gap:1rem;flex:none;
  padding:clamp(.65rem,1.2vw,1.1rem) clamp(.9rem,1.6vw,1.6rem);
  color:var(--os-title-ink,#f4f2e7);
  background:var(--os-titlebar,#1b3936);
  border-bottom:1px solid var(--os-line,#9daaa4);
}
.speaker-script-heading{min-width:0;}
.speaker-script-eyebrow{
  display:block;color:inherit;opacity:.75;
  font:750 .61rem/1.4 ui-monospace,Consolas,monospace;letter-spacing:.09em;
}
.speaker-script-heading h2{
  font:750 clamp(1.06rem,1.7vw,1.5rem)/1.4 "Noto Sans TC",sans-serif;
  color:inherit;margin:.1rem 0;
}
.speaker-script-subtitle{
  color:inherit;opacity:.77;margin:.12rem 0 0;
  font-size:.72rem;line-height:1.4;
}
.speaker-script-controls{
  display:flex;align-items:center;justify-content:flex-end;
  gap:.45rem;flex:none;
}
.speaker-script-controls a,
.speaker-script-controls button{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:36px;padding:.42rem .65rem;
  border:1px solid var(--os-line,#aeb6b3);
  border-radius:var(--os-radius,5px);
  background:var(--os-button,#f7f7f4);
  color:var(--os-button-ink,#163632);
  text-decoration:none;
  font:750 .72rem/1.35 "Noto Sans TC",sans-serif;
  white-space:nowrap;cursor:pointer;
}
.speaker-script-controls a:hover,
.speaker-script-controls button:hover{filter:brightness(1.08);}
.speaker-script-controls a:focus-visible,
.speaker-script-controls button:focus-visible,
.speaker-script-index a:focus-visible,
.speaker-script-index button:focus-visible,
.speaker-script-url:focus-visible,
.speaker-script-article a:focus-visible{
  outline:3px solid #d89548;outline-offset:2px;
}
.speaker-script-frame{
  display:grid;grid-template-columns:minmax(210px,.25fr) minmax(0,1fr);
  flex:1;min-height:0;overflow:hidden;
}
.speaker-script-index{
  min-width:0;overflow:auto;overscroll-behavior:contain;
  background:#ecece5;border-right:1px solid #cbd4cd;
  padding:1rem .7rem 1.5rem;
  scrollbar-width:thin;
}
.speaker-script-index-label{
  margin:.2rem .5rem .75rem;letter-spacing:.04em;
  font:700 .74rem/1.5 "Noto Sans TC",sans-serif;
  color:#52605a;
}
.speaker-script-index-nav{display:flex;flex-direction:column;gap:.25rem;}
.speaker-script-index-row{
  display:flex;align-items:stretch;gap:.12rem;
  border-radius:6px;background:transparent;
}
.speaker-script-index-link{
  display:flex;align-items:center;flex:1;min-width:0;
  padding:.58rem .5rem;
  color:#344944;text-decoration:none;
  font-size:.73rem;line-height:1.45;
  overflow-wrap:anywhere;border-radius:6px;
}
.speaker-script-index-link:hover{background:#dae5da;}
.speaker-script-goto{
  flex:none;align-self:center;max-width:4.7rem;
  border:1px solid #bccac3;border-radius:4px;
  color:#436357;background:#fafdf9;
  padding:.26rem .25rem;cursor:pointer;
  font-size:.61rem;line-height:1.4;
}
.speaker-script-goto:hover{background:#dce9e1;}
.speaker-script-article{
  min-width:0;overflow:auto;overscroll-behavior:contain;
  padding:clamp(1rem,2.7vw,2.6rem) clamp(1rem,4.8vw,5.1rem) 3rem;
  scrollbar-width:thin;scroll-behavior:auto;
  background:#fffdf8;color:#253730;
  font:400 clamp(.92rem,1.07vw,1.04rem)/1.9 "Noto Sans TC",sans-serif;
}
.speaker-script-article h1{
  font:750 clamp(1.55rem,2.5vw,2.35rem)/1.35 "Noto Serif TC","Noto Sans TC",serif;
  margin:.1rem 0 1.2rem;color:#1c4038;letter-spacing:-.03em;
}
.speaker-script-article h2{
  font:750 clamp(1.1rem,1.7vw,1.42rem)/1.4 "Noto Sans TC",sans-serif;
  margin:1.8rem 0 .8rem;color:#25544c;border-bottom:1px solid #d1ded2;
  padding-bottom:.35rem;
}
.speaker-script-article h3{
  display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;
  font:750 clamp(1rem,1.2vw,1.18rem)/1.5 "Noto Sans TC",sans-serif;
  margin:0 0 .55rem;color:#263c34;
}
.speaker-script-document-title{max-width:50ch;}
.speaker-script-chapter{
  scroll-margin-top:1rem;
  background:#fafbf7;border:1px solid #e1e9dd;
  border-left:4px solid #729586;
  border-radius:7px;
  padding:clamp(.85rem,1.6vw,1.35rem);
  margin:1rem 0;
}
.speaker-script-chapter p{margin:.5rem 0 0;}
.speaker-script-time{
  margin-left:auto;white-space:nowrap;
  font:700 .71rem/1.5 ui-monospace,Consolas,monospace;
  background:#e6eee6;border-radius:20px;padding:.13rem .5rem;
  color:#42665a;
}
.speaker-script-article blockquote{
  border-left:4px solid #9c8060;
  background:#f6f1e7;
  padding:.65rem 1rem;margin:.6rem 0 1rem;
  color:#675b46;font-size:.82rem;line-height:1.65;
}
.speaker-script-article blockquote p{margin:.2rem 0;}
.speaker-script-article p{overflow-wrap:anywhere;}
.speaker-script-article ul{padding-left:1.3rem;display:grid;gap:.4rem;}
.speaker-script-article a{color:#2b5d91;text-decoration:underline;text-underline-offset:3px;}
.speaker-script-article strong{font-weight:780;}
.speaker-script-warning,.speaker-script-error{color:#8f4a31;font-weight:700;}
.speaker-script-footer{
  flex:none;min-height:43px;display:flex;align-items:center;gap:.9rem;
  padding:.3rem clamp(.8rem,1.6vw,1.6rem);
  background:#ecf1ed;border-top:1px solid #c8d5ce;
}
.speaker-script-url{
  flex:1;min-width:0;max-width:680px;
  border:1px solid #c4d0c9;border-radius:3px;
  background:white;color:#3e5751;
  padding:.35rem .6rem;font:600 .7rem/1.3 ui-monospace,Consolas,monospace;
}
.speaker-script-footnote{
  color:#6a7770;font-size:.66rem;line-height:1.4;
}
@media(max-width:1024px){
  .speaker-script-frame{grid-template-columns:minmax(165px,.26fr) minmax(0,1fr);}
  .speaker-script-article{padding:1.2rem 1.4rem 2.2rem;}
  .speaker-script-index-link{font-size:.67rem;}
  #book-reader[data-os-family] #speaker-script-open-book{
    padding:.35rem .4rem;font-size:.64rem;min-height:33px;
  }
}
@media(max-width:700px){
  .speaker-script-dialog{
    width:100vw;height:100dvh;max-width:100vw;max-height:100dvh;
    border:0;border-radius:0;
  }
  .speaker-script-toolbar{
    padding:.65rem .7rem;
    display:flex;flex-direction:column;align-items:stretch;gap:.4rem;
  }
  .speaker-script-heading h2{font-size:1.06rem;}
  .speaker-script-subtitle{font-size:.64rem;}
  .speaker-script-controls{justify-content:space-between;gap:.25rem;}
  .speaker-script-controls a,.speaker-script-controls button{
    flex:1;min-width:0;padding:.35rem .3rem;min-height:33px;font-size:.68rem;
  }
  .speaker-script-frame{display:flex;flex-direction:column;overflow:hidden;}
  .speaker-script-index{
    flex:none;max-height:84px;overflow:auto;
    padding:.25rem .55rem;white-space:nowrap;
    border-right:0;border-bottom:1px solid #cbd4cd;
  }
  .speaker-script-index-label{display:none;}
  .speaker-script-index-nav{display:flex;flex-direction:row;gap:.25rem;width:max-content;}
  .speaker-script-index-row{display:flex;flex:none;background:#f5f7f3;}
  .speaker-script-index-link{font-size:.64rem;padding:.28rem .42rem;}
  .speaker-script-goto{display:none;}
  .speaker-script-article{
    flex:1;min-height:0;padding:1rem .85rem 2.5rem;
    line-height:1.78;font-size:.89rem;
  }
  .speaker-script-chapter{padding:.8rem;margin:.7rem 0;}
  .speaker-script-article h3{font-size:.96rem;}
  .speaker-script-time{font-size:.63rem;}
  .speaker-script-footer{min-height:34px;padding:.25rem .55rem;}
  .speaker-script-footnote{display:none;}
  .speaker-script-url{font-size:.6rem;}
}
@media(max-width:480px){
  #speaker-script-open-site{font-size:.71rem;padding:.45rem .25rem;}
  #book-reader[data-os-family] #speaker-script-open-book{
    min-height:31px;padding:.25rem .3rem;font-size:.6rem;
  }
  .speaker-script-toolbar{gap:.3rem;}
  .speaker-script-eyebrow{font-size:.52rem;}
}
@media(max-height:500px){
  .speaker-script-toolbar{padding:.35rem .6rem;}
  .speaker-script-subtitle{display:none;}
  .speaker-script-article{padding:.5rem .7rem 1.2rem;}
  .speaker-script-footer{min-height:28px;}
}
@media(max-width:650px){
 #book-reader[data-os-family] #speaker-script-open-book{
   display:grid!important;place-items:center;
   flex:0 0 26px!important;width:26px!important;min-width:26px!important;max-width:26px!important;
   height:32px!important;min-height:32px!important;
   padding:0!important;font-size:0!important;line-height:0!important;
   overflow:hidden;
 }
 #book-reader[data-os-family] #speaker-script-open-book::after{
   content:"稿";font:800 .69rem/1 "Noto Sans TC",sans-serif;
 }
}
@media(max-width:480px){
 /* At compact phone widths keep three actionable commands without horizontal clipping.
    Their full accessible names remain in the DOM for screen readers. */
 #book-reader[data-os-family] #book-exhibit,
 #book-reader[data-os-family] #book-close{
   display:grid!important;place-items:center;
   flex:0 0 38px!important;width:38px!important;min-width:38px!important;
   max-width:38px!important;height:31px;min-height:31px;
   font-size:0!important;line-height:0!important;padding:0!important;overflow:hidden;
 }
 #book-reader[data-os-family] #book-exhibit::after{
   content:"體驗";font:750 .62rem/1 "Noto Sans TC",sans-serif;
 }
 #book-reader[data-os-family] #book-close::after{
   content:"返回";font:750 .62rem/1 "Noto Sans TC",sans-serif;
 }
}
@media(prefers-reduced-motion:reduce){
  .speaker-script-dialog *{scroll-behavior:auto!important;animation:none!important;}
}