/* Shared Orlong navigation — used on every page */
.topbar{
  position:sticky;top:0;z-index:1000;
  display:flex;justify-content:space-between;align-items:center;
  gap:20px;padding:16px 5%;
  background:rgba(7,11,19,.97);border-bottom:1px solid rgba(255,255,255,.12);
  backdrop-filter:blur(15px);
}
.topbar .logo{flex:0 0 auto;color:#f3f4f8;font-family:Cinzel,serif;font-size:19px;font-weight:600;letter-spacing:4px;text-decoration:none}
.topbar-right,.top-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:nowrap;min-width:0}
.topbar-right a,.topbar-right button,.top-actions a,.top-actions button{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:36px;padding:9px 11px;color:#a1a9b8;background:transparent;
  border:1px solid transparent;border-radius:2px;text-decoration:none;
  font-family:Inter,sans-serif;font-size:9px;font-weight:500;letter-spacing:1.2px;
  white-space:nowrap;cursor:pointer;transition:color .2s,border-color .2s,background .2s;
}
.topbar-right a:hover,.topbar-right button:hover,.top-actions a:hover,.top-actions button:hover{
  color:#fff;border-color:#398cff77;background:#398cff12;
}
.topbar-right .nav-account-button,.topbar-right #mainAccountButton,.topbar-right #openAccountButton,
.top-actions .nav-account-button,.top-actions #mainAccountButton,.top-actions #openAccountButton{
  color:#d7e8ff;border-color:#398cff77;background:#398cff12;
}
@media(max-width:1100px){
 .topbar{flex-direction:column;gap:10px;padding:13px 4%}
 .topbar-right,.top-actions{justify-content:center;gap:5px;flex-wrap:wrap}
 .topbar-right a,.topbar-right button,.top-actions a,.top-actions button{padding:8px 9px;font-size:8px}
}
@media(max-width:520px){
 .topbar-right,.top-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}
 .topbar-right a,.topbar-right button,.top-actions a,.top-actions button{width:100%}
}

