/* Pero — iPadOS slog (SF, materiali, sistemske barve) */
:root {
  --tint: #007aff; --red: #ff3b30; --green: #34c759; --orange: #ff9500;
  --bg: #ffffff; --bg2: #f2f2f7; --bg3: #ffffff; --grouped: #f2f2f7; --cell: #ffffff;
  --label: #000000; --label2: rgba(60, 60, 67, .6); --label3: rgba(60, 60, 67, .3);
  --sep: rgba(60, 60, 67, .22); --fill: rgba(120, 120, 128, .12); --fill2: rgba(120, 120, 128, .2);
  --bar: rgba(249, 249, 249, .8); --sidebar: #f2f2f7; --pop: rgba(255, 255, 255, .92); --desk: #e6e6eb;
  --shadow: 0 10px 40px rgba(0, 0, 0, .18), 0 1px 3px rgba(0, 0, 0, .08);
  --font: -apple-system, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --tint: #0a84ff; --red: #ff453a; --green: #30d158;
  --bg: #000000; --bg2: #1c1c1e; --bg3: #2c2c2e; --grouped: #000000; --cell: #1c1c1e;
  --label: #ffffff; --label2: rgba(235, 235, 245, .6); --label3: rgba(235, 235, 245, .3);
  --sep: rgba(84, 84, 88, .65); --fill: rgba(118, 118, 128, .24); --fill2: rgba(118, 118, 128, .32);
  --bar: rgba(22, 22, 24, .82); --sidebar: #1c1c1e; --pop: rgba(44, 44, 46, .94); --desk: #121214;
  --shadow: 0 10px 40px rgba(0, 0, 0, .55), 0 0 0 .5px rgba(255, 255, 255, .08);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; background: var(--bg); color: var(--label); font-family: var(--font); font-size: 17px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
body { position: fixed; inset: 0; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
#app { position: absolute; inset: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
button:disabled { opacity: .3; cursor: default; }
input, textarea { font: inherit; color: var(--label); user-select: text; -webkit-user-select: text; }
.ico { display: inline-flex; align-items: center; justify-content: center; flex: none; }

/* ============ knjižnica ============ */
.library { position: absolute; inset: 0; display: flex; }
.sidebar { width: 300px; flex: none; background: var(--sidebar); padding: calc(var(--safe-t) + 18px) 14px calc(var(--safe-b) + 14px); display: flex; flex-direction: column; overflow-y: auto; border-right: .5px solid var(--sep); }
.sb-title { display: flex; align-items: center; gap: 10px; font-size: 30px; font-weight: 700; letter-spacing: -.6px; padding: 6px 8px 18px; }
.sb-logo { width: 34px; height: 34px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.sb-group { display: flex; flex-direction: column; gap: 2px; margin-bottom: 22px; }
.sb-head { display: flex; align-items: center; justify-content: space-between; padding: 0 10px 6px; font-size: 20px; font-weight: 700; letter-spacing: -.3px; }
.sb-add { color: var(--tint); width: 32px; height: 32px; display: grid; place-items: center; border-radius: 16px; }
.sb-add:active { background: var(--fill); }
.sb-item { display: flex; align-items: center; gap: 13px; height: 44px; padding: 0 12px; border-radius: 10px; text-align: left; font-size: 17px; }
.sb-item .ico { color: var(--tint); }
.sb-item span:nth-child(2) { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-item:active { background: var(--fill); }
.sb-item.on { background: var(--tint); color: #fff; }
.sb-item.on .ico, .sb-item.on .sb-count { color: #fff; }
.sb-count { color: var(--label2); font-size: 15px; font-variant-numeric: tabular-nums; }
.sb-empty { color: var(--label2); font-size: 15px; padding: 4px 12px; }
.sb-spacer { flex: 1; }

.lib-main { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; background: var(--bg); position: relative; padding-bottom: calc(var(--safe-b) + 40px); }
.lib-nav { position: sticky; top: 0; z-index: 5; height: calc(var(--safe-t) + 52px); padding: var(--safe-t) 20px 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; background: transparent; transition: background .2s, border-color .2s; border-bottom: .5px solid transparent; }
.lib-nav.scrolled { background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom-color: var(--sep); }
.lib-nav-title { font-weight: 600; font-size: 17px; opacity: 0; transition: opacity .2s; }
.lib-nav.scrolled .lib-nav-title { opacity: 1; }
.nav-left { display: flex; gap: 6px; }
.nav-right { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.nav-btn { color: var(--tint); font-size: 17px; display: inline-flex; align-items: center; gap: 2px; height: 44px; padding: 0 4px; }
.nav-btn.bold { font-weight: 600; } .nav-btn.danger { color: var(--red); }
.tb-btn { color: var(--tint); width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 22px; }
.tb-btn:active { background: var(--fill); }
.new-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--tint); color: #fff; height: 36px; padding: 0 16px 0 12px; border-radius: 18px; font-weight: 600; font-size: 16px; }
.new-btn:active { opacity: .75; }
.large-title { display: flex; align-items: center; justify-content: space-between; padding: 0 32px; }
.large-title h1 { font-size: 34px; font-weight: 700; letter-spacing: -.7px; margin: 2px 0 12px; }
.search-wrap { margin: 0 32px 26px; position: relative; display: flex; align-items: center; }
.search-wrap .ico { position: absolute; left: 10px; color: var(--label2); }
.search { width: 100%; height: 38px; border: 0; border-radius: 11px; background: var(--fill); padding: 0 12px 0 36px; font-size: 17px; outline: none; -webkit-appearance: none; }
.search.big { height: 48px; font-size: 20px; }
.search::placeholder { color: var(--label2); }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 34px 28px; padding: 0 32px; align-items: end; }
.doc-card { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.doc-cover-btn { width: 100%; display: flex; align-items: flex-end; justify-content: center; position: relative; aspect-ratio: 3/4; transition: transform .15s; }
.doc-cover-btn:active { transform: scale(.96); }
.cover { --cc: #2f5d8a; width: 88%; aspect-ratio: 0.76; border-radius: 4px 10px 10px 4px; position: relative; overflow: hidden;
  background: linear-gradient(90deg, rgba(0, 0, 0, .28) 0, rgba(0, 0, 0, .05) 7%, rgba(255, 255, 255, .12) 8.5%, transparent 13%), linear-gradient(160deg, color-mix(in srgb, var(--cc) 82%, #fff) 0%, var(--cc) 45%, color-mix(in srgb, var(--cc) 80%, #000) 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .2), 0 8px 20px -6px rgba(0, 0, 0, .35); }
.cover::after { content: ''; position: absolute; right: 14%; top: 0; bottom: 0; width: 5px; background: rgba(0, 0, 0, .16); box-shadow: 1px 0 0 rgba(255, 255, 255, .08); }
.cover-label { position: absolute; left: 18%; right: 22%; top: 16%; background: rgba(255, 255, 255, .92); color: #222; border-radius: 3px; padding: 6px 8px; font-size: 11px; font-weight: 600; line-height: 1.25; text-align: center; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; word-break: break-word; }
.cover-label:empty { display: none; }
.cover.no { background: var(--fill); box-shadow: none; }
.page-cover { width: 100%; max-height: 100%; background: #fff; border-radius: 4px; overflow: hidden; box-shadow: 0 1px 2px rgba(0, 0, 0, .2), 0 6px 18px -6px rgba(0, 0, 0, .3); }
.page-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fav-badge { position: absolute; top: 6px; right: 8%; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 12px; background: var(--orange); color: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.fav-badge svg { fill: #fff; }
.doc-meta { margin-top: 10px; display: flex; flex-direction: column; align-items: center; max-width: 100%; padding: 2px 6px; border-radius: 8px; }
.doc-meta:active { background: var(--fill); }
.doc-title { display: flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 600; max-width: 100%; }
.doc-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-title .ico { color: var(--label2); }
.doc-date { font-size: 12.5px; color: var(--label2); margin-top: 2px; white-space: nowrap; }
.folder-cover { width: 92%; aspect-ratio: 1.18; position: relative; margin-bottom: 6%; }
.folder-tab { position: absolute; left: 0; top: 0; width: 42%; height: 22%; border-radius: 8px 8px 0 0; background: color-mix(in srgb, var(--tint) 75%, #000); }
.folder-body { position: absolute; left: 0; right: 0; top: 12%; bottom: 0; border-radius: 4px 10px 10px 10px; background: linear-gradient(180deg, color-mix(in srgb, var(--tint) 70%, #fff), var(--tint)); box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .35); }
.empty { text-align: center; color: var(--label2); padding: 80px 30px; display: flex; flex-direction: column; align-items: center; }
.empty h3 { color: var(--label); font-size: 22px; margin: 16px 0 6px; }
.empty p { margin: 0 0 20px; max-width: 420px; line-height: 1.4; }
.empty-btns { display: flex; gap: 12px; }
.btn-fill { background: var(--tint); color: #fff; font-weight: 600; height: 46px; padding: 0 22px; border-radius: 12px; display: inline-flex; align-items: center; gap: 6px; font-size: 17px; }
.btn-tint { background: color-mix(in srgb, var(--tint) 15%, transparent); color: var(--tint); font-weight: 600; height: 46px; padding: 0 22px; border-radius: 12px; font-size: 17px; }
.btn-fill:active, .btn-tint:active { opacity: .7; }
.btn-plain { color: var(--tint); font-size: 15px; padding: 8px 4px; display: inline-flex; align-items: center; gap: 4px; }
.sec-title { font-size: 22px; font-weight: 700; margin: 8px 32px 16px; }
.search-results { margin: 0 32px; background: var(--cell); border-radius: 12px; overflow: hidden; border: .5px solid var(--sep); }
.sr-row { display: flex; gap: 14px; align-items: center; padding: 10px 14px; width: 100%; text-align: left; border-bottom: .5px solid var(--sep); }
.sr-row:last-child { border-bottom: 0; }
.sr-thumb { width: 44px; height: 58px; background: #fff; border-radius: 3px; overflow: hidden; flex: none; box-shadow: 0 0 0 .5px var(--sep); }
.sr-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sr-title { font-weight: 600; } .sr-snip { color: var(--label2); font-size: 14px; margin-top: 2px; }
mark { background: color-mix(in srgb, #ffd60a 55%, transparent); color: var(--label); border-radius: 3px; padding: 0 1px; }
.trash-note { color: var(--label2); text-align: center; font-size: 14px; margin-top: 40px; }

/* ============ popoverji in meniji ============ */
.layer { position: fixed; inset: 0; pointer-events: none; z-index: 100; }
.layer > * { pointer-events: auto; }
.pop-back { position: fixed; inset: 0; }
.popover { position: fixed; background: var(--pop); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); border-radius: 14px; box-shadow: var(--shadow); animation: popIn .18s cubic-bezier(.2, .9, .3, 1.2); max-height: calc(100vh - 20px); overflow: visible; }
.popover.out { animation: popOut .15s ease forwards; }
@keyframes popIn { from { opacity: 0; transform: scale(.92); } }
@keyframes popOut { to { opacity: 0; transform: scale(.95); } }
.pop-arrow { position: absolute; width: 18px; height: 9px; overflow: hidden; }
.pop-arrow::before { content: ''; position: absolute; width: 13px; height: 13px; background: var(--pop); transform: rotate(45deg); left: 2.5px; border-radius: 2px; }
.pop-arrow.up { top: -9px; } .pop-arrow.up::before { top: 4px; }
.pop-arrow.down { bottom: -9px; } .pop-arrow.down::before { top: -8px; }
.menu-pop .pop-arrow { display: none; }
.menu { min-width: 250px; padding: 6px 0; max-height: 70vh; overflow-y: auto; }
.menu-item { display: flex; align-items: center; width: 100%; height: 44px; padding: 0 16px 0 8px; gap: 4px; text-align: left; font-size: 17px; }
.menu-item:active { background: var(--fill); }
.menu-item.danger { color: var(--red); }
.menu-item.disabled { opacity: .35; }
.menu-check { width: 24px; display: inline-flex; justify-content: center; color: var(--label); }
.menu-label { flex: 1; white-space: nowrap; padding-right: 18px; }
.menu-sep { height: 8px; background: var(--fill); margin: 6px 0; opacity: .6; }
.menu-header { font-size: 13px; color: var(--label2); padding: 6px 16px 4px 32px; }

/* ============ listi ============ */
.sheet-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .32); animation: fadeIn .25s; }
.sheet-back.out { animation: fadeOut .22s forwards; }
@keyframes fadeIn { from { opacity: 0; } } @keyframes fadeOut { to { opacity: 0; } }
.sheet { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: calc(100vw - 40px); max-height: calc(100vh - 80px); background: var(--grouped); border-radius: 16px; box-shadow: 0 20px 70px rgba(0, 0, 0, .35); display: flex; flex-direction: column; overflow: hidden; animation: sheetIn .32s cubic-bezier(.2, .9, .25, 1); }
:root[data-theme="dark"] .sheet { background: var(--bg2); }
.sheet.out { animation: sheetOut .2s ease forwards; }
@keyframes sheetIn { from { transform: translate(-50%, calc(-50% + 60vh)); } }
@keyframes sheetOut { to { transform: translate(-50%, calc(-50% + 60vh)); } }
.sheet-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 56px; padding: 0 16px; flex: none; border-bottom: .5px solid var(--sep); background: var(--bar); }
.sheet-nav-side.r { display: flex; justify-content: flex-end; }
.sheet-title { font-weight: 600; font-size: 17px; }
.sheet-body { overflow-y: auto; padding: 20px; -webkit-overflow-scrolling: touch; }
.form-label { font-size: 13px; text-transform: uppercase; color: var(--label2); letter-spacing: .2px; margin: 18px 4px 8px; }
.form-hint { color: var(--label2); font-size: 14px; line-height: 1.4; margin: 8px 4px; }
.alert-back { background: rgba(0, 0, 0, .3); }
.alert { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 300px; background: var(--pop); -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); border-radius: 14px; overflow: hidden; animation: popIn .2s; text-align: center; box-shadow: var(--shadow); }
.alert-text { padding: 20px 16px 16px; }
.alert-title { font-weight: 600; font-size: 17px; }
.alert-msg { font-size: 13px; margin-top: 4px; line-height: 1.35; }
.alert-input { margin-top: 14px; width: 100%; height: 34px; border-radius: 8px; border: .5px solid var(--sep); background: var(--bg3); padding: 0 8px; font-size: 15px; outline: none; }
.alert-btns { display: flex; border-top: .5px solid var(--sep); }
.alert-btns.col { flex-direction: column; }
.alert-btn { flex: 1; height: 44px; color: var(--tint); font-size: 17px; }
.alert-btn + .alert-btn { border-left: .5px solid var(--sep); }
.alert-btn.bold { font-weight: 600; } .alert-btn.danger { color: var(--red); }
.toast { position: fixed; left: 50%; bottom: calc(var(--safe-b) + 34px); transform: translate(-50%, 30px); background: rgba(30, 30, 32, .92); color: #fff; padding: 12px 20px; border-radius: 22px; font-size: 15px; font-weight: 500; opacity: 0; pointer-events: none; transition: .25s; z-index: 200; max-width: 80vw; text-align: center; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* segmenti, stikala, drsniki */
.seg { display: inline-flex; background: var(--fill); border-radius: 9px; padding: 2px; gap: 2px; }
.seg.wide { display: flex; } .seg.wide button { flex: 1; }
.seg button { height: 30px; padding: 0 14px; border-radius: 7px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.seg button.on { background: var(--bg3); box-shadow: 0 2px 6px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .04); font-weight: 600; }
:root[data-theme="dark"] .seg button.on { background: #636366; }
.switch { -webkit-appearance: none; appearance: none; width: 51px; height: 31px; border-radius: 16px; background: var(--fill2); position: relative; flex: none; transition: background .2s; cursor: pointer; margin: 0; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 14px; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 1px 1px rgba(0, 0, 0, .16); transition: transform .2s; }
.switch:checked { background: var(--green); } .switch:checked::after { transform: translateX(20px); }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 2px; background: var(--fill2); margin: 14px 0 6px; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border-radius: 14px; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .2), 0 0 0 .5px rgba(0, 0, 0, .05); }

/* ============ urejevalnik ============ */
.editor { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--desk); }
.ed-top { flex: none; background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: .5px solid var(--sep); padding-top: var(--safe-t); z-index: 3; }
.ed-nav { height: 48px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 10px; }
.ed-nav-l { display: flex; align-items: center; gap: 2px; }
.ed-nav-r { display: flex; justify-content: flex-end; gap: 2px; }
.tb-btn.back { display: inline-flex; align-items: center; width: auto; padding: 0 10px 0 4px; gap: 2px; font-size: 17px; border-radius: 10px; }
.ed-title { font-weight: 600; font-size: 17px; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 6px 12px; border-radius: 8px; }
.ed-title:active { background: var(--fill); }
.ed-tools { height: 62px; display: flex; align-items: flex-end; overflow: hidden; padding: 0 12px; gap: 10px; }
.tools-spacer { flex: 1; }
.tool-group { display: flex; align-items: flex-end; gap: 4px; height: 100%; }
.instr { width: 44px; height: 62px; display: flex; justify-content: center; align-items: flex-start; padding-top: 18px; transition: padding .18s cubic-bezier(.2, .9, .3, 1.2); filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .12)); }
.instr.on { padding-top: 2px; }
.instr svg { display: block; }
.tool-ico { width: 46px; height: 46px; margin-bottom: 7px; border-radius: 12px; display: grid; place-items: center; color: var(--label); }
.tool-ico.on { background: color-mix(in srgb, var(--tint) 16%, transparent); color: var(--tint); }
.tool-ico:active { background: var(--fill); }
.tool-sep { width: 1px; height: 30px; background: var(--sep); margin: 0 10px 15px; align-self: flex-end; }
.tool-opts { display: flex; align-items: center; gap: 6px; height: 100%; padding-bottom: 2px; }
.swatch { width: 34px; height: 34px; border-radius: 17px; display: grid; place-items: center; }
.swatch::before { content: ''; width: 24px; height: 24px; border-radius: 12px; background: var(--c); box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .25); }
.swatch.on { box-shadow: inset 0 0 0 2.5px var(--tint); }
.sizebtn { width: 34px; height: 34px; border-radius: 17px; display: grid; place-items: center; }
.sizebtn span { background: var(--label); border-radius: 50%; display: block; }
.sizebtn.on { background: var(--fill2); }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px; border-radius: 16px; background: var(--fill); font-size: 14px; font-weight: 500; margin-left: 6px; }
.ed-body { flex: 1; display: flex; min-height: 0; position: relative; }
.ed-host { flex: 1; position: relative; overflow: hidden; --desk: #e6e6eb; }
:root[data-theme="dark"] .ed-host { --desk: #121214; }
.ed-host canvas { position: absolute; left: 0; top: 0; touch-action: none; }
.ed-live { cursor: crosshair; }
.ed-overlay { position: absolute; inset: 0; pointer-events: none; }
.ed-overlay > * { pointer-events: auto; }
.ed-thumbs { width: 0; overflow-y: auto; background: var(--sidebar); transition: width .25s; flex: none; border-right: .5px solid var(--sep); display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 0; }
.ed-body.thumbs-open .ed-thumbs { width: 178px; padding: 18px 0 40px; }
.thumb { display: flex; flex-direction: column; align-items: center; }
.thumb canvas { border-radius: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); background: #fff; }
.thumb.on canvas { box-shadow: 0 0 0 3px var(--tint), 0 1px 4px rgba(0, 0, 0, .2); }
.th-foot { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 13px; color: var(--label2); font-weight: 500; }
.th-more { color: var(--label2); width: 28px; height: 28px; display: grid; place-items: center; }
.th-add { width: 132px; height: 90px; border: 1.5px dashed var(--label3); border-radius: 8px; color: var(--tint); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 13px; font-weight: 600; flex: none; }
.page-ind { position: absolute; bottom: calc(var(--safe-b) + 22px); left: 50%; transform: translateX(-50%); background: rgba(30, 30, 32, .75); color: #fff; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 14px; opacity: 0; transition: opacity .3s; pointer-events: none; font-variant-numeric: tabular-nums; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.page-ind.show { opacity: 1; }
.edit-menu { position: absolute; display: flex; background: rgba(28, 28, 30, .94); border-radius: 10px; overflow: hidden; box-shadow: 0 6px 24px rgba(0, 0, 0, .3); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); animation: popIn .15s; }
.edit-menu button { color: #fff; font-size: 15px; height: 40px; padding: 0 14px; white-space: nowrap; }
.edit-menu button + button { border-left: .5px solid rgba(255, 255, 255, .2); }
.edit-menu button:active { background: rgba(255, 255, 255, .15); }
.edit-menu button.danger { color: #ff6961; }
.text-edit { position: absolute; background: color-mix(in srgb, var(--tint) 6%, transparent); border: 1.5px solid var(--tint); border-radius: 4px; outline: none; resize: none; padding: 0; margin: -2px 0 0 -2px; overflow: hidden; min-height: 1.4em; }

/* možnosti orodja */
.topts { width: 300px; padding: 16px; }
.topts .seg { display: flex; margin-bottom: 12px; } .topts .seg button { flex: 1; padding: 0 6px; }
.tprev { width: 260px; height: 50px; display: block; margin: 2px auto 4px; }
.trow { display: flex; align-items: center; justify-content: space-between; font-size: 15px; margin-top: 8px; gap: 10px; }
.tval { color: var(--label2); font-variant-numeric: tabular-nums; }
.palette { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 12px; }
.pal { aspect-ratio: 1; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .25); position: relative; }
.pal.on::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2.5px solid var(--tint); }
.pal.custom { background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); overflow: hidden; display: block; }
.pal-custom { opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.addpage { width: 380px; padding: 16px; }
.ap-title { font-weight: 600; margin-bottom: 12px; }
.ap-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 8px; }
.ap-tpl { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; color: var(--label2); }
.ap-tpl canvas { border-radius: 3px; box-shadow: 0 0 0 .5px var(--sep), 0 2px 6px rgba(0, 0, 0, .08); }
.ap-row { display: flex; justify-content: space-between; border-top: .5px solid var(--sep); margin-top: 12px; padding-top: 6px; }
.spell { width: 290px; padding: 12px; }
.spell-head { font-size: 13px; color: var(--label2); margin: 2px 4px 8px; }
.spell-head b { color: var(--label); text-decoration: underline wavy var(--red); text-underline-offset: 3px; }
.spell-opt { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px; padding: 6px 12px; border-radius: 10px; background: var(--fill); margin-bottom: 6px; }
.spell-opt:active { background: var(--fill2); }
.spell-opt canvas { display: block; }
.spell-txt { font-size: 19px; font-weight: 500; }
.spell-sub { font-size: 13px; color: var(--label2); }
.spell-actions { display: flex; gap: 4px; margin-top: 6px; }
.spell-actions button { flex: 1; color: var(--tint); font-size: 14px; padding: 8px 2px; border-radius: 8px; }
.spell-actions button:active { background: var(--fill); }
.spell-hint { font-size: 12.5px; color: var(--label2); margin: 8px 4px 2px; line-height: 1.35; }
.convert-ta { width: 100%; min-height: 220px; border-radius: 12px; border: .5px solid var(--sep); background: var(--cell); padding: 14px; font-size: 18px; line-height: 1.45; outline: none; resize: vertical; }
.convert-btns { display: flex; gap: 10px; margin-top: 14px; }

/* predloge, nov zvezek */
.tpl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 12px; }
.tpl { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; color: var(--label2); padding: 6px; border-radius: 10px; }
.tpl canvas { border-radius: 4px; box-shadow: 0 0 0 .5px var(--sep), 0 2px 8px rgba(0, 0, 0, .1); }
.tpl.on { color: var(--tint); font-weight: 600; } .tpl.on canvas { box-shadow: 0 0 0 3px var(--tint); }
.nb-top { display: flex; gap: 26px; align-items: flex-start; }
.nb-top-r { flex: 1; min-width: 0; } .nb-top-r .form-label:first-child { margin-top: 0; }
.nb-preview { width: 190px; height: 190px; position: relative; flex: none; }
.nb-preview .cover { position: absolute; left: 0; top: 0; width: 132px; z-index: 2; }
.nb-preview .nb-paper { position: absolute; right: 0; bottom: 0; border-radius: 3px; box-shadow: 0 4px 14px rgba(0, 0, 0, .16); }
.nb-title { width: 100%; height: 48px; border-radius: 12px; border: 0; background: var(--cell); padding: 0 14px; font-size: 20px; font-weight: 600; outline: none; }
.nb-covers { display: flex; flex-wrap: wrap; gap: 10px; }
.nbc { width: 36px; height: 36px; border-radius: 18px; background: var(--c); box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .2); position: relative; }
.nbc.on::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2.5px solid var(--tint); }
.nbc-none { width: 100%; height: 100%; display: grid; place-items: center; border-radius: 18px; background: var(--fill); color: var(--label2); }
.nb-row { display: flex; gap: 10px; flex-wrap: wrap; }
.nb-sheet .tpl-grid.small { grid-template-columns: repeat(8, 1fr); gap: 8px 4px; }
.nb-sheet .tpl-grid.small .tpl { font-size: 11px; padding: 2px; }
.cover-pick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.cp { padding: 6px; border-radius: 10px; display: flex; justify-content: center; }
.cp .cover { width: 100%; }
.cp.on { background: color-mix(in srgb, var(--tint) 16%, transparent); box-shadow: inset 0 0 0 2px var(--tint); }
.cp-none { width: 100%; aspect-ratio: .76; border-radius: 6px; border: 1.5px dashed var(--label3); display: grid; place-items: center; font-size: 12px; color: var(--label2); text-align: center; }
.list { background: var(--cell); border-radius: 12px; overflow: hidden; }
.list-row { display: flex; align-items: center; gap: 12px; width: 100%; height: 50px; padding: 0 16px; text-align: left; border-bottom: .5px solid var(--sep); }
.list-row:last-child { border-bottom: 0; }
.list-row span { flex: 1; } .list-row .ico { color: var(--tint); }
.list-row.tint { color: var(--tint); }
.list-row:active { background: var(--fill); }

/* nastavitve */
.settings { padding-bottom: 10px; }
.set-group { background: var(--cell); border-radius: 12px; overflow: hidden; }
.set-group.pad { padding: 14px 16px; }
.set-title { font-size: 13px; text-transform: uppercase; color: var(--label2); margin: 24px 16px 8px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; min-height: 52px; border-bottom: .5px solid var(--sep); width: 100%; text-align: left; }
.set-row:last-child { border-bottom: 0; }
.set-row.btn { color: var(--label); } .set-row.btn .ico { color: var(--tint); }
.set-sub { font-size: 13px; color: var(--label2); margin-top: 3px; line-height: 1.35; }
.set-about { margin: 0; font-size: 15px; line-height: 1.45; color: var(--label2); }
.set-about b { color: var(--label); }
.welcome { text-align: center; padding: 6px 18px 10px; }
.welcome-icon { width: 84px; height: 84px; border-radius: 19px; box-shadow: 0 4px 16px rgba(0, 0, 0, .2); }
.welcome h2 { font-size: 30px; letter-spacing: -.5px; margin: 14px 0 22px; }
.feat { display: flex; gap: 16px; text-align: left; margin: 0 6px 18px; align-items: flex-start; }
.feat .ico { color: var(--tint); margin-top: 2px; }
.feat b { font-size: 16px; } .feat p { margin: 3px 0 0; color: var(--label2); font-size: 15px; line-height: 1.35; }
.welcome-free { color: var(--label2); font-size: 14px; margin-top: 22px; }

/* kurs */
.course { padding: 0 32px 40px; max-width: 980px; }
.course-intro { color: var(--label2); font-size: 16px; line-height: 1.5; margin: 0 0 22px; max-width: 760px; }
.course-sec { font-size: 13px; text-transform: uppercase; color: var(--label2); margin: 26px 4px 8px; letter-spacing: .2px; }
.course-card { display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; background: var(--bg2); border-radius: 14px; padding: 16px 18px; margin-bottom: 10px; }
.course-card:active { background: var(--fill2); }
.course-card > .ico { color: var(--label3); }
.cc-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--tint); color: #fff; display: grid; place-items: center; flex: none; }
.cc-body { flex: 1; } .cc-title { font-weight: 600; font-size: 17px; } .cc-sub { color: var(--label2); font-size: 14px; margin-top: 2px; }
.progress { height: 5px; border-radius: 3px; background: var(--fill2); margin-top: 10px; overflow: hidden; max-width: 340px; }
.progress div { height: 100%; background: var(--green); border-radius: 3px; transition: width .3s; }
.link-danger { color: var(--red); font-size: 15px; margin-top: 30px; padding: 8px 4px; }
.glyph-list { display: flex; flex-direction: column; gap: 14px; }
.glyph-row { display: flex; align-items: center; gap: 18px; }
.g-label { width: 70px; display: flex; flex-direction: column; align-items: center; }
.g-char { font-size: 46px; font-weight: 500; line-height: 1; }
.g-status { font-size: 12px; color: var(--label2); margin-top: 4px; font-weight: 600; } .g-status.ok { color: var(--green); }
.pad { background: var(--cell); border-radius: 12px; box-shadow: 0 0 0 .5px var(--sep); touch-action: none; display: block; }
.g-btns { display: flex; flex-direction: column; gap: 2px; } .g-btns.h { flex-direction: row; justify-content: flex-end; margin-top: 4px; }
.course-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 28px; }
.course-dots { display: flex; gap: 6px; } .course-dots span { width: 7px; height: 7px; border-radius: 4px; background: var(--fill2); } .course-dots span.on { background: var(--tint); }
.sent-target { font-size: 26px; font-weight: 500; margin: 0 0 16px; padding: 16px 20px; background: var(--bg2); border-radius: 14px; }
.sent-actions { margin-top: 12px; }
.sent-result { margin-top: 18px; min-height: 30px; }
.sent-row { font-size: 20px; } .sent-lab { color: var(--label2); font-size: 14px; display: block; margin-bottom: 4px; }
.diff .wrong { color: var(--red); text-decoration: underline wavy; text-underline-offset: 4px; }
.sent-acc { margin-top: 10px; font-weight: 600; font-size: 15px; } .sent-acc.good { color: var(--green); } .sent-acc.mid { color: var(--orange); } .sent-acc.bad { color: var(--red); }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--fill2); border-top-color: var(--tint); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.preview-out { margin: 0 32px; }
.course .preview-out { margin: 0; }
.preview-line { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; background: var(--cell); border-radius: 14px; padding: 18px; min-height: 90px; box-shadow: 0 0 0 .5px var(--sep); }
.preview-miss { font-size: 22px; color: var(--label3); font-style: italic; }
.course .search-wrap { margin: 0 0 16px; }

/* pokončna postavitev: ožja stranska vrstica */
@media (max-width: 1100px) {
  .sidebar { width: 260px; }
  .doc-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 30px 22px; padding: 0 26px; }
  .large-title, .search-wrap { padding: 0 26px; margin-left: 0; margin-right: 0; } .search-wrap { margin: 0 26px 24px; padding: 0; }
  .ed-tools { gap: 4px; } .tool-sep { margin: 0 6px 15px; }
  .swatch, .sizebtn { width: 31px; } .instr { width: 36px; }
}
@media (max-width: 820px) {
  .sidebar { display: none; }
  .ed-nav .back span { display: none; }
}
