/* Shared top bar for the Language Explorer and Story pages (v34). */
.jx-header { position: sticky; top: 0; z-index: 9999; background: rgba(10,12,20,.96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255,255,255,.10); color: #e8ecf4; font-family: system-ui, -apple-system, 'Noto Sans KR', sans-serif; font-size: 13px; line-height: 1.4; }
.jx-header *, .jx-header *::before, .jx-header *::after { box-sizing: border-box; }
.jx-header-inner { max-width: 1500px; margin: 0 auto; min-height: 58px; padding: 9px clamp(12px, 3vw, 28px); display: flex; align-items: center; gap: 10px; }
.jx-header .jx-brand { flex: 0 0 auto; margin-right: 6px; color: #fff; font-size: 14px; font-weight: 800; letter-spacing: .02em; text-decoration: none; white-space: nowrap; }
.jx-header .jx-brand span { color: #ffd166; }
.jx-menu { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; min-width: 0; }
.jx-menu a { padding: 7px 9px; border-radius: 7px; color: #cbd5e1; font-size: 12.5px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.jx-menu a:hover, .jx-menu a[aria-current="page"] { background: rgba(255,209,102,.12); color: #ffd166; }
.jx-menu .jx-menu-divider { width: 1px; height: 16px; margin: 0 5px; background: rgba(255,255,255,.14); }

/* Global search on the right side of the bar. */
.jx-search { position: relative; flex: 0 1 430px; min-width: 240px; margin-left: auto; }
.jx-search-row { display: grid; grid-template-columns: minmax(0, 1fr) 124px; gap: 6px; }
.jx-search input, .jx-search select { width: 100%; min-width: 0; height: 36px; margin: 0; padding: 0 11px; border: 1px solid rgba(255,255,255,.14); border-radius: 9px; background: #151926; color: #f8fafc; font: inherit; font-size: 12.5px; }
.jx-search input::placeholder { color: #7e8ba2; }
.jx-search input:focus, .jx-search select:focus { outline: 2px solid rgba(255,209,102,.35); outline-offset: 1px; border-color: rgba(255,209,102,.5); }
.jx-search .global-search-panel { position: absolute; top: calc(100% + 9px); right: 0; width: min(780px, calc(100vw - 24px)); max-height: min(76vh, 780px); overflow: auto; border: 1px solid rgba(148,163,184,.22); border-radius: 14px; background: #0d121d; box-shadow: 0 18px 46px rgba(0,0,0,.55); color: #e8ecf4; text-align: left; }
.jx-search .global-search-panel:not(.visible) { display: none; }
.jx-search .global-search-heading { position: sticky; top: 0; z-index: 1; background: #151926; color: #ffd166; border-color: rgba(148,163,184,.2); }
.jx-search .global-search-heading span { color: #9aa8bd; }
.jx-search .global-search-filter-bar,
.jx-search .global-search-chips,
.jx-search .global-search-more-bar { background: #111722; border-color: rgba(148,163,184,.18); }
.jx-search .global-search-filter-chip:not(.is-active),
.jx-search .global-search-chip { background: #151926; color: #dbe4f1; border-color: rgba(148,163,184,.25); }
.jx-search .global-search-results { background: #0d121d; }
.jx-search .global-search-result { background: #151926; border-color: rgba(148,163,184,.18); color: #e8ecf4; }
.jx-search .global-search-result:hover { border-color: rgba(255,209,102,.35); }
.jx-search .global-search-result.is-focused { border-color: rgba(255,209,102,.55); }
.jx-search .global-search-word, .jx-search .global-search-result.is-focused .global-search-word { color: #f8fafc; }
.jx-search .global-search-secondary { color: #aab8cc; }
.jx-search .global-search-meaning { color: #d5deeb; }
.jx-search .global-search-definition { color: #9aa8bd; }
.jx-search .global-search-result-link .global-search-link-summary { color: #aab8cc; }
.jx-search .global-search-action { background: #111827; border-color: rgba(148,163,184,.25); color: #dbeafe; }
.jx-search .global-search-action.action-view { background: rgba(59,130,246,.13); color: #9bc7ff; border-color: rgba(96,165,250,.3); }
.jx-search .global-search-action.action-listen { background: rgba(34,197,94,.10); color: #9be7b1; border-color: rgba(74,222,128,.25); }
.jx-search .global-search-empty, .jx-search .global-search-kbd-hint { color: #aab8cc; }

@media (max-width: 1080px) {
  .jx-header-inner { flex-wrap: wrap; gap: 6px 8px; }
  .jx-search { flex: 1 1 100%; min-width: 0; margin-left: 0; }
  .jx-search .global-search-panel { left: 0; right: 0; width: auto; }
}
@media (max-width: 640px) {
  .jx-header-inner { padding: 8px 10px; }
  .jx-menu a { padding: 6px 7px; font-size: 11.5px; }
  .jx-menu { flex: 1 1 100%; order: 2; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .jx-menu::-webkit-scrollbar { display: none; }
  .jx-menu .jx-menu-divider { flex: 0 0 1px; }
  .jx-search { order: 3; }
  .jx-search-row { grid-template-columns: minmax(0, 1fr) 104px; }
  .jx-search input, .jx-search select { font-size: 13px; }
  .jx-search .global-search-results { grid-template-columns: 1fr; }
}

/* Shared footer on the dark explorer pages. */
.jx-footer-mount { position: relative; z-index: 1; }
.jx-footer-mount .site-footer { margin-top: 0; background: #0a0d16; border-top-color: rgba(255,255,255,.10); color: #8b98ad; font-family: system-ui, -apple-system, 'Noto Sans KR', sans-serif; }
.jx-footer-mount .site-footer-brand { color: #e2e8f0; }
.jx-footer-mount .site-footer-brand strong { color: #ffd166; }
.jx-footer-mount .site-footer-tagline { color: #aab8cc; }
.jx-footer-mount .site-footer-desc { color: #7e8ba2; }
.jx-footer-mount .site-footer-col h4 { color: #e2e8f0; }
.jx-footer-mount .site-footer-col a, .jx-footer-mount .site-footer-col .footer-link-btn { color: #9aa8bd; }
.jx-footer-mount .site-footer-col a:hover, .jx-footer-mount .site-footer-col .footer-link-btn:hover { color: #ffd166; }
.jx-footer-mount .site-footer-bottom { border-top-color: rgba(255,255,255,.08); color: #7e8ba2; }

/* Footer modal (explorer pages do not load common.css). */
.modal-backdrop { display: none; position: fixed; inset: 0; z-index: 10050; align-items: center; justify-content: center; padding: 20px; background: rgba(0,0,0,.65); }
.modal-backdrop.open { display: flex; }
.modal-backdrop .modal { width: 100%; max-width: 560px; max-height: 80vh; overflow-y: auto; padding: 24px; border-radius: 12px; background: #111a2b; color: #e7ecf3; font-family: system-ui, -apple-system, 'Noto Sans KR', sans-serif; }
.modal-backdrop .modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid #1f2a3c; }
.modal-backdrop .modal-header h4 { margin: 0; color: #f1f5f9; font-size: 1.1rem; }
.modal-backdrop .modal-close { border: none; background: none; color: #94a3b8; font-size: 1.4rem; cursor: pointer; }
.modal-backdrop .modal-body { color: #e7ecf3; font-size: .9rem; line-height: 1.65; }
.modal-backdrop .modal-body p { margin: 0 0 10px; }
.modal-backdrop .shortcuts-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.modal-backdrop .shortcuts-table th, .modal-backdrop .shortcuts-table td { padding: 9px 10px; border-bottom: 1px solid #1f2a3c; text-align: left; vertical-align: top; }
.modal-backdrop .shortcuts-table kbd { display: inline-block; min-width: 22px; padding: 2px 7px; border: 1px solid #334155; border-radius: 5px; background: #0f172a; color: #e2e8f0; font-size: .78rem; font-weight: 800; text-align: center; }
.modal-backdrop .shortcuts-note { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: #0f172a; color: #94a3b8; font-size: .82rem; }