/* Homepage social link */
.topbar-right .nav-social-link{
  width:36px;min-width:36px;min-height:36px;padding:8px;
  color:#a1a9b8;border:1px solid transparent;
}
.topbar-right .nav-social-link svg{display:block;width:17px;height:17px}
.topbar-right .nav-social-link:hover{color:#fff;border-color:#398cff77;background:#398cff12}
.topbar-right .nav-social-link:focus-visible{outline:2px solid #8bbdff;outline-offset:3px}


/* Compact shared dropdown navigation */
.topbar-right,.top-actions{gap:8px;flex-wrap:nowrap}
.topbar-right .nav-dropdown,.top-actions .nav-dropdown{position:relative;display:inline-flex;align-items:center}
.topbar-right .nav-dropdown>summary,.top-actions .nav-dropdown>summary{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:9px 12px;color:#a1a9b8;background:transparent;border:1px solid transparent;border-radius:2px;font-family:Inter,sans-serif;font-size:9px;font-weight:500;letter-spacing:1.2px;white-space:nowrap;cursor:pointer;list-style:none}
.topbar-right .nav-dropdown>summary::-webkit-details-marker,.top-actions .nav-dropdown>summary::-webkit-details-marker{display:none}
.topbar-right .nav-dropdown>summary::after,.top-actions .nav-dropdown>summary::after{content:"";width:6px;height:6px;border-right:1px solid currentColor;border-bottom:1px solid currentColor;transform:rotate(45deg) translateY(-2px);transition:transform .18s}
.topbar-right .nav-dropdown[open]>summary::after,.top-actions .nav-dropdown[open]>summary::after{transform:rotate(225deg) translate(-1px,-1px)}
.topbar-right .nav-dropdown>summary:hover,.topbar-right .nav-dropdown[open]>summary,.top-actions .nav-dropdown>summary:hover,.top-actions .nav-dropdown[open]>summary{color:#fff;border-color:#398cff77;background:#398cff12}
.nav-dropdown-menu{position:absolute;top:calc(100% + 8px);left:0;z-index:1100;min-width:190px;padding:6px;background:rgba(7,13,24,.98);border:1px solid rgba(141,191,255,.24);box-shadow:0 14px 38px #0008;backdrop-filter:blur(16px);display:flex;flex-direction:column;gap:2px}
.nav-dropdown-menu a{display:flex!important;justify-content:flex-start!important;width:100%;padding:12px!important;color:#b7c7dc!important;font-size:9px!important;letter-spacing:1px!important;border:1px solid transparent!important}
.nav-dropdown-menu a:hover,.nav-dropdown-menu a[aria-current="page"]{color:#fff!important;background:#398cff18!important;border-color:#398cff55!important}
.nav-dropdown>summary:focus-visible,.nav-dropdown-menu a:focus-visible{outline:2px solid #8bbdff;outline-offset:3px}
.topbar-right .nav-social-link,.top-actions .nav-social-link{width:36px;min-width:36px;min-height:36px;padding:8px;color:#a1a9b8;border:1px solid transparent}
.topbar-right .nav-social-link svg,.top-actions .nav-social-link svg{display:block;width:17px;height:17px}
.topbar-right .nav-social-link:hover,.top-actions .nav-social-link:hover{color:#fff;border-color:#398cff77;background:#398cff12}
@media(max-width:1100px){.topbar{flex-direction:row;align-items:center;gap:10px;padding:12px 3%}.topbar-right,.top-actions{justify-content:flex-end;gap:3px;flex-wrap:wrap}.nav-dropdown-menu{left:auto;right:0}}
@media(max-width:680px){.topbar{flex-direction:column;gap:8px;padding:11px 4%}.topbar-right,.top-actions{display:flex;justify-content:center;flex-wrap:wrap;width:100%;gap:4px}.topbar-right .nav-dropdown>summary,.top-actions .nav-dropdown>summary{padding:8px 9px;font-size:8px}.topbar-right a,.topbar-right button,.top-actions a,.top-actions button{padding:8px 9px;font-size:8px}.nav-dropdown-menu{left:0;right:auto}}
@media(max-width:390px){.topbar-right,.top-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.topbar-right .nav-dropdown,.top-actions .nav-dropdown{justify-content:center}.topbar-right .nav-dropdown>summary,.top-actions .nav-dropdown>summary{width:100%}.nav-dropdown-menu{left:0;right:auto;min-width:170px}}


/* Stage 4 final: enforce one identical shared navigation layout on every page. */
.topbar{display:flex!important;flex-direction:row!important;justify-content:space-between!important;align-items:center!important;gap:20px!important;padding:16px 5%!important;min-height:68px}
.topbar>.logo{flex:0 0 auto!important}
.topbar>.topbar-right,.topbar>.top-actions{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-end!important;gap:8px!important;flex-wrap:nowrap!important;width:auto!important;min-width:0!important}
.topbar>.topbar-right>.nav-dropdown,.topbar>.top-actions>.nav-dropdown{position:relative!important;display:inline-flex!important;flex:0 0 auto!important}
.topbar>.topbar-right>.nav-dropdown>summary,.topbar>.top-actions>.nav-dropdown>summary{width:auto!important;min-width:0!important}
.topbar .nav-dropdown-menu{display:none!important;position:absolute!important;top:calc(100% + 8px)!important;left:0!important;right:auto!important;z-index:1100!important;min-width:190px!important;width:max-content!important;max-width:min(260px,90vw)!important;padding:6px!important;flex-direction:column!important;gap:2px!important}
.topbar .nav-dropdown[open]>.nav-dropdown-menu{display:flex!important}
.topbar .nav-dropdown-menu a{width:100%!important;min-height:38px!important;justify-content:flex-start!important;white-space:nowrap!important}
@media(max-width:760px){
 .topbar{flex-direction:column!important;align-items:stretch!important;gap:9px!important;padding:12px 4%!important}
 .topbar>.topbar-right,.topbar>.top-actions{display:flex!important;justify-content:center!important;flex-wrap:wrap!important;width:100%!important;gap:5px!important}
 .topbar .nav-dropdown-menu{left:0!important;right:auto!important}
}
@media(max-width:390px){
 .topbar>.topbar-right,.topbar>.top-actions{display:flex!important;flex-wrap:wrap!important}
 .topbar>.topbar-right>.nav-dropdown>summary,.topbar>.top-actions>.nav-dropdown>summary{padding:8px 9px!important}
}

/* Stage 8A — make the book the clear primary destination. */
.topbar .nav-start-reading{color:#fff!important;background:linear-gradient(120deg,#246bc1,#398cff)!important;border:1px solid #6aafff!important;padding:10px 15px!important;border-radius:3px!important;box-shadow:0 5px 18px #176bd033}
.topbar .nav-start-reading:hover{background:#4b9aff!important;border-color:#a8d1ff!important;transform:translateY(-1px)}
.topbar .nav-dropdown>summary{border-radius:3px}
.topbar .nav-dropdown-menu{border-radius:4px}
@media(max-width:760px){.topbar .nav-start-reading{min-height:38px}}

/* Stage 8A — shared orientation callouts and accessible page rhythm. */
.reader-first-callout{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0 0 28px;padding:18px 20px;background:linear-gradient(110deg,#11233a,#0c1726);border:1px solid #398cff55;border-radius:5px}
.reader-first-callout strong{color:#b8d8ff;font-size:10px;letter-spacing:1.5px}
.reader-first-callout p{margin:6px 0 0;color:#aebdd0;font-size:12px;line-height:1.7}
.reader-first-callout a{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:10px 14px;background:#2878d7;border:1px solid #75b4ff;color:#fff;font-size:9px;font-weight:700;letter-spacing:1px;white-space:nowrap}
.contents-account-note{padding:13px 15px;background:#398cff10;border-left:2px solid #398cff;color:#b8cbe2!important;font-size:12px!important;line-height:1.7}
.events-reader-link{margin:22px auto 0}.events-reader-link a{display:inline-flex;padding:11px 15px;border:1px solid #6baaff88;background:#122b48;color:#e8f3ff;font-size:9px;font-weight:700;letter-spacing:1px}
@media(max-width:620px){.reader-first-callout{align-items:stretch;flex-direction:column}.reader-first-callout a{width:100%}}

.topbar .nav-guide-link{color:#d7e8ff!important;background:#398cff12!important;border-color:#398cff44!important}
.topbar .nav-guide-link:hover{background:#398cff24!important;border-color:#8bbdff!important}

/* Stage 8B refinement — Book-Only keeps only account, Instagram and the exit control. */
body.book-only-mode .topbar{justify-content:flex-end!important;min-height:58px;padding:10px 5%!important;background:transparent;border-bottom:1px solid rgba(255,255,255,.06);box-shadow:none}
body.book-only-mode .topbar>.logo{display:none!important}
body.book-only-mode .topbar>.topbar-right,
body.book-only-mode .topbar>.top-actions{display:flex!important;justify-content:flex-end!important;align-items:center!important;gap:10px!important;width:auto!important}
body.book-only-mode .topbar-right .nav-book-only-exit,
body.book-only-mode .top-actions .nav-book-only-exit{min-height:34px;padding:8px 12px;color:#d7e8ff;border:1px solid #398cff66;background:#398cff12;font-size:9px;letter-spacing:1px}
body.book-only-mode .topbar-right .nav-book-only-exit:hover,
body.book-only-mode .top-actions .nav-book-only-exit:hover{color:#fff;border-color:#8bbdff;background:#398cff24}
@media(max-width:760px){
 body.book-only-mode .topbar{flex-direction:row!important;align-items:center!important;padding:9px 12px!important}
 body.book-only-mode .topbar>.topbar-right,
 body.book-only-mode .topbar>.top-actions{display:flex!important;flex-wrap:nowrap!important;justify-content:flex-end!important;width:100%!important;gap:5px!important}
 body.book-only-mode .topbar-right .nav-account-button,
 body.book-only-mode .topbar-right #openAccountButton,
 body.book-only-mode .top-actions .nav-account-button,
 body.book-only-mode .top-actions #openAccountButton{max-width:42vw;overflow:hidden;text-overflow:ellipsis}
}


/* Stage 8B — place the Book-Only shortcut in the navigation beside Main Menu. */
.topbar-right .nav-book-only-entry,.top-actions .nav-book-only-entry{min-height:36px;padding:9px 11px;color:#d7e8ff;border:1px solid #398cff66;background:#398cff12;font-size:9px;letter-spacing:1px}
.topbar-right .nav-book-only-entry:hover,.top-actions .nav-book-only-entry:hover{color:#fff;border-color:#8bbdff;background:#398cff24}
body.book-only-mode .nav-book-only-entry{display:none!important}

/* Keep the expanded top-level navigation usable at tablet widths. */
@media(max-width:1100px){.topbar>.topbar-right,.topbar>.top-actions{flex-wrap:wrap!important;}}

/* Stage 8D.10 — cleaner, calmer shared navigation. */
.topbar>.topbar-right,.topbar>.top-actions{gap:5px!important}
.topbar>.topbar-right>a,.topbar>.topbar-right>button,.topbar>.top-actions>a,.topbar>.top-actions>button,.topbar .nav-dropdown>summary{min-height:38px;padding:9px 12px!important;border-radius:4px!important;font-size:9px!important;letter-spacing:1px!important}
.topbar .nav-start-reading{padding:10px 15px!important}
.topbar .nav-dropdown[open]>summary,.topbar a[aria-current="page"]{color:#fff!important;border-color:var(--orlong-accent,#398cff)!important;background:color-mix(in srgb,var(--orlong-accent,#398cff) 14%,transparent)!important}
.topbar .nav-dropdown-menu{border-radius:6px!important;padding:7px!important}
.topbar .nav-dropdown-menu a{min-height:40px!important;border-radius:3px!important}
.topbar .nav-main-menu-panel .nav-moderator-link{display:flex;align-items:center;min-height:38px;padding:10px 12px;color:#c8ddf4;font-size:9px;letter-spacing:1px;border:1px solid transparent}
.topbar .nav-main-menu-panel .nav-moderator-link:hover{color:#fff;background:#398cff18;border-color:#398cff55}
@media(max-width:760px){.topbar>.topbar-right,.topbar>.top-actions{gap:5px!important}.topbar>.topbar-right>a,.topbar>.topbar-right>button,.topbar>.top-actions>a,.topbar>.top-actions>button,.topbar .nav-dropdown>summary{min-height:36px!important;padding:8px 10px!important}}


/* Stage 8D.11 — moderator-only icon shortcut beside Instagram. */
.topbar .nav-moderator-icon{display:inline-flex;align-items:center;justify-content:center;width:36px;min-width:36px;height:36px;min-height:36px;padding:8px!important;color:var(--orlong-ice,#b8d8ff)!important;border:1px solid color-mix(in srgb,var(--orlong-accent,#398cff) 48%,transparent)!important;border-radius:5px!important;background:color-mix(in srgb,var(--orlong-accent,#398cff) 12%,transparent)!important;text-decoration:none!important}
.topbar .nav-moderator-icon svg{display:block;width:19px;height:19px}
.topbar .nav-moderator-icon:hover{color:var(--orlong-on-accent,#fff)!important;background:var(--orlong-accent,#398cff)!important;border-color:var(--orlong-ice,#b8d8ff)!important}
.topbar .nav-moderator-icon:focus-visible{outline:2px solid var(--orlong-ice,#8bbdff);outline-offset:3px}


/* Stage 8E.1 — calm, readable section labels inside Discovery. */
.topbar .nav-dropdown-section-label{display:block;padding:11px 12px 5px;margin-top:4px;color:var(--orlong-ice,#a8ceff);font:700 8px/1.3 Inter,sans-serif;letter-spacing:1.7px;text-transform:uppercase;opacity:.88}
.topbar .nav-dropdown-section-label:first-child{margin-top:2px}
.topbar .nav-dropdown-section-label:not(:first-child){border-top:1px solid color-mix(in srgb,var(--orlong-accent,#398cff) 22%,transparent)}
.topbar .nav-dropdown-menu{min-width:218px!important;padding:8px!important}
.topbar .nav-dropdown-menu a{min-height:38px!important;padding:10px 12px!important}
.topbar .nav-book-collection{color:var(--orlong-text,#f1f5fb)!important}
@media(max-width:760px){.topbar .nav-dropdown-menu{max-width:min(290px,92vw)!important}.topbar .nav-dropdown-section-label{padding-left:10px}}


/* Stage 8I.2 — moderator-only Writing Studio shortcut, matching the other header icons. */
.topbar .nav-writing-studio-icon{display:inline-flex;align-items:center;justify-content:center;width:36px;min-width:36px;height:36px;min-height:36px;padding:8px!important;color:var(--orlong-ice,#b8d8ff)!important;border:1px solid color-mix(in srgb,var(--orlong-accent,#398cff) 48%,transparent)!important;border-radius:5px!important;background:color-mix(in srgb,var(--orlong-accent,#398cff) 12%,transparent)!important;text-decoration:none!important}
.topbar .nav-writing-studio-icon svg{display:block;width:19px;height:19px}
.topbar .nav-writing-studio-icon:hover{color:var(--orlong-on-accent,#fff)!important;background:var(--orlong-accent,#398cff)!important;border-color:var(--orlong-ice,#b8d8ff)!important}
.topbar .nav-writing-studio-icon:focus-visible{outline:2px solid var(--orlong-ice,#8bbdff);outline-offset:3px}

/* 8J.1 — moderator-only Orlong Arcade shortcut, ordered before Writing Studio. */
.topbar .nav-arcade-icon{display:inline-flex;align-items:center;justify-content:center;width:36px;min-width:36px;height:36px;min-height:36px;padding:8px!important;color:var(--orlong-ice,#b8d8ff)!important;border:1px solid color-mix(in srgb,var(--orlong-accent,#398cff) 48%,transparent)!important;border-radius:5px!important;background:color-mix(in srgb,var(--orlong-accent,#398cff) 12%,transparent)!important;text-decoration:none!important}
.topbar .nav-arcade-icon svg{display:block;width:19px;height:19px}
.topbar .nav-arcade-icon:hover{color:var(--orlong-on-accent,#fff)!important;background:var(--orlong-accent,#398cff)!important;border-color:var(--orlong-ice,#b8d8ff)!important}
.topbar .nav-arcade-icon:focus-visible{outline:2px solid var(--orlong-ice,#8bbdff);outline-offset:3px}

.topbar .nav-social-studio-icon{display:inline-flex;align-items:center;justify-content:center;width:36px;min-width:36px;height:36px;min-height:36px;padding:8px!important;color:var(--orlong-ice,#b8d8ff)!important;border:1px solid color-mix(in srgb,var(--orlong-accent,#398cff) 48%,transparent)!important;border-radius:5px!important;background:color-mix(in srgb,var(--orlong-accent,#398cff) 12%,transparent)!important;text-decoration:none!important}
.topbar .nav-social-studio-icon svg{display:block;width:19px;height:19px}.topbar .nav-social-studio-icon:hover{color:#fff!important;background:var(--orlong-accent,#398cff)!important;border-color:var(--orlong-ice,#b8d8ff)!important}
