/* PDF Notes — library and editor on top of /kit/kit.css */
.pn { max-width: 1280px; }
.pn-ic { display: inline-flex; }
.pn-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 22px 0 14px; }
.pn-head .grow { min-width: 220px; }
.pn-head h1 { margin: 0 0 4px; font-size: clamp(24px, 4vw, 32px); letter-spacing: -.02em; }
.pn-head p { margin: 0; max-width: 620px; }
.pn-drop { margin-bottom: 18px; padding: 26px 18px; }
.pn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.pn-book { display: grid; gap: 6px; }
.pn-cover { position: relative; aspect-ratio: 3 / 4; border-radius: 6px 14px 14px 6px; background: linear-gradient(90deg, rgba(0,0,0,.18) 0 10px, transparent 10px), var(--c); color: #fff; text-align: start; padding: 18px 14px 14px 22px; display: flex; flex-direction: column; justify-content: flex-end; box-shadow: var(--shadow); transition: transform 160ms var(--ease); }
.pn-cover:hover { transform: translateY(-3px); }
.pn-cover b { font-size: 17px; line-height: 1.2; overflow-wrap: anywhere; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.pn-kind { position: absolute; top: 12px; right: 12px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; background: rgba(255,255,255,.22); padding: 2px 8px; border-radius: 99px; }
.pn-meta { gap: 2px; }
.pn-del:hover:not(:disabled) { color: var(--danger); }
/* editor */
.pn-top { display: flex; align-items: center; gap: 10px; padding: 14px 0 8px; }
.pn-title { flex: 1; min-width: 0; font: 700 clamp(18px, 3vw, 24px)/1.2 var(--font); background: transparent; border: 0; border-bottom: 1px dashed transparent; padding: 2px 0; color: var(--text); }
.pn-title:hover, .pn-title:focus { border-bottom-color: var(--line-strong); }
.pn-bar { position: sticky; top: 56px; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px; margin-bottom: 12px; border-radius: 14px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); box-shadow: var(--shadow); }
.pn-tools button { padding: 6px 10px; }
.pn-swatches { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; min-height: 28px; }
.pn-sw { width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; box-shadow: 0 0 0 1px var(--line-strong) inset; }
.pn-sw[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--surface) inset; }
.pn-size { display: flex; align-items: center; gap: 6px; width: 130px; }
.pn-pages { display: grid; justify-items: center; gap: 44px; padding-bottom: 40px; overflow-x: auto; }
.pn-page { position: relative; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 8px 24px -10px rgba(0,0,0,.25); flex: none; }
.pn-page canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pn-ink { touch-action: none; cursor: crosshair; mix-blend-mode: multiply; }
.pn-pages[data-tool="eraser"] .pn-ink { cursor: cell; }
.pn-pages.pen-only .pn-ink { touch-action: pan-x pan-y pinch-zoom; }
.pn-pagebar { position: absolute; right: 6px; bottom: -30px; display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-3); }
@media (max-width: 560px) { .pn-bar { top: 52px; } .pn-size { width: 100px; } }
/* full: menu, help, page navigator, page bar extras */
.pn-menu { position: relative; }
.pn-menu summary { list-style: none; cursor: pointer; }
.pn-menu summary::-webkit-details-marker { display: none; }
.pn-menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 260px; padding: 6px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-pop); display: grid; }
.pn-menu-list button { text-align: start; padding: 8px 10px; border-radius: 8px; font-size: 13.5px; color: var(--text); }
.pn-menu-list button:hover, .pn-menu-list button:focus-visible { background: var(--surface-2); }
.pn-menu-list button[aria-checked="true"]::before { content: "✓ "; color: var(--accent); font-weight: 700; }
.pn-menu-list hr { border: 0; border-top: 1px solid var(--line); margin: 4px 2px; }
.pn-keys { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 14px 0; align-items: baseline; }
.pn-keys dt { white-space: nowrap; }
.pn-keys dd { margin: 0; }
.pn-keys kbd { font: 600 12px/1 var(--mono, monospace); padding: 3px 6px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--surface-2); }
.pn-tips { margin: 0; padding-inline-start: 18px; display: grid; gap: 6px; color: var(--text-2); font-size: 14px; }
.pn-navsheet { max-width: 760px; }
.pn-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; margin-top: 12px; max-height: 70vh; overflow: auto; padding: 4px; }
.pn-thumb { display: grid; gap: 4px; justify-items: center; font-size: 12px; color: var(--text-2); padding: 4px; border-radius: 10px; }
.pn-thumb:hover, .pn-thumb:focus-visible { background: var(--surface-2); }
.pn-thumb.on { box-shadow: 0 0 0 2px var(--accent) inset; }
.pn-thumb-img { display: block; width: 100%; max-width: 110px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.18); overflow: hidden; }
.pn-thumb-img canvas { display: block; width: 100%; height: 100%; }
.pn-paper { font-size: 12px; padding: 2px 4px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); }
