/* Koma: a person's own things (2026-10-13; owner: "Do all of them and improve upon this if you can and add them in a way
   the ux is good"). Choosing chapters, bookmarks, volumes, score + note + collections, related titles and official
   links, Upcoming, notifications, tracking, import. Same grammar as app.css: graphite panels, pills, no borders for
   separation, and no coloured left-edge bars anywhere (owner design rule). */
.small { font-size: .82rem; }
.ic.flip { transform: rotate(180deg); }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chipsep { width: 1px; flex: none; background: var(--hair); margin: 4px 2px; }
.chip { display: inline-flex; align-items: center; gap: 6px; }
.chip .ic { width: 1em; height: 1em; }

/* the series header: your score */
.stats .mine-score { color: #ff6b8b; }

/* chapter rows: long-press safe, bookmarks, choosing */
.chrow { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.chrow .bmchip { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-ink); font-size: .74rem; font-weight: 650; }
.chrow .bmchip .ic { width: 12px; height: 12px; }
.chrow.selecting .state { color: var(--fg-faint); }
.chrow.picked { background: var(--accent-soft); }
.chrow.picked .state { color: var(--accent-ink); }
.selbar { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: calc(14px + var(--bot)); width: min(720px, calc(100% - 20px)); padding: 10px 12px 12px;
  border-radius: 22px; background: rgba(28,28,32,.86); -webkit-backdrop-filter: blur(26px) saturate(1.4); backdrop-filter: blur(26px) saturate(1.4);
  box-shadow: 0 18px 50px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.07); animation: selin .28s var(--ease); }
@keyframes selin { from { transform: translate(-50%, 24px); opacity: 0; } }
.selhead { display: flex; align-items: center; gap: 12px; padding: 2px 4px 8px; }
.selhead b { margin-right: auto; font-size: .95rem; }
.selhead .linkbtn { margin: 0; }
.selacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(74px, 1fr)); gap: 4px; }
.selacts button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border-radius: 14px; font-size: .74rem; font-weight: 600; color: var(--fg-dim); }
.selacts button .ic { width: 22px; height: 22px; color: var(--fg); }
.selacts button:hover:not(:disabled) { background: var(--fill); }
.selacts button:disabled { opacity: .35; cursor: default; }
@media (max-width: 760px) { .selbar { bottom: calc(76px + var(--bot)); } }

/* by volume */
#volseg:empty { display: none; }
.chgroup.byvol > summary { gap: 14px; padding: 10px 18px; }
.chgroup .volcov { width: 38px; aspect-ratio: 2/3; object-fit: cover; border-radius: 5px; background: var(--bg-2); flex: none; box-shadow: 0 4px 12px rgba(0,0,0,.4); }
.chgroup .volcov.none { display: grid; place-items: center; color: var(--fg-faint); }
.chgroup .volt { display: flex; flex-direction: column; line-height: 1.25; }
.chgroup .volt small { color: var(--fg-mute); font-weight: 500; font-size: .8rem; }

