/* My notes as files and folders (assets/nbhome.js, 2026-10-26): notebook covers, note cards, a notebook's page, the
   New notebook box, shared copies. Colours are tokens; a cover's own colour is --c. */

/* a notebook cover: the colour, a darker spine, and its pattern */
.nbh-nb { position: relative; --c: #2F6FEB; --nbh-subject-y: 50%; background-color: var(--c); color: #fff; border-radius: 8px 20px 20px 8px; }
.nbh-nb::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 12px; border-radius: 8px 0 0 8px; background: rgba(0, 0, 0, .2); pointer-events: none; }
.nbh-nb[data-cover="stripes"] { background-image: repeating-linear-gradient(135deg, transparent 0 9px, rgba(255, 255, 255, .14) 9px 13px); }
.nbh-nb[data-cover="dots"] { background-image: radial-gradient(circle at 6px 6px, rgba(255, 255, 255, .28) 1.6px, transparent 2px); background-size: 12px 12px; background-position: center; }
.nbh-nb[data-cover="band"] { --nbh-subject-y: 70%; background-image: linear-gradient(to bottom, transparent 63%, rgba(255, 255, 255, .22) 63% 77%, transparent 77%); }

.nbh-sec { margin-top: 26px; }
.nbh-sec h2 { margin: 0 0 12px; font-size: 15px; font-weight: 700; color: var(--muted); }
.nbh-sec h2 small { margin-left: 4px; font-weight: 600; color: var(--faint); }
.nbh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.nbh-empty { margin: 10px 2px 0; color: var(--muted); font-size: 14px; }
.nbh-empty a { color: var(--orange); font-weight: 700; }

/* notebook cards */
.nbh-grid .nbh-nb { height: 210px; box-shadow: 0 16px 28px -20px rgba(0, 0, 0, .55); transition: transform .25s cubic-bezier(0.32, 0.72, 0, 1), box-shadow .25s; }
.nbh-grid .nbh-nb:hover { transform: translateY(-3px); }
.nbh-grid .nbh-nb.is-over { transform: scale(1.04); box-shadow: 0 0 0 3px var(--card), 0 0 0 6px var(--orange), 0 22px 40px -20px rgba(0, 0, 0, .6); }
.nbh-nb__a { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 18px 16px 16px 28px; color: inherit; text-decoration: none; }
.nbh-nb__a b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; flex-shrink: 0; font-size: 19px; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; overflow-wrap: anywhere; }
/* The cover colour clears a rounded gap in any pattern. Its centre never follows the title. */
.nbh-auto { position: absolute; left: 50%; top: var(--nbh-subject-y); transform: translate(-50%, -50%); max-width: calc(100% - 36px); margin: 0; padding: 6px 14px; border-radius: 99px; background: var(--c); font-size: 13px; font-weight: 800; line-height: 1.2; letter-spacing: .01em; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-sizing: border-box; }
/* A three-row gap ends between dot rows in both card sizes, keeping whole dots above and below. */
.nbh-nb[data-cover="dots"] .nbh-auto { line-height: 24px; }
.nbh-nb__a small { margin-top: auto; padding-left: 30px; font-size: 13px; font-weight: 700; opacity: .9; }

