/* Muistiinpanot (2026-10-26): Muistiinpanot-ikkuna (.nt-win), työpöydän muistilaput (.nt-sticky) ja
   projektin ilmoitustaulun laput käyttävät samoja paperivärejä (.nt-c-*). Väri vain lapuissa, muuten
   otsikko + ohuet viivat (UI-konventio: ei korttikasaa). Ikonit monokromi SVG. */

.nt-c-yellow { --nt-paper: #fff4b8; --nt-edge: #e8d46a; --nt-ink: #3d3510; }
.nt-c-blue   { --nt-paper: #dcecff; --nt-edge: #9cc2f0; --nt-ink: #12304f; }
.nt-c-green  { --nt-paper: #dff3dc; --nt-edge: #9fd096; --nt-ink: #193d16; }
.nt-c-pink   { --nt-paper: #fde0ea; --nt-edge: #f0a3bd; --nt-ink: #4d1427; }
.nt-c-gray   { --nt-paper: #eceef1; --nt-edge: #c3c8cf; --nt-ink: #24282e; }
:root[data-theme="dark"] .nt-c-yellow { --nt-paper: #4a4318; --nt-edge: #8a7a2a; --nt-ink: #f6edc4; }
:root[data-theme="dark"] .nt-c-blue   { --nt-paper: #1d3450; --nt-edge: #3d6797; --nt-ink: #d8e8fb; }
:root[data-theme="dark"] .nt-c-green  { --nt-paper: #1f3b22; --nt-edge: #3f7244; --nt-ink: #d7f0d3; }
:root[data-theme="dark"] .nt-c-pink   { --nt-paper: #47202f; --nt-edge: #85405b; --nt-ink: #f9d9e4; }
:root[data-theme="dark"] .nt-c-gray   { --nt-paper: #30343a; --nt-edge: #565c65; --nt-ink: #e6e8eb; }

/* ── Ikkuna ── */
.nt-win { display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); flex: 1; min-height: 0; height: 100%;
    container-type: inline-size; color: var(--color-text); background: var(--color-surface); font-size: 13px; }
.nt-list { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--color-border); }
.nt-list-top { display: flex; gap: 6px; padding: 10px; border-bottom: 1px solid var(--color-border-light, var(--color-border)); }
.nt-search { flex: 1; display: flex; align-items: center; gap: 6px; border: 1px solid var(--color-border); border-radius: 999px;
    padding: 3px 10px; color: var(--color-text-muted); background: var(--color-bg, var(--color-surface)); min-width: 0; }
.nt-search input { border: 0; outline: 0; background: transparent; color: var(--color-text); font: inherit; min-width: 0; flex: 1; padding: 2px 0; }
.nt-new { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; border: 0; cursor: pointer;
    background: var(--color-primary); color: #fff; flex: none; }
.nt-new:hover { filter: brightness(1.08); }
.nt-seg { display: flex; margin: 8px 10px 4px; border: 1px solid var(--color-border); border-radius: 8px; overflow: hidden; flex: none; }
.nt-seg button { flex: 1; border: 0; background: transparent; color: var(--color-text-muted); padding: 5px 4px; font: inherit; font-size: 12px; cursor: pointer;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-seg button + button { border-left: 1px solid var(--color-border); }
.nt-seg button.on { background: var(--color-text); color: var(--color-surface); font-weight: 650; }
.nt-list-scroll { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 8px; }
.nt-grp { padding: 12px 12px 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--color-text-muted); display: flex; gap: 6px; align-items: center; }
.nt-grp span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-row { display: flex; gap: 8px; width: 100%; text-align: left; border: 0; border-top: 1px solid var(--color-border-light, var(--color-border));
    background: transparent; color: inherit; padding: 8px 12px; cursor: pointer; font: inherit; align-items: flex-start; }
.nt-row:hover { background: color-mix(in srgb, var(--color-text) 4%, transparent); }
.nt-row.on { background: color-mix(in srgb, var(--color-primary) 10%, transparent); box-shadow: inset 3px 0 0 var(--color-primary); }
.nt-dot { width: 9px; height: 9px; border-radius: 3px; background: var(--nt-paper); border: 1px solid var(--nt-edge); flex: none; margin-top: 4px; }
.nt-row-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.nt-row-main b { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-row-main small { color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.nt-meta { font-size: 11px; color: var(--color-text-muted); display: flex; gap: 6px; align-items: center; opacity: .85; }
.nt-meta .nt-when { margin-left: auto; white-space: nowrap; }
.nt-ic { display: inline-flex; }
.nt-empty { padding: 18px 14px; color: var(--color-text-muted); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.nt-linkbtn { border: 0; background: none; color: var(--color-primary); cursor: pointer; padding: 0; font: inherit; font-weight: 600; }

.nt-ed { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.nt-ed-empty { margin: auto; text-align: center; color: var(--color-text-muted); display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px; max-width: 42ch; }
.nt-ed-empty-ic { opacity: .6; transform: scale(2); margin-bottom: 8px; }
.nt-hint { font-size: 12px; }
.nt-ed-top { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--color-border-light, var(--color-border)); flex-wrap: wrap; flex: none; }
.nt-sp { flex: 1; }
.nt-back { display: none; }
.nt-owner-wrap, .nt-more-wrap { position: relative; }
.nt-owner { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--color-border); border-radius: 999px; padding: 3px 10px;
    font: inherit; font-size: 12px; background: transparent; color: var(--color-text); cursor: pointer; max-width: 340px; }
.nt-owner span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-owner:disabled { cursor: default; opacity: .8; }
.nt-caret { color: var(--color-text-muted); }
.nt-saved { font-size: 11.5px; color: var(--color-text-muted); white-space: nowrap; }
.nt-saved.err { color: var(--color-danger, #c0392b); }
.nt-colors { display: inline-flex; gap: 3px; padding: 0 4px; }
.nt-swatch { width: 15px; height: 15px; border-radius: 4px; background: var(--nt-paper); border: 1px solid var(--nt-edge); cursor: pointer; padding: 0; }
.nt-swatch.on { box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 3.5px var(--color-text); }
.nt-iconbtn { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; border: 0; background: transparent; color: var(--color-text-muted); cursor: pointer; flex: none; }
.nt-iconbtn:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); color: var(--color-text); }
.nt-iconbtn.on { color: var(--color-primary); background: color-mix(in srgb, var(--color-primary) 12%, transparent); }

.nt-menu-back { position: fixed; inset: 0; z-index: 2147479000; background: transparent; }
.nt-menu { position: absolute; top: calc(100% + 4px); z-index: 2147480000; background: var(--color-surface); border: 1px solid var(--color-border);
    border-radius: 10px; box-shadow: 0 10px 30px rgba(15, 23, 42, .18); padding: 4px; min-width: 220px; max-height: 360px; overflow-y: auto; display: flex; flex-direction: column; }
.nt-owner-menu { left: 0; width: 300px; }
.nt-more-menu { right: 0; }
.nt-menu-search { margin: 4px; padding: 5px 8px; border: 1px solid var(--color-border); border-radius: 6px; background: transparent; color: var(--color-text); font: inherit; }
.nt-menu-item { display: flex; align-items: center; gap: 8px; text-align: left; border: 0; background: transparent; color: var(--color-text);
    padding: 7px 10px; border-radius: 6px; cursor: pointer; font: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-menu-item:hover { background: color-mix(in srgb, var(--color-text) 6%, transparent); }
.nt-menu-item.on { font-weight: 650; color: var(--color-primary); }
.nt-menu-item.danger { color: var(--color-danger, #c0392b); }
.nt-menu-check { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-top: 1px solid var(--color-border-light, var(--color-border)); margin-top: 4px; font-size: 12px; }
.nt-menu-confirm { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; align-items: center; font-size: 12px; max-width: 240px; }
.nt-menu-confirm span { flex-basis: 100%; }

.nt-ed-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 22px 22px; }
.nt-title { width: 100%; border: 0; outline: 0; background: transparent; color: var(--color-text); font: inherit; font-size: 19px; font-weight: 750;
    letter-spacing: -.01em; padding: 2px 0; max-width: 74ch; }
.nt-ed-meta { color: var(--color-text-muted); font-size: 12px; margin: 2px 0 10px; }
.nt-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.nt-tool { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--color-border); border-radius: 7px; padding: 4px 9px;
    background: transparent; color: var(--color-text); font: inherit; font-size: 12px; cursor: pointer; }
.nt-tool:hover { border-color: var(--color-primary); color: var(--color-primary); }
.nt-tools-hint { font-size: 11.5px; color: var(--color-text-muted); }
.nt-rte { max-width: 80ch; }
.nt-rte img { max-width: 100%; height: auto; border-radius: 6px; }

.nt-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--color-border); border-radius: 7px; padding: 6px 12px;
    background: var(--color-surface); color: var(--color-text); font: inherit; font-size: 12.5px; cursor: pointer; }
.nt-btn-primary { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.nt-btn-danger { background: var(--color-danger, #c0392b); border-color: var(--color-danger, #c0392b); color: #fff; }
.nt-btn:disabled { opacity: .55; cursor: default; }
.nt-wide { width: 100%; justify-content: center; }

/* Valitsimet (suunnitelma / valokuva) */
.nt-modal-back { position: fixed; inset: 0; z-index: 1000500; background: rgba(15, 23, 42, .45); display: grid; place-items: center; padding: 16px; }
.nt-modal { background: var(--color-surface); color: var(--color-text); border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
    width: min(520px, 100%); max-height: min(640px, 90vh); display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.nt-modal-wide { width: min(860px, 100%); }
.nt-modal-h { display: flex; align-items: center; justify-content: space-between; font-size: 14px; }
.nt-modal-note { color: var(--color-text-muted); font-size: 12px; margin: 0; }
.nt-modal-search { flex: none; }
.nt-or { text-align: center; font-size: 11.5px; color: var(--color-text-muted); }
.nt-pick-list { flex: 1; min-height: 120px; overflow-y: auto; border-top: 1px solid var(--color-border-light, var(--color-border)); }
.nt-pick-row { display: flex; flex-direction: column; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--color-border-light, var(--color-border));
    background: transparent; color: inherit; padding: 7px 8px; cursor: pointer; font: inherit; }
.nt-pick-row:hover { background: color-mix(in srgb, var(--color-text) 4%, transparent); }
.nt-pick-row.on { background: color-mix(in srgb, var(--color-primary) 12%, transparent); }
.nt-pick-row small { color: var(--color-text-muted); font-size: 11.5px; }
.nt-pick-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-modal-f { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nt-page { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; }
.nt-page input { width: 56px; padding: 4px 6px; border: 1px solid var(--color-border); border-radius: 6px; background: transparent; color: var(--color-text); }
.nt-photo-grid { flex: 1; min-height: 160px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.nt-photo { position: relative; aspect-ratio: 1; border: 0; padding: 0; border-radius: 8px; overflow: hidden; cursor: pointer; background: var(--color-border-light, #eee); }
.nt-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nt-photo span { position: absolute; left: 4px; bottom: 4px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 10.5px; padding: 1px 6px; border-radius: 4px;
    max-width: calc(100% - 8px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-photo:hover { outline: 2px solid var(--color-primary); }

/* Kapea ikkuna: lista TAI editori */
@container (max-width: 640px) {
    .nt-win { grid-template-columns: minmax(0, 1fr); }
    .nt-list { border-right: 0; }
    .nt-win.nt-has-sel .nt-list { display: none; }
    .nt-win:not(.nt-has-sel) .nt-ed { display: none; }
    .nt-back { display: grid; }
    .nt-colors { display: none; }
    .nt-ed-scroll { padding: 12px 14px 18px; }
}

/* ── Työpöydän muistilaput ── (kerros ilman z-indexiä: laput z 0 = ikkunoiden alla, .is-top z 2 = päällä) */
.nt-desk-layer { position: absolute; inset: 0; pointer-events: none; }
.nt-sticky { position: absolute; z-index: 0; pointer-events: auto; display: flex; flex-direction: column; min-width: 180px;
    background: var(--nt-paper); color: var(--nt-ink); border: 1px solid var(--nt-edge); border-radius: 4px 4px 10px 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 10px 24px -8px rgba(0, 0, 0, .28); font-size: 13px; overflow: hidden; }
.nt-sticky.is-top { z-index: 2; }
.nt-sticky.is-min { height: auto !important; }
.nt-sticky.is-moving { box-shadow: 0 2px 4px rgba(0, 0, 0, .15), 0 22px 40px -10px rgba(0, 0, 0, .38); opacity: .96; }
.nt-sticky-h { display: flex; align-items: center; gap: 2px; padding: 4px 4px 4px 6px; cursor: grab; flex: none;
    background: color-mix(in srgb, var(--nt-edge) 35%, transparent); user-select: none; touch-action: none; }
.nt-sticky.is-moving .nt-sticky-h { cursor: grabbing; }
.nt-sticky-grip { opacity: .45; display: inline-flex; padding: 0 3px 0 0; }
.nt-sticky-title { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: inherit; font: inherit; font-weight: 700; padding: 2px 2px; cursor: text; }
.nt-sticky-btn { width: 22px; height: 22px; display: grid; place-items: center; border: 0; background: transparent; color: inherit; opacity: .55;
    border-radius: 5px; cursor: pointer; padding: 0; flex: none; }
.nt-sticky-btn:hover { opacity: 1; background: color-mix(in srgb, var(--nt-ink) 10%, transparent); }
.nt-sticky-btn.on { opacity: 1; }
.nt-sticky-b { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 10px; }
.nt-sticky-b .hx-rte, .nt-sticky-b .hx-rte-area { background: transparent !important; border: 0 !important; color: inherit; box-shadow: none !important; }
.nt-sticky-b .hx-rte-area { padding: 0 !important; outline: 0; }
.nt-sticky-b img { max-width: 100%; height: auto; border-radius: 4px; }
.nt-sticky-f { display: flex; justify-content: space-between; gap: 8px; font-size: 10.5px; opacity: .65; padding: 2px 10px 5px; flex: none; }
.nt-sticky-owner { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-sticky-rs { position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize; touch-action: none;
    background: linear-gradient(135deg, transparent 50%, color-mix(in srgb, var(--nt-ink) 25%, transparent) 50%, transparent 62%, color-mix(in srgb, var(--nt-ink) 25%, transparent) 62%, transparent 74%); }

/* ── Projektin kooste (Projektitiedot → Kooste): Lista + Taulu ── */
.pv-root { display: flex; flex-direction: column; gap: 10px; min-height: 0; container-type: inline-size; font-size: 13px; color: var(--color-text);
    --pv-d: #c62828; --pv-w: #b26a00; --pv-i: var(--color-primary);
    --cork1: #c8a372; --cork2: #b98f5c; --cork3: #d6b386; --frame: #7a5a35; --paper: #fffdf8; --paper-ink: #1f2633; --paper-muted: #6a6f78;
    --pin: #3a3f47; --pin-hi: #8a919c; --pv-shadow: 0 1px 1px rgba(40, 25, 10, .18), 0 6px 14px rgba(40, 25, 10, .22); }
:root[data-theme="dark"] .pv-root { --pv-d: #ff7b72; --pv-w: #f0b45a;
    --cork1: #4a3a28; --cork2: #3f3122; --cork3: #57442e; --frame: #2b2117; --paper: #f3efe6; --paper-ink: #1f2633; --paper-muted: #5f646d;
    --pin: #c9ced6; --pin-hi: #ffffff; --pv-shadow: 0 1px 1px rgba(0, 0, 0, .4), 0 8px 18px rgba(0, 0, 0, .45); }
.pv-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pv-seg { display: inline-flex; border: 1px solid var(--color-border); border-radius: 8px; overflow: hidden; }
.pv-seg button { border: 0; background: transparent; color: var(--color-text-muted); padding: 4px 14px; font: inherit; font-size: 12px; cursor: pointer; }
.pv-seg button + button { border-left: 1px solid var(--color-border); }
.pv-seg button.on { background: var(--color-text); color: var(--color-surface); font-weight: 650; }
.pv-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--color-border); border-radius: 7px; padding: 4px 10px;
    background: var(--color-surface); color: var(--color-text); font: inherit; font-size: 12px; cursor: pointer; }
.pv-btn:hover { border-color: var(--color-primary); }
.pv-btn-pri { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.pv-hint { font-size: 11.5px; color: var(--color-text-muted); }
.pv-laps-wrap { position: relative; }
.pv-laps-menu { left: 0; min-width: 240px; }
.pv-lap-check { border-top: 0; margin: 0; }
.pv-loading, .pv-muted { color: var(--color-text-muted); }
.pv-loading { padding: 24px 4px; }
.pv-tw { color: var(--pv-w) !important; font-weight: 700; }
.pv-td { color: var(--pv-d) !important; font-weight: 700; }
.pv-ti { color: var(--pv-i) !important; }

/* Lista */
.pv-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 6px 2px 12px; border-bottom: 1px solid var(--color-border); }
.pv-name { font-size: 19px; font-weight: 750; letter-spacing: -.01em; }
.pv-sub { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--color-text-muted); font-size: 12px; margin-top: 3px; }
.pv-head-r { display: flex; align-items: center; gap: 16px; }
.pv-ring { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; flex: none;
    background: conic-gradient(var(--color-primary) calc(var(--p) * 1%), color-mix(in srgb, var(--color-text) 12%, transparent) 0); }
.pv-ring i { width: 42px; height: 42px; border-radius: 50%; background: var(--color-surface); display: grid; place-items: center; font-style: normal;
    font-weight: 800; font-size: 12px; font-variant-numeric: tabular-nums; }
.pv-kv { display: flex; flex-direction: column; font-size: 11.5px; color: var(--color-text-muted); }
.pv-kv b { color: var(--color-text); font-size: 13px; }
.pv-attn { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--color-border); }
.pv-attn-l { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--color-text-muted); margin-right: 4px; }
.pv-pill { border: 1px solid var(--color-border); border-radius: 999px; padding: 2px 10px; font: inherit; font-size: 12px; background: transparent; color: var(--color-text); cursor: pointer; }
.pv-pill.pv-d { color: var(--pv-d); border-color: color-mix(in srgb, var(--pv-d) 45%, transparent); font-weight: 650; }
.pv-pill.pv-w { color: var(--pv-w); border-color: color-mix(in srgb, var(--pv-w) 45%, transparent); font-weight: 650; }
.pv-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: 22px; }
.pv-main { display: flex; flex-direction: column; min-width: 0; }
.pv-sec { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto 14px; gap: 10px; align-items: center; text-align: left; width: 100%;
    border: 0; border-bottom: 1px solid var(--color-border-light, var(--color-border)); background: transparent; color: inherit; padding: 10px 4px; font: inherit; cursor: pointer; }
.pv-sec:hover { background: color-mix(in srgb, var(--color-text) 3.5%, transparent); }
.pv-ic { color: var(--color-text-muted); display: inline-flex; }
.pv-sec-c { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pv-sec-t { font-weight: 650; }
.pv-n { color: var(--color-text-muted); font-weight: 500; font-size: 12px; margin-left: 4px; }
.pv-sec-s { color: var(--color-text-muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-sec-s b { color: var(--color-text); font-weight: 600; }
.pv-sec-r { font-size: 11.5px; color: var(--color-text-muted); white-space: nowrap; }
.pv-chev { color: var(--color-text-muted); }
.pv-thumbs { display: flex; gap: 4px; margin-top: 2px; }
.pv-thumbs img { width: 44px; height: 33px; object-fit: cover; border-radius: 4px; }
.pv-side { border-left: 1px solid var(--color-border); padding-left: 18px; min-width: 0; }
.pv-side h3 { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--color-text-muted); margin: 10px 0 8px; }
.pv-tl { display: grid; grid-template-columns: 62px 8px minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 4px 0; font-size: 12.5px; }
.pv-tl small { display: block; color: var(--color-text-muted); font-size: 11.5px; }
.pv-when { color: var(--color-text-muted); font-size: 11.5px; white-space: nowrap; }
.pv-dot { width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--color-text) 30%, transparent); }
.pv-k-photos, .pv-k-done { background: var(--color-primary); }
.pv-k-offer { background: var(--pv-w); }
.pv-pp { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 12.5px; }
.pv-pp small { color: var(--color-text-muted); }
.pv-av { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; flex: none;
    background: color-mix(in srgb, var(--color-text) 10%, transparent); }

/* Taulu (ilmoitustaulu) */
.pv-board { border-radius: 6px; padding: 26px 24px 30px;
    background: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, .07) 0 1px, transparent 1.5px) 0 0/7px 7px,
                radial-gradient(circle at 70% 60%, rgba(0, 0, 0, .08) 0 1px, transparent 1.6px) 0 0/9px 9px,
                radial-gradient(ellipse at 30% 20%, var(--cork3), transparent 60%),
                linear-gradient(135deg, var(--cork1), var(--cork2));
    box-shadow: inset 0 0 0 10px var(--frame), inset 0 0 22px 12px rgba(0, 0, 0, .25); }
.pv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(225px, 1fr)); gap: 26px 22px; grid-auto-flow: dense; align-items: start; }
.pv-lap { position: relative; background: var(--paper); color: var(--paper-ink); padding: 22px 16px 12px; box-shadow: var(--pv-shadow); border-radius: 2px;
    transform: rotate(var(--r, 0deg)); transition: transform .15s ease, box-shadow .15s ease; cursor: grab; min-width: 0; font-size: 12.5px; }
.pv-lap:hover { transform: rotate(0deg) translateY(-3px); box-shadow: 0 2px 2px rgba(40, 25, 10, .18), 0 14px 26px rgba(40, 25, 10, .28); z-index: 2; }
.pv-lap::before { content: ""; position: absolute; top: 7px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, var(--pin-hi), var(--pin) 60%); box-shadow: 0 2px 3px rgba(0, 0, 0, .45); }
.pv-lap.pv-alarm::before { background: radial-gradient(circle at 35% 30%, #ff9b9b, #c62828 60%); }
.pv-lap.pv-tape::before { top: -9px; width: 70px; height: 20px; margin-left: -35px; border-radius: 2px; background: rgba(255, 255, 255, .55); box-shadow: none; transform: rotate(-2deg); }
.pv-lap.pv-note { background: var(--nt-paper); color: var(--nt-ink); }
.pv-lap.pv-w2 { grid-column: span 2; }
.pv-lap.pv-dragging { opacity: .45; }
.pv-lap.pv-drop-before { box-shadow: -6px 0 0 -2px var(--color-primary), var(--pv-shadow); }
.pv-lap.pv-drop-after { box-shadow: 6px 0 0 -2px var(--color-primary), var(--pv-shadow); }
.pv-lap-hide { position: absolute; top: 5px; right: 6px; width: 20px; height: 20px; border: 0; background: transparent; color: var(--paper-muted);
    border-radius: 4px; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .12s; padding: 0; }
.pv-lap:hover .pv-lap-hide { opacity: 1; }
.pv-lap.pv-note .pv-lap-hide { color: inherit; }
.pv-lh { display: flex; align-items: center; gap: 7px; font-weight: 750; font-size: 13.5px; margin-bottom: 8px; }
.pv-c { margin-left: auto; font-weight: 600; font-size: 11.5px; color: var(--paper-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pv-lr { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-top: 1px dashed rgba(60, 50, 30, .18); font-size: 12.5px; min-width: 0; }
.pv-lr:first-of-type { border-top: 0; }
.pv-lr span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-lr span:last-child { color: var(--paper-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pv-lr .pv-td { color: #c62828 !important; }
.pv-lr .pv-tw { color: #a35d00 !important; }
.pv-lr-btn { width: 100%; background: transparent; border-left: 0; border-right: 0; border-bottom: 0; color: inherit; font: inherit; cursor: pointer; text-align: left; font-weight: 600; }
.pv-more { margin-top: 8px; font-size: 11.5px; font-weight: 650; color: #2563eb; background: none; border: 0; padding: 0; cursor: pointer; }
.pv-note .pv-more { color: inherit; text-decoration: underline; }
.pv-empty { color: var(--paper-muted); font-size: 12px; }
.pv-big { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.pv-big-t { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.pv-big-s { color: var(--paper-muted); font-size: 12.5px; display: flex; flex-direction: column; gap: 1px; margin-top: 3px; }
.pv-big-k { display: flex; gap: 18px; margin-top: 10px; font-size: 12px; color: var(--paper-muted); flex-wrap: wrap; }
.pv-big-k b { display: block; color: var(--paper-ink); font-size: 13px; }
.pv-lap .pv-ring { --c: #2563eb; background: conic-gradient(#2563eb calc(var(--p) * 1%), rgba(60, 50, 30, .15) 0); width: 62px; height: 62px; }
.pv-lap .pv-ring i { background: var(--paper); width: 48px; height: 48px; }
.pv-hand { white-space: pre-line; font-size: 12.5px; line-height: 1.45; max-height: 9.5em; overflow: hidden; }
.pv-note-img { width: 100%; max-height: 120px; object-fit: cover; border-radius: 2px; margin-bottom: 6px; display: block; }
.pv-gantt { display: flex; flex-direction: column; gap: 5px; margin-top: 2px; margin-bottom: 4px; }
.pv-gr { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 8px; align-items: center; font-size: 11.5px; }
.pv-gr > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-bar { height: 9px; border-radius: 3px; background: rgba(60, 50, 30, .12); position: relative; }
.pv-bar i { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: #5b7fbf; }
.pv-bar i.now { background: #2563eb; }
.pv-bar b { position: absolute; top: -3px; bottom: -3px; width: 2px; background: #c62828; }
.pv-lap.pv-photos { background: transparent; box-shadow: none; padding: 16px 0 0; }
.pv-lap.pv-photos::before { display: none; }
.pv-lap.pv-photos > .pv-lh { color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); padding: 0 2px; }
.pv-lap.pv-photos > .pv-lh .pv-c { color: rgba(255, 255, 255, .85); }
.pv-lap.pv-photos > .pv-more { color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.pv-lap.pv-photos .pv-lap-hide { color: #fff; }
.pv-pols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 2px; }
.pv-pol { background: #fff; padding: 8px 8px 22px; box-shadow: var(--pv-shadow); transform: rotate(var(--r, 0deg)); position: relative; min-width: 0; }
.pv-pol img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.pv-pol span { position: absolute; bottom: 4px; left: 8px; right: 8px; font-size: 10.5px; color: #555; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-pol::before { content: ""; position: absolute; top: -5px; left: 50%; width: 11px; height: 11px; margin-left: -5px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, var(--pin-hi), var(--pin) 60%); box-shadow: 0 2px 3px rgba(0, 0, 0, .45); }
.pv-tlb > div { padding: 3px 0; border-top: 1px dashed rgba(60, 50, 30, .18); font-size: 12px; }
.pv-tlb > div:first-child { border-top: 0; }
.pv-tlb span { display: inline-block; min-width: 54px; color: var(--paper-muted); font-size: 11px; }
.pv-lap .pv-pp small { color: var(--paper-muted); }
.pv-lap .pv-av { background: rgba(60, 50, 30, .12); }
.pv-ghost { border: 2px dashed rgba(255, 255, 255, .55); border-radius: 4px; min-height: 110px; display: grid; place-items: center; color: rgba(255, 255, 255, .92);
    font-weight: 650; text-shadow: 0 1px 2px rgba(0, 0, 0, .4); background: transparent; font: inherit; font-weight: 650; cursor: pointer; }
.pv-ghost:hover { background: rgba(255, 255, 255, .08); }

@container (max-width: 760px) {
    .pv-body { grid-template-columns: minmax(0, 1fr); }
    .pv-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--color-border); }
    .pv-lap.pv-w2 { grid-column: auto; }
    .pv-head { grid-template-columns: minmax(0, 1fr); }
    .pv-sec-r { display: none; }
}
@media (prefers-reduced-motion: reduce) { .pv-lap, .pv-lap:hover { transition: none; transform: none; } }