/* About: your own things first */
.mine-box { background: var(--bg-1); border-radius: var(--r-panel); padding: 4px 18px; max-width: 720px; margin-bottom: 14px; }
.mine-box .opt.col { flex-direction: column; align-items: stretch; }
.mine-box textarea, .stack-form textarea, .stack-form input, .newcol input, .colrow input { width: 100%; font: inherit; color: var(--fg); background: var(--bg-2); border: 0; border-radius: 12px; padding: 11px 13px; resize: vertical; }
.mine-box textarea:focus, .stack-form textarea:focus, .stack-form input:focus, .newcol input:focus, .colrow input:focus { outline: 2px solid var(--accent-soft); }
.scorepick { display: flex; align-items: center; gap: 10px; }
.starpick { position: relative; display: inline-block; cursor: pointer; }
.starpick input { position: absolute; inset: -6px 0; width: 100%; height: calc(100% + 12px); opacity: 0; cursor: pointer; margin: 0; }
.stars { position: relative; display: inline-block; line-height: 0; }
.stars .ic { width: 26px; height: 26px; margin-right: 2px; }
.stars .s-bg { color: var(--fg-faint); }
.stars .s-fg { position: absolute; inset: 0 auto 0 0; width: var(--pct, 0%); overflow: hidden; white-space: nowrap; color: #ffcc4d; }
.stars .s-fg .ic { fill: currentColor; }
.about-h { font-size: 1.05rem; font-weight: 700; margin: 26px 0 12px; display: flex; align-items: baseline; gap: 8px; }
.about-h .mute { font-weight: 500; font-size: .86rem; }
.panel .shelf { margin: 0 calc(-1 * var(--gut)); }
.rel-plain { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--fg-dim); font-size: .9rem; margin: 10px 0 0; }
.rel-plain b { color: var(--fg-mute); font-weight: 600; margin-right: 4px; }
.chip.link { background: var(--bg-2); color: var(--fg); }
.chip.link:hover { background: var(--bg-3); }
.chip .lang { font-size: .72rem; color: var(--fg-mute); font-weight: 600; margin-left: 2px; }
.vols { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 14px 12px; max-width: 980px; }
.vol { display: flex; flex-direction: column; gap: 5px; text-align: left; }
.vol img { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 8px; background: var(--bg-2); box-shadow: 0 8px 22px rgba(0,0,0,.45); transition: transform var(--fast); }
.vol:hover img { transform: translateY(-3px); }
.vol b { font-size: .84rem; } .vol small { color: var(--fg-mute); font-size: .74rem; margin-top: -4px; }
.volview { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 18px; align-items: start; }
.volview img { width: 100%; border-radius: 12px; box-shadow: 0 18px 44px rgba(0,0,0,.55); background: var(--bg-2); aspect-ratio: 2/3; object-fit: cover; }
.volview .rbtns { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
@media (max-width: 520px) { .volview { grid-template-columns: 1fr; } .volview img { max-width: 240px; margin: 0 auto; } }

/* collections: picker + manager */
.newcol { display: flex; gap: 8px; align-items: center; padding: 4px 6px; }
.newcol .btn { flex: none; }
.colrows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.colrow { display: flex; align-items: center; gap: 8px; }
.colrow > .ic { color: var(--fg-mute); }
.colrow input { padding: 9px 12px; }
.colrow .iconbtn:disabled { opacity: .3; }

/* Updates: tabs, the notifications nudge */
.page > .filters + .feed, .page > .filters + #pushnudge + .feed { margin-top: 0; }
.nudge { display: flex; align-items: center; gap: 12px; margin: 0 var(--gut) 14px; padding: 12px 16px; border-radius: var(--r-panel); background: var(--accent-soft); color: var(--fg); }
.nudge .ic { color: var(--accent-ink); width: 22px; height: 22px; }
.nudge span { flex: 1; font-weight: 600; font-size: .92rem; }

/* settings: connect / setup / import */
.stack-form { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.stack-form .btn { align-self: flex-start; }
.steps { margin: 6px 0 14px; padding-left: 20px; color: var(--fg-dim); line-height: 1.7; }
.steps a:not(.btn) { color: var(--accent-ink); }
.steps code, .lead code { background: var(--bg-2); border-radius: 6px; padding: 2px 6px; font-size: .84rem; word-break: break-all; }
.filebtn { cursor: pointer; }
.impstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 4px 0 10px; }
.impstats div { background: var(--bg-2); border-radius: 14px; padding: 12px 10px; text-align: center; }
.impstats b { display: block; font-size: 1.25rem; font-weight: 750; }
.impstats span { color: var(--fg-mute); font-size: .76rem; }
@media (max-width: 460px) { .impstats { grid-template-columns: repeat(2, 1fr); } }
.impsample { margin: 10px 0 16px; color: var(--fg-dim); font-size: .88rem; }
.impsample summary { cursor: pointer; color: var(--fg-mute); margin-bottom: 6px; }
.impsample div { padding: 3px 0; }
.sheet .rbtns { display: flex; gap: 10px; flex-wrap: wrap; }
#importbox:empty { display: none; }
.impgo, .impdone { display: flex; flex-direction: column; gap: 6px; padding: 14px 0; }
.impdone { flex-direction: row; gap: 12px; align-items: flex-start; }
.impdone > .ic { color: var(--ok); width: 22px; height: 22px; margin-top: 2px; }
.impgo small, .impdone small { color: var(--fg-mute); display: block; margin-top: 3px; }
.impgo .bar { display: block; height: 4px; border-radius: 3px; background: var(--bg-3); overflow: hidden; }
.impgo .bar b { display: block; height: 100%; background: var(--accent-ink); transition: width .6s var(--ease); }

/* incognito: a pill in the top bar */
.incog-pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--r-pill); background: rgba(255,255,255,.1); color: var(--fg-dim); font-size: .8rem; font-weight: 650; }
.incog-pill .ic { width: 16px; height: 16px; }
@media (max-width: 520px) { .incog-pill span { display: none; } .incog-pill { padding: 0 9px; } }

/* home: Surprise me, beside the genres */
.genre.surprise { --c: #26262c; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 2px; text-align: left; color: var(--fg);
  background: radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 60%), #1c1c21; }
.genre.surprise .ic { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; opacity: .85; }
.genre.surprise b { font-size: 1.05rem; } .genre.surprise span { font-size: .8rem; font-weight: 550; color: var(--fg-dim); text-shadow: none; }

