/* Tiên Giới Truyện 3D · V16.26 Premium Navigation
   Responsive redesign; no database/schema changes. All original navigation modules remain intact. */
:root{--tg26-bg:#0c1119;--tg26-panel:#131b26;--tg26-gold:#e5bc73;--tg26-gold-soft:#f4d795;--tg26-line:rgba(224,177,104,.22);--tg26-text:#e8e4db}
.site-header{z-index:350!important;border-bottom:1px solid var(--tg26-line)!important;background:linear-gradient(180deg,rgba(11,15,22,.98),rgba(11,15,22,.96))!important;box-shadow:0 12px 30px rgba(0,0,0,.18)}
.site-header .header-inner{display:grid!important;grid-template-columns:minmax(230px,auto) minmax(200px,1fr) auto auto;grid-template-rows:64px auto;align-items:center;gap:0 18px!important;max-width:1490px!important;min-height:0!important;padding:0 24px 9px!important}
.site-header .header-inner>.brand{grid-column:1!important;grid-row:1!important;justify-self:start!important;max-width:100%;padding:0!important;margin:0!important;border:0!important;box-shadow:none!important;background:none!important;text-decoration:none}
.site-header .header-inner>.brand img{width:45px;height:45px;object-fit:contain;flex:none}
.site-header .header-inner>.brand span{font-size:clamp(19px,1.9vw,24px);font-family:Georgia,serif;color:#f3d99e;line-height:1.05}
.site-header .header-inner>.brand em{font-size:inherit}
.site-header .header-inner>.search{grid-column:2!important;grid-row:1!important;justify-self:end!important;min-width:180px!important;width:min(425px,100%)!important;height:42px!important;box-sizing:border-box;margin:0!important;border-radius:12px!important;background:#151e2b!important;border:1px solid #495063!important;box-shadow:0 2px 14px rgba(0,0,0,.12)!important;display:flex!important;align-items:center!important;padding:0 13px!important}
.site-header .header-inner>.search:focus-within{border-color:#dcad62!important;box-shadow:0 0 0 3px rgba(229,188,115,.14)!important}
.site-header .header-inner>.search .search-icon{color:var(--tg26-gold);font-size:23px}
.site-header .header-inner>.search input{font-size:13px!important;min-width:0!important;width:100%!important;height:40px!important;color:#f7f0e2!important}
.site-header .header-inner>.search input::placeholder{color:#afb4c0!important;opacity:1}
.site-header .header-inner>.tg-mode-toggle{grid-column:4!important;grid-row:1!important;justify-self:end!important;min-width:44px!important;min-height:42px!important;margin:0!important;border:1px solid var(--tg26-line)!important;border-radius:11px!important;background:#171c26!important;color:var(--tg26-gold)!important;white-space:nowrap}
.site-header .header-inner>.tg-mode-toggle #tgModeText{display:none!important}
.tg26-tools{grid-column:3;grid-row:1;display:flex;align-items:center;gap:8px;justify-self:end;white-space:nowrap}
.tg26-tools .tg26-tool,.tg26-tools .tg26-account>summary{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;box-sizing:border-box;padding:0 12px;border-radius:11px;border:1px solid var(--tg26-line);background:linear-gradient(180deg,#282117,#1c1b1e);color:var(--tg26-gold-soft)!important;text-decoration:none;font-size:12px;font-weight:700;cursor:pointer}
.tg26-tools .tg26-tool:hover,.tg26-tools .tg26-account>summary:hover{background:#37291e;border-color:#b98c48}
.tg26-tools .tg26-tool>span:first-child,.tg26-tools .tg26-account>summary>span:first-child{font-size:18px}
.tg26-tools .tg26-notify{position:relative;width:42px;padding:0}
.tg26-notify-dot{position:absolute;right:7px;top:6px;width:7px;height:7px;border-radius:50%;background:#e9ad5a;box-shadow:0 0 0 2px #241e19}
.tg26-notify-dot[hidden]{display:none!important}
.tg26-account{position:relative}
.tg26-account>summary{list-style:none;user-select:none}
.tg26-account>summary::-webkit-details-marker{display:none}
.tg26-account-flyout{position:absolute;right:0;top:calc(100% + 10px);width:220px;max-height:70vh;overflow:auto;z-index:600;padding:7px;display:grid;gap:3px;background:#111a25;border:1px solid #765735;border-radius:14px;box-shadow:0 22px 40px #0009}
.tg26-account-flyout a{color:#e8dfcf!important;font-size:13px;font-weight:600;text-decoration:none;border-radius:8px;padding:10px 12px;line-height:1.4}
.tg26-account-flyout a:hover,.tg26-account-flyout a:focus-visible{color:#f5d797!important;background:#30291f}
.tg26-account:not([open]) .tg26-account-flyout{display:none}
.site-header .header-inner>.tg-v141-nav{grid-column:1/-1!important;grid-row:2!important;justify-self:stretch!important;order:initial!important;width:100%!important;min-width:0!important;display:flex!important;align-items:center!important;justify-content:center!important;flex-wrap:nowrap!important;gap:8px!important;margin:0!important;padding:9px 0 0!important;border-top:1px solid var(--tg26-line)!important;background:transparent!important;overflow:visible!important}
.site-header .header-inner>.tg-v141-nav .tg-v141-cluster{display:flex!important;align-items:center!important;justify-content:center!important;flex-wrap:nowrap!important;gap:4px!important;width:auto!important}
.site-header .header-inner>.tg-v141-nav a[data-nav="checkin"],.site-header .header-inner>.tg-v141-nav a[data-nav="missions"]{display:none!important}
.site-header .header-inner>.tg-v141-nav .tg-v141-dropdown[data-dropdown="taikhoan"]{display:none!important}
.site-header .header-inner>.tg-v141-nav a,.site-header .header-inner>.tg-v141-nav .tg-genre-trigger,.site-header .header-inner>.tg-v141-nav .tg-v141-dropdown>summary{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:9px 12px!important;min-height:38px!important;border:1px solid transparent!important;border-radius:9px!important;color:#dbd9d4!important;background:transparent!important;font-size:13px!important;font-weight:650!important;letter-spacing:.005em;white-space:nowrap}
.site-header .header-inner>.tg-v141-nav a:hover,.site-header .header-inner>.tg-v141-nav a.active,.site-header .header-inner>.tg-v141-nav .tg-genre-trigger:hover,.site-header .header-inner>.tg-v141-nav .tg-v141-dropdown[open]>summary{color:#f4ce85!important;background:#352919!important;border-color:#73552d!important}
.site-header .header-inner>.tg-v141-nav .tg-v141-dropdown>summary{border-color:#55412b!important;background:#221e1b!important;color:#e5bc73!important}
.site-header .header-inner>.tg-v141-nav .tg-v141-flyout{background:#111924!important;box-shadow:0 18px 48px #0009!important;border-color:#715333!important;min-width:214px}
.site-header .header-inner>.tg-v141-nav .tg-v141-flyout a{justify-content:flex-start!important;width:100%;font-size:12.5px!important}
.site-header .header-inner>.tg-v141-nav .tg-v141-symbol{width:17px;height:17px}
.site-header .header-inner>.tg-v141-nav .tg-v141-icon,.site-header .header-inner>.tg-v141-nav .tg-v141-custom-icon{width:17px;height:17px}
.site-header .tg-mega-panel{z-index:570}
.tg26-mobile-toggle,.tg26-mobile-account,.tg26-mobile-drawer,.tg26-bottom-nav{display:none}
body.tg26-scrolled .site-header .header-inner{grid-template-rows:58px auto}
body.tg26-scrolled .site-header .header-inner>.brand img{width:40px;height:40px}
body.tg26-scrolled .site-header .header-inner>.tg-v141-nav{padding-top:6px!important}
body.tg26-scrolled .site-header{box-shadow:0 14px 28px #0008}
@media(max-width:1320px) and (min-width:1161px){
  .site-header .header-inner{grid-template-columns:minmax(205px,auto) minmax(160px,1fr) auto auto;gap:0 10px!important;padding-left:14px!important;padding-right:14px!important}
  .site-header .header-inner>.tg-v141-nav{gap:3px!important}
  .site-header .header-inner>.tg-v141-nav a,.site-header .header-inner>.tg-v141-nav .tg-genre-trigger,.site-header .header-inner>.tg-v141-nav .tg-v141-dropdown>summary{font-size:12px!important;padding:8px 9px!important}
}
@media(max-width:1160px){
  .realm-bar{display:none!important}
  .site-header .header-inner{display:grid!important;grid-template-columns:42px minmax(0,1fr) 42px!important;grid-template-rows:52px 46px!important;gap:8px 10px!important;min-height:0!important;padding:8px 15px 12px!important}
  body.tg26-scrolled .site-header .header-inner{grid-template-rows:48px 44px!important}
  .site-header .header-inner>.brand{grid-column:2!important;grid-row:1!important;justify-self:center!important;overflow:hidden;min-width:0}
  .site-header .header-inner>.brand img{width:34px;height:34px}
  .site-header .header-inner>.brand span,.site-header .header-inner>.brand em{font-size:clamp(15px,2.5vw,21px)!important}
  .site-header .header-inner>.search{grid-column:1/-1!important;grid-row:2!important;width:100%!important;min-width:0!important;justify-self:stretch!important;height:44px!important;border-radius:11px!important}
  .site-header .header-inner>.search input{height:42px!important}
  .site-header .header-inner>.tg-v141-nav,.site-header .header-inner>.tg-mode-toggle,.site-header .header-inner>.tg26-tools{display:none!important}
  .tg26-mobile-toggle,.tg26-mobile-account{display:inline-flex;justify-content:center;align-items:center;width:42px;height:42px;box-sizing:border-box;border-radius:10px;border:1px solid #735936;background:#211d1a;color:#f4cc83;font-size:25px;text-decoration:none;cursor:pointer}
  .site-header .header-inner>.tg26-mobile-toggle{grid-column:1;grid-row:1;justify-self:start}
  .site-header .header-inner>.tg26-mobile-account{grid-column:3;grid-row:1;justify-self:end;font-size:25px}
  .tg26-mobile-drawer:not([hidden]){display:block;position:absolute;left:12px;top:calc(100% + 5px);width:min(460px,calc(100vw - 24px));max-height:min(74vh,690px);overflow-y:auto;overscroll-behavior:contain;border:1px solid #7d5c34;border-radius:17px;background:#111822;box-shadow:0 22px 70px #000c;padding:15px;box-sizing:border-box;z-index:600}
  .tg26-mobile-drawer-head{display:flex;align-items:center;justify-content:space-between;gap:16px;color:#eac47f;padding-bottom:11px;font-size:17px;font-family:Georgia,serif}
  .tg26-mobile-drawer-head button{min-width:34px;min-height:34px;border:1px solid #6d5433;background:#292219;color:#eac47f;border-radius:8px;cursor:pointer}
  .tg26-mobile-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .tg26-mobile-grid a{display:flex;gap:9px;align-items:center;min-width:0;padding:12px 10px;color:#e4ded1!important;background:#1b232e;border:1px solid #3c3b3b;border-radius:10px;font-size:13px;font-weight:600;text-decoration:none}
  .tg26-mobile-grid a:hover,.tg26-mobile-grid a.active{border-color:#b78c4a;color:#f4cf89!important;background:#30271e}
  .tg26-mobile-grid a span{overflow-wrap:anywhere}
  .tg26-mobile-divider{font-size:10px;letter-spacing:.14em;font-weight:800;color:#bd9d6a;margin:20px 0 10px}
  .tg26-mobile-mode{display:block;margin:12px 0 0;padding:12px;width:100%;color:#e5bf7f;border:1px solid #544735;border-radius:10px;background:#25221f;font-size:13px;cursor:pointer}
  .tg26-bottom-nav{position:fixed;bottom:0;left:0;right:0;z-index:320;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:1px;padding:7px max(8px,env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));background:rgba(10,15,22,.98);border-top:1px solid #59462c;box-shadow:0 -8px 24px #0008;backdrop-filter:blur(14px)}
  .tg26-bottom-nav>a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:44px;color:#c7c1b8!important;text-decoration:none;border-radius:9px;border:1px solid transparent;font-weight:600}
  .tg26-bottom-nav>a span{font-size:22px;line-height:1.1}
  .tg26-bottom-nav>a small{font-size:10.5px;line-height:1.2;white-space:nowrap}
  .tg26-bottom-nav>a.active,.tg26-bottom-nav>a:hover{background:rgba(198,144,65,.13);border-color:rgba(216,165,86,.22);color:#f6d48f!important}
  body{padding-bottom:calc(71px + env(safe-area-inset-bottom))}
  body.tg26-reader-page .tg26-bottom-nav,body:has(.reading.tg1620-focus) .tg26-bottom-nav{display:none!important}
  body.tg26-reader-page{padding-bottom:0}
  body.tg26-drawer-open{overflow:hidden}
}
@media(max-width:390px){.site-header .header-inner{padding:7px 10px 9px!important;column-gap:6px!important}.site-header .header-inner>.brand span,.site-header .header-inner>.brand em{font-size:15px!important}.site-header .header-inner>.brand img{width:30px;height:30px}.tg26-mobile-grid a{font-size:12px;padding:11px 8px}.tg26-bottom-nav>a small{font-size:10px}}
@media(prefers-reduced-motion:reduce){.tg26-bottom-nav,.site-header{transition:none!important}}
/* Keep user-selected light theme legible. */
html[data-tg-mode="light"] .site-header{background:linear-gradient(180deg,#fcf7ed,#f4ecdc)!important;border-bottom-color:#d4bc91!important}
html[data-tg-mode="light"] .site-header .header-inner>.brand span{color:#694618!important;text-shadow:none}
html[data-tg-mode="light"] .site-header .header-inner>.search{background:#fff!important;border-color:#d3b991!important}
html[data-tg-mode="light"] .site-header .header-inner>.search input{color:#352b20!important}
html[data-tg-mode="light"] .site-header .header-inner>.search input::placeholder{color:#6b6258!important}
html[data-tg-mode="light"] .site-header .header-inner>.tg-v141-nav a,html[data-tg-mode="light"] .site-header .header-inner>.tg-v141-nav .tg-genre-trigger{color:#4c3927!important}
html[data-tg-mode="light"] .site-header .header-inner>.tg-v141-nav a.active,html[data-tg-mode="light"] .site-header .header-inner>.tg-v141-nav a:hover{background:#eddfc7!important;color:#714511!important}
html[data-tg-mode="light"] .tg26-mobile-drawer:not([hidden]),html[data-tg-mode="light"] .tg26-account-flyout{background:#fff8eb!important;color:#3d3021!important}
html[data-tg-mode="light"] .tg26-mobile-grid a,html[data-tg-mode="light"] .tg26-account-flyout a{background:#f8f0e3;color:#43311d!important;border-color:#dbc8a9}
html[data-tg-mode="light"] .tg26-bottom-nav{background:rgba(250,244,232,.97);border-color:#cbb18a}
html[data-tg-mode="light"] .tg26-bottom-nav>a{color:#55432a!important}
html[data-tg-mode="light"] .tg26-bottom-nav>a.active{color:#7b4f11!important}
