/* Shared reading preferences; works with every theme template. */
.yamii-reading-tools { color: #29213e; }
.yamii-reading-tools .yamii-reading-tools__launcher { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 1100; display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; min-height: 60px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: #7554d7; color: #fff; box-shadow: 0 4px 18px rgb(62 39 119 / 28%); }
.yamii-reading-tools .yamii-reading-tools__launcher:hover { background: #5d3bb8; }
.yamii-reading-tools .yamii-reading-tools__launcher[hidden] { display: none; }
.yamii-reading-dialog { width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 24px; box-sizing: border-box; overflow-y: auto; border: 1px solid #d6cbe6; border-radius: 20px; background: #fff; color: #29213e; }
.yamii-reading-dialog::backdrop { background: rgb(25 18 39 / 55%); }
.yamii-reading-dialog__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.yamii-reading-dialog h2 { margin: 0; font-size: 1.25rem; }
.yamii-reading-dialog__header form { margin: 0; flex-shrink: 0; }
.yamii-reading-welcome label { padding: 12px; margin-block: 12px; border: 1px solid #d6cbe6; border-radius: 10px; cursor: pointer; line-height: 1.8; }
.yamii-reading-tools .yamii-reading-welcome input[type="checkbox"] { width: 22px; height: 22px; min-height: 22px; padding: 0; margin: 0; flex: 0 0 22px; accent-color: #7554d7; }
.yamii-reading-welcome__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.yamii-reading-welcome__actions button[type="submit"] { background: #7554d7; color: #fff; font-weight: 700; }
.yamii-reading-tools__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-block: 16px; }
.yamii-reading-tools button, .yamii-reading-tools select, .yamii-reading-tools input { font: inherit; color: #302044; background: #fff; border: 1px solid #80639f; border-radius: 8px; padding: 10px 12px; min-height: 44px; max-width: 100%; }
.yamii-reading-tools button { cursor: pointer; }
.yamii-reading-tools button[aria-pressed="true"] { background: #eee6fa; border: 2px solid #614081; }
.yamii-reading-tools p { font-size: 1rem; line-height: 1.8; margin-block: 8px; }
.yamii-reading-tools label { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.yamii-reading-text { display: inline; overflow-wrap: anywhere; font-size: inherit; line-height: inherit; }
/* Keep body text at its designed size and reserve room for legible readings. */
.yamii-ruby { ruby-align: center; font-size: inherit; }
.yamii-ruby rt { font-size: max(.55em, 10px); font-weight: 500; letter-spacing: 0; line-height: 1; color: #49344f; }
html[data-yamii-furigana="true"] .yamii-reading-text { font-size: inherit; line-height: max(1.8em, calc(1em + 12px)); }
.yamii-ruby rp { display: none; }
html:not([data-yamii-furigana="true"]) .yamii-ruby :is(rt,rp) { display: none; }
button.yamii-term-meaning { all: unset; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; vertical-align: baseline; margin-inline: .25em; padding: 2px 6px; min-height: 28px; min-width: 32px; border: 1px solid #b7a3d0; border-radius: 6px; background: #f5effc; color: #57377e; font: 500 .75em/1.4 sans-serif; white-space: nowrap; cursor: pointer; }
button.yamii-term-meaning:hover { background: #eae0f7; }
button.yamii-term-meaning:focus-visible { outline: 3px solid #325dcc; outline-offset: 2px; }
html[data-yamii-meanings="false"] .yamii-term-meaning { display: none; }
.yamii-facility-name { display: block; min-width: 0; font-size: inherit; overflow-wrap: anywhere; }
.yamii-facility-name__reading { display: block; font-size: max(.55em, 10px); line-height: 1.4; margin-bottom: .2em; font-weight: 500; color: #49344f; overflow-wrap: anywhere; white-space: normal; }
.yamii-facility-name__base { display: block; overflow-wrap: anywhere; white-space: normal; }
html:not([data-yamii-furigana="true"]) .yamii-facility-name__reading { display: none; }
html[data-yamii-reading] :is(a,button,label,summary):has(.yamii-reading-text) { white-space: normal; overflow-wrap: anywhere; height: auto; min-width: 0; max-width: 100%; }
html[data-yamii-reading] :is(main,article,section,nav,form,fieldset,.yamii-container) > * { min-width: 0; }
html[data-yamii-reading] :is(h1,h2,h3,h4,h5,h6,p,li,dt,dd) { overflow-wrap: anywhere; }
html[data-yamii-reading] :is(.yamii-top-hero-section,.yamii-top-hero-inner,.yamii-top-hero__content) { height: auto; }
html[data-yamii-reading] .yamii-top-hero-section .yamii-top-hero__content h1 { white-space: normal; }
html[data-yamii-reading] body.home .yamii-top-hero-inner .yamii-top-hero__content { min-width: 0; }
html[data-yamii-reading] body.home :is(.yamii-top-hero__eyebrow,.yamii-top-hero__description) { white-space: normal; max-width: 100%; }
@media (max-width: 600px) {
 html[data-yamii-reading] body.home .yamii-top-hero-inner .yamii-top-hero__content { width: 100%; max-width: 100%; }
}
html[data-yamii-reading] .yamii-btn, html[data-yamii-reading] .yamii-btn-discord { flex-wrap: wrap; text-align: center; }
.yamii-glossary-dialog { width: min(720px, calc(100% - 32px)); max-height: 85dvh; padding: 24px; border: 1px solid #80639f; border-radius: 16px; color: #29213e; background: #fff; overflow-y: auto; box-sizing: border-box; }
.yamii-glossary-dialog::backdrop { background: rgb(25 18 39 / 60%); }
.yamii-glossary-dialog__header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.yamii-glossary-dialog h2 { font-size: 1.4rem; margin: 0; }
.yamii-glossary-dialog input { width: 100%; margin-block: 8px; }
.yamii-glossary-dialog dl > div { padding-block: 16px; border-top: 1px solid #ded5e8; }
.yamii-glossary-dialog [hidden] { display: none !important; }
.yamii-glossary-dialog dt { font-weight: 700; }
.yamii-glossary-dialog dd { margin: 8px 0 0; line-height: 2; }
:is(a,button,input,select,textarea,summary):focus-visible { outline: 3px solid #325dcc; outline-offset: 4px; }
@media (max-width: 600px) { .yamii-reading-tools__controls { align-items: stretch; flex-direction: column; } .yamii-glossary-dialog { padding: 16px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
