:root { --ea-guide-width: min(315px, 30vw); }
.ea-guide-tab, .ea-guide { position: fixed; z-index: 1000; box-sizing: border-box; color: #263d2c; }
.ea-guide-tab { top: 5.5rem; right: 0; min-height: 44px; padding: .55rem .85rem; background: #ebefe4; border: 1px solid #899480; border-radius: .65rem 0 0 .65rem; font: 600 .875rem/1.3 system-ui,sans-serif; cursor: pointer; }
.ea-guide { inset: 0 0 0 auto; width: var(--ea-guide-width); border-inline-start: 1px solid #a6b29d; background: #fbf9f0; overflow-y: auto; overscroll-behavior: contain; font: 400 .95rem/1.5 system-ui,sans-serif; }
.ea-guide:not([hidden]) { animation: ea-guide-in .23s ease-out both; }
.ea-guide[hidden], .ea-guide-tab[hidden] { display: none !important; }
.ea-guide header { display: flex; justify-content: space-between; align-items: center; padding: .65rem .85rem; border-bottom: 1px solid #a6b29d; }
.ea-guide header h2 { margin: 0; font: 600 1.25rem/1.2 Georgia,serif; }
.ea-guide-content { padding: .8rem 1rem; }
.ea-guide-content > button { display: block; width: 100%; text-align: left; margin-bottom: .5rem; }
.ea-guide button { min-height: 44px; padding: .45rem .65rem; border-radius: .5rem; background: #e8ede0; color: #263d2c; border: 1px solid #a6b29d; }
.ea-guide :focus-visible, .ea-guide-tab:focus-visible { outline: 3px solid #71428c; outline-offset: 2px; }
.ea-guide ol { padding-inline-start: 1.3rem; }
.ea-guide li + li { margin-top: .65rem; }
.ea-guide h3 { font-size: 1.05rem; }
body.ea-guide-open .ea-guide-tab { right: var(--ea-guide-width); }
body.ea-guide-open .oxs-main, body.ea-guide-open[data-ea-how-to] main { margin-right: var(--ea-guide-width); }
@keyframes ea-guide-in { from { transform: translateX(100%); } }
@media (max-width: 800px) {
  .ea-guide-tab { top: auto; bottom: max(1.1rem, env(safe-area-inset-bottom)); }
  .ea-guide { inset: auto 0 0; width: 100%; height: min(35dvh, 285px); border-inline-start: 0; border-top: 1px solid #a6b29d; padding-bottom: env(safe-area-inset-bottom); }
  .ea-guide:not([hidden]) { animation-name: ea-guide-up; }
  body.ea-guide-open .ea-guide-tab { right: 0; bottom: min(35dvh, 285px); }
  body.ea-guide-open .oxs-main, body.ea-guide-open[data-ea-how-to] main { margin-right: 0; }
  body.ea-guide-open .oxs-view, body.ea-guide-open[data-ea-how-to] main { padding-bottom: calc(min(35dvh, 285px) + 20px); }
}
@keyframes ea-guide-up { from { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) { .ea-guide:not([hidden]) { animation: none; } }
