/* One edition of a book (docs/spec/edition-page.md, docs/design/edition-switcher-*.png). Scoped to .edp. */
.edp .crumbs { font: 400 13px/1.4 var(--sans); color: var(--ink-soft); padding: 24px 0 0; }
.edp .ekick { margin: 0 0 8px; font: 600 11px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--seal); }
.edp .eof { margin: 0 0 12px; font: 400 15px/1.45 var(--sans); color: var(--ink-soft); }
.edp .eof a { color: var(--ink); }
.edp .eof [lang] { font-family: var(--kr); }
.edp .d-actions .btn small { font: 400 13px/1 var(--sans); opacity: .7; }

/* Sections numbered 01, 02… */
.edp article { counter-reset: esec; }
.edp .d-sec .d-sec-h h2::before { counter-increment: esec; content: counter(esec, decimal-leading-zero); font: 600 11px/1 var(--sans); letter-spacing: .08em; color: var(--seal); margin-right: 12px; vertical-align: 4px; }
.edp .d-find .find2 { max-width: 680px; }

/* Switcher: one button, a panel under it */
.edp .esw { position: relative; margin: 0 0 22px; max-width: 100%; }
.edp .esw-b { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; padding: 8px 10px 8px 12px; border: 1.5px solid var(--ink); border-radius: 12px; background: var(--white); cursor: pointer; list-style: none; font: 400 15px/1.2 var(--sans); }
.edp .esw-b::-webkit-details-marker { display: none; }
.edp .esw-b b { font: 600 16px/1.2 var(--serif); white-space: nowrap; }
.edp .esw-b .m { color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.edp .esw-b .ar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--paper-deep); font-size: 14px; line-height: 1; }
.edp .esw[open] .esw-b .ar { transform: rotate(180deg); }
.edp .esw-b:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; }
.edp .lc { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--paper-deep); font: 700 10px/1 var(--sans); letter-spacing: .03em; color: var(--ink); }
.edp .lc.o { background: var(--seal); color: var(--paper); }
.edp .esw-p { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: min(560px, calc(100vw - 32px)); border: 1px solid var(--rule); border-radius: 16px; background: var(--white); box-shadow: 0 24px 48px -24px rgba(36, 32, 27, .45); overflow: hidden; }
.edp .esw-top { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--rule); }
.edp .esw-top input { flex: 1; min-width: 0; height: 38px; padding: 0 12px; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); font: 400 15px/1 var(--sans); }
.edp .esw-top a { margin-left: auto; font: 700 14px/1 var(--sans); color: var(--ink); white-space: nowrap; }
.edp .esw-l { max-height: 440px; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 6px; }
.edp .esw-gh { margin: 0; padding: 14px 14px 6px; font: 600 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.edp .esw-i { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 14px; color: var(--ink); text-decoration: none; }
.edp .esw-i:hover, .edp .esw-i:focus-visible { background: var(--paper); outline: none; }
.edp .esw-i .t b { display: block; font: 600 15px/1.25 var(--serif); }
.edp .esw-i .t b[lang=ko], .edp .esw-i .t b[lang=ja], .edp .esw-i .t b[lang=zh] { font-family: var(--kr); }
.edp .esw-i .t small { display: block; font: 400 13px/1.3 var(--sans); color: var(--ink-soft); }
.edp .esw-i .y { font: 600 12px/1 var(--sans); color: var(--ink-faint); }
.edp .esw-i.cur { background: var(--ink); color: var(--paper); }
.edp .esw-i.cur .t small, .edp .esw-i.cur .y { color: rgba(243, 237, 226, .7); }
.edp .esw-i.cur .lc:not(.o) { background: rgba(243, 237, 226, .14); color: var(--paper); }
.edp .esw-none { padding: 14px; margin: 0; font: 400 14px/1.4 var(--sans); color: var(--ink-soft); }
.edp [hidden] { display: none !important; }

/* Phone: the panel is a bottom sheet */
@media (max-width: 700px) {
  .edp .esw-b .m { display: none; }
  .edp .esw[open]::before { content: ""; position: fixed; inset: 0; z-index: 29; background: rgba(36, 32, 27, .35); }
  .edp .esw-p { position: fixed; top: auto; bottom: 0; left: 0; right: 0; width: auto; height: 75vh; height: 75dvh; display: flex; flex-direction: column; border-radius: 18px 18px 0 0; border-bottom: 0; }
  .edp .esw-l { max-height: none; flex: 1; }
}
