/* Visual layer for polish.js: drawn icons, lit navigation, spotlight home page, bookmark states. Loaded last. */
.i{width:1.15em;height:1.15em;flex:none;display:block}

/* Header */
.icon#theme{display:grid;place-items:center;padding:0}
#theme .i{width:21px;height:21px}
#theme .i-moon,.light #theme .i-sun{display:none}
.light #theme .i-moon{display:block}
.search>span{display:grid;place-items:center;color:var(--muted)}
.search>span .i{width:18px;height:18px}
@media(min-width:701px){.saved-link{display:inline-flex;flex-direction:row;align-items:center;gap:7px}}
.saved-link .i{width:18px;height:18px}

/* Bottom navigation: the active tab lights up; every tap gives a little press */
.mobile-nav a{-webkit-tap-highlight-color:transparent}
.mobile-nav a.active:before{display:none}
.mobile-nav a:hover{background:none}
.mobile-nav .nav-ico{display:grid;place-items:center;width:58px;height:32px;border-radius:16px;font-style:normal;color:inherit;transition:background .25s,box-shadow .3s,transform .18s cubic-bezier(.3,1.5,.6,1)}
.mobile-nav .nav-ico .i{width:22px;height:22px;transition:transform .25s,fill .25s}
.mobile-nav a:active{transform:none}
.mobile-nav a:active .nav-ico{transform:scale(.86)}
.mobile-nav a.active .nav-ico{background:color-mix(in srgb,var(--accent) 20%,transparent);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 34%,transparent),0 0 22px -4px color-mix(in srgb,var(--accent) 65%,transparent);animation:nav-light .45s cubic-bezier(.3,1.6,.5,1)}
.mobile-nav a.active .nav-ico .i{fill:color-mix(in srgb,var(--accent) 28%,transparent);filter:drop-shadow(0 0 6px color-mix(in srgb,var(--accent) 55%,transparent))}
.mobile-nav a.active>span{font-weight:650;color:var(--accent)}
.mobile-nav a:not(.active)>span{color:color-mix(in srgb,var(--muted) 75%,var(--text))}
@keyframes nav-light{0%{transform:scale(.7);box-shadow:none}60%{transform:scale(1.08)}100%{transform:scale(1)}}