/* phones: the filter pills never break a label (they scroll instead), the choosing bar is one row */
.seg button { white-space: nowrap; }
@media (max-width: 760px) {
  .chtools > .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .chtools > .seg::-webkit-scrollbar { display: none; }
  .selacts { grid-template-columns: repeat(6, 1fr); gap: 2px; }
  .selacts button { font-size: .66rem; padding: 6px 1px; gap: 3px; }
  .selacts button .ic { width: 20px; height: 20px; }
  .selhead { padding-bottom: 4px; }
}

/* 18+ (2026-10-14): a small 18+ badge on adult covers; with "Blur 18+ covers" on (body.blur18) covers, Up next pages and
   the series page's art stay blurred (hover shows a card on a desktop; Show on the series page) */
.cover .a18, .a18.big { position: absolute; right: 7px; bottom: 7px; padding: 2px 7px; border-radius: 6px; background: #ff375f; color: #fff; font-size: .7rem; font-weight: 800; letter-spacing: .02em; }
.a18.big { position: static; display: inline-block; font-size: 1rem; padding: 4px 12px; margin: 0 auto 12px; border-radius: 10px; }
.gate18 .a18.big { display: block; width: max-content; }
.card.nsfw .cover, .upnext.nsfw .un-page, .upnext.nsfw .un-art, .feed-item.nsfw .thumb { overflow: hidden; }
body.blur18 .card.nsfw .cover img, body.blur18 .upnext.nsfw .un-page img, body.blur18 .upnext.nsfw .un-art, body.blur18 .feed-item.nsfw .thumb, body.blur18 .spine.nsfw .cap { filter: blur(16px) saturate(.7); transform: scale(1.12); transition: filter .25s; }
@media (hover: hover) { body.blur18 .card.nsfw:hover .cover img { filter: none; transform: none; } }
body.blur18 .dh.nsfw:not(.revealed) .dh-poster img, body.blur18 .dh.nsfw:not(.revealed) .dh-art { filter: blur(24px) saturate(.7); }
.dh-poster { position: relative; }
.dh .reveal18 { display: none; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); align-items: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 980px;
  background: rgba(0,0,0,.55); color: #fff; font-weight: 650; font-size: .86rem; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
body.blur18 .dh.nsfw .reveal18 { display: inline-flex; }
.empty .btn .ic { width: 1.15em; height: 1.15em; margin: 0; color: inherit; }   /* icons in buttons on an empty / gate page stay button-sized */

/* series page on a phone (2026-10-14, owner's sketch): the cover small on the left with the title and details beside it,
   the buttons straight under, then the notes, then the tags. Desktop keeps cover-left / words-right as before. */
@media (max-width: 760px) {
  .dh { text-align: left; padding-top: calc(60px + var(--top)); }
  .dh-grid { grid-template-columns: clamp(104px, 30vw, 132px) minmax(0, 1fr); justify-items: stretch; align-items: center; column-gap: 16px; row-gap: 0; }
  .dh-grid > .dh-info { display: contents; }
  .dh-poster { width: auto; border-radius: 10px; box-shadow: 0 16px 40px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08); }
  .dh-head { min-width: 0; }
  .dh-rest { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: stretch; }
  .dh-rest .tags { order: 9; }
  .dh h1 { font-size: clamp(1.3rem, 5.6vw, 1.75rem); line-height: 1.12; letter-spacing: -.02em; }
  .dh-native { font-size: .82rem; margin-bottom: 4px; }
  .dh-alt { font-size: .9rem; margin-top: 4px; }
  .dh-by { font-size: .84rem; margin-top: 6px; }
  .dh .stats { gap: 4px 12px; margin-top: 8px; font-size: .84rem; justify-content: flex-start; }
  .dh .statusline { margin-top: 8px; font-size: .74rem; justify-content: flex-start; }
  .dh .dh-actions { margin-top: 18px; justify-content: flex-start; }
  .dh .tags { justify-content: flex-start; }
  .dh .dlnote { margin-left: 0; margin-right: 0; }
}
/* the series page's buttons on a phone: one row; the main button takes the room left and ends in … if it must; Jellyfin round */
@media (max-width: 760px) {
  .dh .series-acts { flex-wrap: nowrap; }
  .dh .series-acts > * { flex: none; }
  .dh .series-acts #primary { flex: 1 1 auto; min-width: 0; display: flex; }
  .dh .series-acts #primary .btn { flex: 1 1 auto; min-width: 0; padding: 0 18px; }
  .dh .series-acts .jf { width: 46px; padding: 0; }
  .pb-l { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 420px) { .dh .series-acts .pb-pg { display: none; } }
@media (max-width: 400px) {
  .dh .series-acts { gap: 8px; }
  .dh .series-acts .btn-round, .dh .series-acts .jf { width: 44px; height: 44px; }
  .dh .series-acts #primary .btn { height: 44px; padding: 0 14px; gap: 7px; font-size: .92rem; }
}