/* note cards: a picture of page 1 */
.nbh-file { position: relative; display: flex; flex-direction: column; border-radius: 18px; background: var(--card); box-shadow: 0 1px 0 var(--line); overflow: hidden; cursor: grab; touch-action: pan-y; -webkit-user-select: none; user-select: none; transition: transform .2s, opacity .2s; }
.nbh-file:hover { transform: translateY(-2px); }
.nbh-file.is-dragging { opacity: .35; }
.nbh-file__a { display: flex; flex-direction: column; flex: 1; color: inherit; text-decoration: none; }
.nbh-file__pic { display: block; height: 128px; overflow: hidden; background: #fff; border-bottom: 1px solid var(--line); }
.nbh-file__t { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 46px; }
.nbh-file__t b { font-size: 14.5px; line-height: 1.25; }
.nbh-file__t small { font-size: 12.5px; color: var(--muted); }
.nbh-ghost { position: fixed; left: 0; top: 0; z-index: 400; pointer-events: none; box-shadow: 0 26px 50px -20px rgba(0, 0, 0, .55); opacity: .95; }
body.nbh-dragging, body.nbh-dragging * { cursor: grabbing !important; }

/* the delete × is always in the bottom left corner (owner, 2026-10-26) */
.nbh-x { position: absolute; left: 12px; bottom: 12px; z-index: 2; width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(var(--fg-rgb), .07); color: var(--muted); cursor: pointer; transition: background-color .2s, color .2s; }
.nbh-x svg { width: 15px; height: 15px; }
.nbh-x:hover { background: #E5484D; color: #fff; }
.nbh-nb .nbh-x { background: rgba(0, 0, 0, .18); color: #fff; }
.nbh-from { position: absolute; right: 12px; top: 12px; z-index: 2; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 2.5px #fff, 0 4px 10px -4px rgba(0, 0, 0, .4); display: grid; place-items: center; background: #8E4EC6; color: #fff; font-size: 13px; }
.nbh-file .nbh-from { top: 10px; }

/* the "new" cards */
.nbh-new { min-height: 210px; display: grid; place-items: center; align-content: center; gap: 8px; border: 2px dashed rgba(var(--fg-rgb), .18); border-radius: 20px; background: none; color: var(--muted); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: border-color .2s, color .2s; }
.nbh-new svg { width: 24px; height: 24px; }
.nbh-new:hover { border-color: var(--orange); color: var(--orange); }

/* inside a notebook */
.nbh-back { margin: 6px 0 14px; }
.nbh-back a { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 99px; background: var(--card); color: var(--paper); font-size: 14px; font-weight: 700; text-decoration: none; box-shadow: 0 1px 0 var(--line); }
.nbh-back svg { width: 16px; height: 16px; }
.nbh-head { display: flex; align-items: center; gap: 20px; padding: 22px 24px; border-radius: 26px; background: var(--card); box-shadow: 0 1px 0 var(--line); }
.nbh-head__cover { flex: none; width: 78px; height: 104px; box-shadow: 0 12px 22px -16px rgba(0, 0, 0, .5); }
.nbh-head__t { flex: 1; min-width: 0; }
.nbh-eye { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.nbh-head h1 { margin: 4px 0 4px; font-size: 30px; letter-spacing: -.02em; line-height: 1.1; overflow-wrap: anywhere; }
.nbh-head p { margin: 0; color: var(--muted); font-size: 14px; }
.nbh-head__b { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.nbh-head__b .btn { display: inline-flex; align-items: center; gap: 7px; }
.nbh-head__b svg { width: 16px; height: 16px; }
.nbh-order { margin: 18px 4px 6px; font-size: 13.5px; color: var(--muted); }
.nbh-order button { border: 0; background: none; padding: 0; color: var(--orange); font: inherit; font-weight: 700; cursor: pointer; }
.nbh-topic { margin: 18px 6px 8px; font-size: 11.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.nbh-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; padding: 10px 12px 10px 6px; border-radius: 18px; background: var(--card); box-shadow: 0 1px 0 var(--line); }
.nbh-row.is-moving { box-shadow: 0 0 0 2px var(--orange), 0 16px 30px -18px rgba(0, 0, 0, .5); position: relative; z-index: 2; }
.nbh-grip { flex: none; width: 30px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px; background: none; color: var(--faint); cursor: grab; touch-action: none; }
.nbh-grip:hover { background: rgba(var(--fg-rgb), .05); color: var(--paper); }
.nbh-grip svg { width: 16px; height: 16px; }
.nbh-row__a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; }
.nbh-row__pic { flex: none; width: 48px; height: 64px; border-radius: 4px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.nbh-row__t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nbh-row__t b { font-size: 15px; }
.nbh-row__t small { font-size: 12.5px; color: var(--muted); }
.nbh-ib { flex: none; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; }
.nbh-ib:hover { background: rgba(var(--fg-rgb), .06); color: var(--paper); }
.nbh-ib[data-ndel]:hover { color: #E5484D; }
.nbh-ib svg { width: 17px; height: 17px; }
.nbh-add { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; height: 46px; padding: 0 18px; border: 2px dashed rgba(var(--fg-rgb), .18); border-radius: 16px; background: none; color: var(--muted); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.nbh-add:hover { border-color: var(--orange); color: var(--orange); }
.nbh-add svg { width: 17px; height: 17px; }
@media (max-width: 720px) { .nbh-head { flex-wrap: wrap; } .nbh-head__b { width: 100%; justify-content: flex-start; } }

/* the New notebook / Edit box: a live cover on the left, the choices on the right */
.nbh-dlg { position: fixed; inset: 0; z-index: 320; display: grid; place-items: center; padding: 16px; background: rgba(10, 12, 20, .42); opacity: 0; transition: opacity .2s; }
.nbh-dlg.is-in { opacity: 1; } .nbh-dlg.is-out { opacity: 0; }
.nbh-dlg__card { display: grid; grid-template-columns: 200px minmax(0, 1fr); width: min(680px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: 26px; background: var(--card); color: var(--paper); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .55); transform: translateY(10px) scale(.98); transition: transform .3s cubic-bezier(0.32, 0.72, 0, 1); }
.nbh-dlg.is-in .nbh-dlg__card { transform: none; }
.nbh-dlg__prev { display: grid; place-items: center; padding: 28px 22px; background: rgba(var(--fg-rgb), .04); border-radius: 26px 0 0 26px; }
.nbh-dlg__cover { width: 140px; height: 186px; display: flex; flex-direction: column; padding: 18px 12px 14px 24px; box-shadow: 0 22px 34px -22px rgba(0, 0, 0, .6); transition: background-color .25s; }
.nbh-dlg__cover b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: 17px; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.nbh-dlg__cover .nbh-auto { max-width: calc(100% - 22px); padding: 6px 10px; font-size: 11px; }
.nbh-auto[hidden] { display: none; }
.nbh-dlg__form { display: flex; flex-direction: column; padding: 26px 28px 22px; min-width: 0; }
.nbh-dlg__form h2 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.01em; }
.nbh-lab { display: block; margin: 16px 0 8px; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.nbh-in { width: 100%; height: 46px; padding: 0 14px; border: 0; border-radius: 14px; background: rgba(var(--fg-rgb), .06); color: var(--paper); font: inherit; font-size: 16px; font-weight: 700; }
.nbh-in:focus { outline: none; box-shadow: inset 0 0 0 2px var(--orange); }
.nbh-sw { display: grid; grid-template-columns: repeat(10, 1fr); gap: 8px; }
.nbh-sw button { aspect-ratio: 1; max-width: 32px; padding: 0; border: 0; border-radius: 50%; background: var(--c); cursor: pointer; transition: transform .15s; }
.nbh-sw button:hover { transform: scale(1.1); }
.nbh-sw button[aria-checked="true"] { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--paper); }
.nbh-cv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.nbh-cv button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px 6px; border: 0; border-radius: 14px; background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.nbh-cv button:hover { background: rgba(var(--fg-rgb), .04); }
.nbh-cv button[aria-checked="true"] { background: rgba(var(--fg-rgb), .07); color: var(--paper); }
.nbh-cv .nbh-nb { width: 34px; height: 44px; border-radius: 3px 8px 8px 3px; }
.nbh-cv .nbh-nb::before { width: 5px; border-radius: 3px 0 0 3px; }
.nbh-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.nbh-chips button { height: 34px; padding: 0 14px; border: 0; border-radius: 99px; background: rgba(var(--fg-rgb), .06); color: var(--paper); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.nbh-chips button.is-on { background: var(--ink, #0E0E10); color: #fff; }
html[data-theme="dark"] .nbh-chips button.is-on { background: var(--orange); color: var(--on-accent, #fff); }
.nbh-chk { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.nbh-chk[hidden] { display: none; }
.nbh-chk input { width: 17px; height: 17px; accent-color: var(--orange); }
.nbh-dlg__acts { display: flex; align-items: center; gap: 8px; margin-top: 26px; }
.nbh-dlg__acts > span { flex: 1; }
.nbh-del { border: 0; background: none; padding: 0; color: #E5484D; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
@media (max-width: 600px) { .nbh-dlg__card { grid-template-columns: 1fr; } .nbh-dlg__prev { border-radius: 26px 26px 0 0; padding: 18px; } .nbh-dlg__cover { width: 104px; height: 138px; padding: 14px 10px 12px 20px; } .nbh-dlg__cover b { font-size: 14px; -webkit-line-clamp: 2; } .nbh-sw { grid-template-columns: repeat(5, 1fr); } }

/* One notebook deletion choice, shared by the cover and the Edit box. */
.nbh-delete .ai-ask__card { max-height: calc(100dvh - 40px); overflow-y: auto; }
.nbh-delete h2 { overflow-wrap: anywhere; }
.nbh-delete__check { display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; font-size: 14px; font-weight: 600; line-height: 1.4; cursor: pointer; }
.nbh-delete__check input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--orange); }
.nbh-delete__check small { display: block; margin-top: 4px; color: var(--muted); font-size: 12.5px; font-weight: 500; }

/* a shared copy: its row, and reading it */
.nbh-shared { display: flex !important; align-items: center; gap: 12px; }
.nbh-shared__pic { flex: none; width: 40px; height: 52px; border-radius: 3px 9px 9px 3px; }
.nbh-shared__pic::before { width: 6px; }
.nbh-shared__t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nbh-shared .btn { flex: none; }
.nbh-read__card { display: flex; flex-direction: column; width: min(860px, 100%); height: calc(100vh - 32px); grid-template-columns: none; }
.nbh-read__h { display: flex; align-items: center; gap: 10px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.nbh-read__h > div { flex: 1; min-width: 0; } .nbh-read__h h2 { margin: 2px 0 0; font-size: 20px; }
.nbh-read__body { flex: 1; overflow: auto; padding: 18px 20px 30px; background: rgba(var(--fg-rgb), .04); }
.nbh-read__body--page { margin-top: 16px; border-radius: 22px; }
.nbh-read__body section + section { margin-top: 26px; }
.nbh-read__body h3 { margin: 0 0 10px; font-size: 15px; color: var(--muted); }
.nb-read__pg { position: relative; width: min(100%, 720px); margin: 0 auto 14px; border-radius: 4px; overflow: hidden; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 12px 30px -18px rgba(0, 0, 0, .35); container-type: inline-size; }
.nb-read__pg > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.nb-read__ln { position: absolute; white-space: pre-wrap; overflow-wrap: anywhere; font-family: Satoshi, system-ui, sans-serif; font-weight: 500; }
.nb-read__q { padding: .06em .18em; border-radius: .2em; color: #15161A; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.nb-read__fig { position: absolute; overflow: hidden; border-radius: 6px; background: #fff; }
.nb-read__fig .ink-fig__in { transform-origin: 0 0; }