/* Covers: drawn, centred emblems */
.cover .sigil{left:0;right:0;display:flex;justify-content:center;transform:none;opacity:.8;text-shadow:none}
.cover .sigil .i{width:.78em;height:.78em;stroke-width:1.15;filter:drop-shadow(0 0 14px var(--glow))}
.card .cover{border-radius:12px;box-shadow:0 12px 26px -10px #000c,inset 0 0 0 1px #ffffff15;transition:transform .25s,box-shadow .25s}
.card:hover .cover{box-shadow:0 18px 34px -10px #000d,0 0 0 1px color-mix(in srgb,var(--glow) 45%,transparent)}
.card-saved{display:grid;place-items:center;color:#ff9fbf}
.card-saved .i{width:14px;height:14px;fill:currentColor}

/* Spotlight */
.spotlight{position:relative;border-radius:22px;overflow:hidden;isolation:isolate;border:1px solid color-mix(in srgb,var(--accent) 16%,#2c2a36);background:#14131b;color:#f3eefb;outline:none}
.spot-track{display:grid}
.spot-slide{grid-area:1/1;position:relative;display:grid;grid-template-columns:minmax(0,1fr) 180px;grid-template-areas:"kicker cover" "title cover" "meta cover" "desc cover" "actions cover";grid-template-rows:auto auto auto 1fr auto;column-gap:34px;align-items:start;padding:48px 44px 40px;min-height:330px;opacity:0;visibility:hidden;transition:opacity .7s ease,visibility 0s .7s}
.spot-slide.is-active{opacity:1;visibility:visible;transition:opacity .7s ease}
.spot-bg{position:absolute;inset:0;z-index:-1;background:radial-gradient(90% 80% at 88% 18%,color-mix(in srgb,var(--glow) 34%,transparent),transparent 62%),radial-gradient(70% 70% at 0% 110%,color-mix(in srgb,var(--glow) 13%,transparent),transparent 70%),linear-gradient(140deg,#1e1a29,#131219 70%)}
.spot-bg:after{content:'';position:absolute;right:-8%;top:-30%;width:55%;height:160%;background:var(--cover);filter:blur(70px);opacity:.5}
.spot-copy{display:contents}
.spot-kicker{grid-area:kicker;display:flex;align-items:center;gap:7px;font-size:12px;font-weight:650;letter-spacing:1.6px;text-transform:uppercase;color:color-mix(in srgb,var(--glow) 70%,#fff)}
.spot-kicker .i{width:15px;height:15px;fill:currentColor}
.spot-age{margin-left:4px;font-size:10px;letter-spacing:.5px;padding:2px 6px;border-radius:5px;border:1px solid #ffffff38;color:#fff}
.spot-title{grid-area:title;font:500 36px/1.18 var(--serif);letter-spacing:-.4px;margin:14px 0 14px;color:#fbf8ff;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;text-wrap:balance}
.spot-meta{grid-area:meta;display:flex;flex-wrap:wrap;gap:7px}
.spot-meta span{font-size:12px;font-weight:600;padding:5px 10px;border-radius:999px;background:#ffffff14;border:1px solid #ffffff1c;color:#e7e0f2}
.spot-desc{grid-area:desc;font-size:15px;line-height:1.65;color:#cfc7dc;margin:16px 0 0;max-width:520px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.spot-actions{grid-area:actions;align-self:end;display:flex;gap:10px;margin-top:24px}
.spot-actions .button{min-height:48px;padding:0 20px;border-radius:12px;font-size:15px;gap:9px;justify-content:center}
.spot-actions .button.primary{background:#c9adff;border-color:#c9adff;color:#1d1230;box-shadow:0 10px 30px -10px #c9adffaa}
.spot-actions .button.primary .i{width:19px;height:19px}
.spot-ghost{background:#ffffff12;border-color:#ffffff26;color:#fff}
.spot-ghost:hover{background:#ffffff1f}
.spot-cover{grid-area:cover;align-self:center;justify-self:end}
.spot-cover .cover{width:180px;height:268px;border-radius:12px;transform:rotate(3deg);box-shadow:0 34px 60px -14px #000e,0 0 70px -18px var(--glow),inset 0 0 0 1px #ffffff20}
.spot-slide.is-active .spot-kicker,.spot-slide.is-active .spot-title,.spot-slide.is-active .spot-meta,.spot-slide.is-active .spot-desc,.spot-slide.is-active .spot-actions{animation:spot-rise .65s cubic-bezier(.2,.8,.2,1) both}
.spot-slide.is-active .spot-title{animation-delay:.05s}.spot-slide.is-active .spot-meta{animation-delay:.1s}.spot-slide.is-active .spot-desc{animation-delay:.15s}.spot-slide.is-active .spot-actions{animation-delay:.2s}
.spot-slide.is-active .spot-cover{animation:spot-cover .9s cubic-bezier(.2,.8,.2,1) both}
@keyframes spot-rise{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
@keyframes spot-cover{from{opacity:0;transform:translateX(26px) scale(.94)}to{opacity:1;transform:none}}
.spot-progress{position:absolute;z-index:3;top:16px;left:44px;right:44px;display:flex;gap:6px}
.spot-progress span{flex:1;height:3px;border-radius:3px;background:#ffffff26;overflow:hidden}
.spot-progress i{display:block;height:100%;width:0;border-radius:inherit;background:#fff;transition:width .1s linear}
.spot-progress .done i{width:100%!important}
.spot-progress span:not(.done):not(.now) i{width:0!important;transition:none}

/* Home sections */
.hm-main{min-width:0}
.hm-section{margin-top:40px}
.hm-section .section-head h2{font-size:21px;letter-spacing:-.3px}
.hm-section .section-head a{display:inline-flex;align-items:center;gap:6px;font-weight:600}
.hm-section .section-head a .i{width:15px;height:15px;transition:transform .2s}
.hm-section .section-head a:hover .i{transform:translateX(3px)}
.hm-continue{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:16px;align-items:center;margin-top:18px;padding:14px 16px;border-radius:18px;border:1px solid var(--line);background:linear-gradient(115deg,color-mix(in srgb,var(--glow) 16%,var(--panel)),var(--panel) 70%);transition:border-color .2s,transform .2s}
.hm-continue:hover{border-color:color-mix(in srgb,var(--accent) 45%,var(--line))}
.hm-continue .cover{width:52px;height:74px;padding:4px;border-radius:7px}
.hm-continue .cover .cover-title,.hm-continue .cover .cover-author,.hm-continue .cover .age{display:none}
.hm-continue .cover .sigil{font-size:30px;top:50%;transform:translateY(-50%)}
.hm-continue>div{display:flex;flex-direction:column;gap:4px;min-width:0}
.hm-label{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:700;letter-spacing:1.3px;text-transform:uppercase;color:var(--accent)}
.hm-label .i{width:14px;height:14px}
.hm-continue strong{font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hm-sub{font-size:13px;color:var(--muted)}
.hm-bar{display:block;height:4px;border-radius:4px;background:var(--line);overflow:hidden;margin-top:4px}
.hm-bar i{display:block;height:100%;border-radius:inherit;background:var(--accent)}
.hm-go{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:var(--accent);color:#1d1230}
.hm-go .i{width:20px;height:20px}
.hm-updates{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.hm-update{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:13px;align-items:center;padding:10px 14px 10px 10px;border-radius:14px;background:var(--panel);border:1px solid var(--line);transition:border-color .2s,transform .2s}
.hm-update:hover{border-color:color-mix(in srgb,var(--accent) 40%,var(--line));transform:translateY(-1px)}
.hm-update .cover{width:44px;height:62px;padding:3px;border-radius:7px}
.hm-update .cover .cover-title,.hm-update .cover .cover-author,.hm-update .cover .age{display:none}
.hm-update .cover .sigil{font-size:26px;top:50%;transform:translateY(-50%)}
.hm-update-text{display:flex;flex-direction:column;gap:4px;min-width:0}
.hm-update-text strong{font-size:14px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hm-update-text span{font-size:13px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hm-update-side{display:flex;flex-direction:column;align-items:flex-end;gap:6px}
.hm-update-side time{font-size:12px;color:var(--muted);white-space:nowrap}
.hm-badge{font-size:10px;font-weight:700;letter-spacing:.6px;text-transform:uppercase;padding:3px 7px;border-radius:6px;background:color-mix(in srgb,var(--accent) 16%,transparent);color:var(--accent)}
.hm-badge.new{background:color-mix(in srgb,var(--green) 18%,transparent);color:var(--green)}
.hm-promo{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:18px;align-items:center;margin-top:40px;padding:22px 24px;border-radius:20px;border:1px solid color-mix(in srgb,var(--accent) 28%,var(--line));background:radial-gradient(120% 140% at 0% 0%,color-mix(in srgb,var(--accent) 22%,transparent),transparent 60%),var(--panel)}
.hm-promo-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;background:color-mix(in srgb,var(--accent) 20%,transparent);color:var(--accent)}
.hm-promo-icon .i{width:24px;height:24px;fill:currentColor}
.hm-promo h2{font:500 21px/1.3 var(--serif);margin:0 0 4px}
.hm-promo p{margin:0;color:var(--muted);font-size:14px;line-height:1.6}
.hm-promo .button{min-height:46px;border-radius:12px;font-size:14px;gap:8px;white-space:nowrap}
.hm-promo .button .i{width:16px;height:16px}

/* Reader: bookmark state */
.reader-tools button{display:inline-flex;align-items:center;justify-content:center;gap:7px}
.reader-tools button .i{width:18px;height:18px}
#add-bookmark{transition:color .2s,background .2s,border-color .2s}
#add-bookmark.is-on{color:var(--accent);background:color-mix(in srgb,var(--accent) 15%,var(--panel));border-color:color-mix(in srgb,var(--accent) 55%,var(--line))}
#add-bookmark.is-on .i{fill:currentColor}
#add-bookmark.pop .i{animation:bookmark-pop .5s cubic-bezier(.3,1.7,.5,1)}
@keyframes bookmark-pop{0%{transform:scale(.6) translateY(3px)}55%{transform:scale(1.3)}100%{transform:scale(1)}}
.prose p.is-marked{position:relative}
.prose p.is-marked:before{content:'';position:absolute;left:-12px;top:.3em;width:3px;height:calc(100% - .6em);border-radius:3px;background:var(--accent);box-shadow:0 0 10px color-mix(in srgb,var(--accent) 70%,transparent)}

/* Wide screens already show the read-ahead panel in the side column. */
@media(min-width:901px){.hm-promo{display:none}}
@media(max-width:900px){
  .hm-layout>aside{display:none}
  .hm-updates{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:700px){
  .mobile-nav{background:color-mix(in srgb,var(--panel) 90%,transparent);backdrop-filter:blur(18px) saturate(150%);-webkit-backdrop-filter:blur(18px) saturate(150%);height:calc(70px + env(safe-area-inset-bottom))}
  .mobile-nav a{gap:4px}
  .mobile-nav a>span{font-size:11px}
  .spotlight{border-radius:20px}
  .spot-slide{grid-template-columns:minmax(0,1fr) 104px;grid-template-areas:"kicker cover" "title cover" "meta cover" "desc desc" "actions actions";grid-template-rows:auto auto auto 1fr auto;column-gap:16px;padding:34px 18px 20px;min-height:0}
  .spot-progress{left:18px;right:18px;top:14px}
  .spot-title{font-size:25px;margin:10px 0 10px;-webkit-line-clamp:4}
  .spot-meta span{font-size:11px;padding:4px 9px}
  .spot-desc{font-size:14px;margin-top:14px;-webkit-line-clamp:3}
  .spot-actions{margin-top:18px}
  .spot-actions .button{flex:1;min-height:48px;padding:0 12px}
  .spot-actions .spot-ghost{flex:0 0 auto;padding:0 18px}
  .spot-cover{align-self:start;margin-top:6px}
  .spot-cover .cover{width:104px;height:156px;padding:10px 7px;border-radius:9px}
  .spot-cover .cover .cover-title{font-size:11px}
  .spot-cover .cover .cover-author{font-size:6px}
  .spot-cover .cover .age{display:none}
  .spot-cover .cover .sigil{font-size:40px}
  .hm-section{margin-top:32px}
  .hm-section .section-head h2{font-size:20px}
  .hm-shelf{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:14px;padding-bottom:6px;scrollbar-width:none}
  .hm-shelf::-webkit-scrollbar{display:none}
  .hm-shelf .card{flex:0 0 140px;width:140px;scroll-snap-align:start}
  .hm-continue{padding:12px;gap:12px}
  .hm-go{width:40px;height:40px}
  .hm-promo{grid-template-columns:auto minmax(0,1fr);padding:20px 18px}
  .hm-promo .button{grid-column:1/-1;justify-content:center}
  .reader-tools #add-bookmark .i,.reader-tools #open-settings .i{width:17px;height:17px}
  .reader-tools{flex-wrap:nowrap}
  .reader-tools #add-bookmark,.reader-tools #open-settings{min-width:0;padding:0 10px;white-space:nowrap}
  .prose p.is-marked:before{left:-9px}
}
@media(prefers-reduced-motion:reduce){
  .spot-slide,.spot-slide.is-active{transition:none}
  .spot-slide.is-active *,.mobile-nav a.active .nav-ico,#add-bookmark.pop .i{animation:none!important}
}

/* Card covers: the title scales with the cover's own width. Sizes fixed per breakpoint clipped long words
   ("MANAGEMENT") on the narrow covers of 720-810px windows. */
.card .cover{container-type:inline-size}
.card .cover .cover-title{font-size:clamp(12px,10.5cqi,17px)}
/* Updates and shelf history rows on wider screens: readable type (it was 10-12px) and a line length that keeps the
   date beside the title instead of across a 1200px row. */
@media(min-width:701px){
  #app>.update,.history-entry{max-width:860px}
  .update{gap:18px;padding:16px 0}
  .update .cover{width:52px;height:73px}
  .update h3{font-size:16px;line-height:1.35;margin:0 0 5px}
  .update p{font-size:14px}
  .update time{font-size:13px}
}
/* Desktop type floor. The first stylesheet set much of the interface in 10-12px (phones get larger sizes in
   mobile.css): buttons, Sign in, notes, card meta, the footer, the reader's word count and progress line. */
@media(min-width:701px){
  .button{font-size:14px}
  .account-button{font-size:14px}
  .notice,.account-notice{font-size:13px;line-height:1.7}
  body>footer{font-size:13px}
  .card .meta{font-size:12px}
  .section-head a,.section-head small{font-size:13px}
  .filter{font-size:13px}
  .aside-subtitle{font-size:13px}
  .pick small{font-size:12px}
  .mini-stats span{font-size:12px}
  .reader .chapter-sub{font-size:13px}
  .progress-text{font-size:12px}
  .library-toolbar,.library-toolbar select{font-size:13px}
  .empty{font-size:14px}
  .chapter-status{font-size:12px}
}
/* Narrow desktop header (701-860px): the row was ~60px wider than the window, so Sign in ran off the right edge and
   the theme button was squeezed. Tighter gaps, and My shelf shows its heart only (the label stays for screen readers). */
@media(min-width:701px) and (max-width:860px){
  body>header{gap:14px}
  body>header:has(#nc-chip){gap:8px;padding-left:20px;padding-right:20px}
  body>header>*{flex-shrink:0}
  .saved-link span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
}
/* Page panels stacked on one page (About) get a gap, and their first/last child's margin does not add to the
   panel padding. The Continue reading heading on My shelf lines up with its 860px rows. */
#app>section.panel+section.panel{margin-top:16px}
#app>section.panel>:first-child{margin-top:0}
#app>section.panel>:last-child{margin-bottom:0}
@media(min-width:701px){#app>.section:has(>.history-entry)>.section-head{max-width:860px}}
/* Phones under 360px (320 with Display Zoom): the spotlight title column is ~125px, so a long word ("Management")
   was cut off under the cover, and the reader's Settings and Bookmark labels overflowed their buttons. */
@media(max-width:359px){
  .spot-title{font-size:20px;overflow-wrap:break-word}
  .reader-tools #open-settings .i,.reader-tools #add-bookmark .i{display:none}
}
/* Uploaded cover art (novel editor): the picture fills the cover, without the drawn frame and glow. */
.cover.has-art{background:#15161c}
.cover.has-art:before,.cover.has-art:after{display:none}
.cover.has-art>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-1}
/* Novel cards (home shelves, library, sliders) are book-shaped, 2:3 like the covers uploaded in the novel editor, at
   any card width. Fixed heights from older sheets made wide desktop cards square and cut off the picture. */
a.card>.cover{height:auto;aspect-ratio:2/3}

/* Theme pages (themes.js), their links, and the home Browse by theme row. */
.theme-count{color:var(--muted);font-size:14px;margin:0 0 14px}
.theme-about{margin-top:32px;max-width:760px}
.theme-about h2{margin:30px 0 10px}
.theme-about h2:first-child{margin-top:0}
.theme-about p{line-height:1.7}
.theme-faq{margin-top:18px}
.theme-faq h3{font-size:16px;margin:22px 0 6px}
.theme-faq h3+p{margin-top:0}
.theme-about a,.theme-terms a{color:var(--accent)}
.theme-terms{display:grid;gap:12px;margin:18px 0}
.theme-terms div{display:grid;grid-template-columns:minmax(120px,170px) 1fr;gap:12px;align-items:baseline}
.theme-terms dt{font-weight:700}
.theme-terms dd{margin:0;color:var(--muted)}
.theme-links{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:22px 0 8px}
.theme-links>span{color:var(--muted);font-size:13px;margin-right:4px}
.theme-links a,.nv-tags a{border:1px solid var(--line);border-radius:999px;padding:6px 13px;font-size:13px;color:var(--text);text-decoration:none}
.theme-links a:hover,.nv-tags a:hover{border-color:var(--accent);color:var(--accent)}
.hm-themes{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:12px}
.hm-theme{display:grid;gap:4px;padding:16px 18px;border:1px solid var(--line);border-radius:14px;background:var(--panel);color:var(--text);text-decoration:none;transition:border-color .15s}
.hm-theme:hover{border-color:var(--accent)}
.hm-theme strong{font-size:17px}
.hm-theme span{color:var(--muted);font-size:13.5px}
.hm-theme small{color:var(--accent);font-size:12.5px;margin-top:4px}
.footer-themes{display:flex;flex-wrap:wrap;gap:4px 14px}
.footer-themes a{color:var(--muted);text-decoration:none}
.footer-themes a:hover{color:var(--text)}
@media (max-width:640px){.theme-terms div{grid-template-columns:1fr;gap:2px}.hm-themes{grid-template-columns:1fr 1fr}}
