/* ---- shell (shared ConvertICO viewer design system, copied per tool) ---- */
.icv-root {
    --icv-accent: #3399cc;
    --icv-accent-strong: #237a9f;
    --icv-accent-soft: rgba(51, 153, 204, 0.09);
    --icv-accent-line: rgba(51, 153, 204, 0.45);
    --icv-go: #237a9f;
    --icv-go-hover: #1b6183;
    --icv-card: var(--bg-elevated, #fff);
    --icv-sunk: var(--card-tertiary, #f1f5f9);
    --icv-open: var(--card-secondary, #f8f9fa);
    --icv-line: var(--border-color, #e2e8f0);
    --icv-text-1: var(--text-primary, #1e293b);
    --icv-text-2: var(--text-secondary, #555);
    --icv-muted: var(--text-muted, #64748b);
    --icv-warn: #b45309;
    --icv-red: #c23b3b;
    --icv-red-soft: rgba(230, 78, 78, 0.08);
    --icv-red-line: rgba(230, 78, 78, 0.35);
    --icv-mono: ui-monospace, "Cascadia Mono", SFMono-Regular, Menlo, Consolas, "DejaVu Sans Mono", "Liberation Mono", monospace;
    /* text surface */
    --icv-bg: #ffffff;
    --icv-fg: #1f2937;
    --icv-gut: #f6f8fa;
    --icv-gut-t: #94a3b8;
    --icv-gut-line: #e5e7eb;
    --icv-ws: #c0c7d2;
    --icv-ts: #0f7a8a;
    --icv-e: #c62828;
    --icv-w: #b45309;
    --icv-i: #1d6fa5;
    --icv-d: #8a94a6;
}
[data-theme="dark"] .icv-root {
    --icv-accent: #60a5fa;
    --icv-accent-strong: #93c5fd;
    --icv-accent-soft: rgba(96, 165, 250, 0.12);
    --icv-accent-line: rgba(96, 165, 250, 0.45);
    --icv-go: #2563eb;
    --icv-go-hover: #1d4ed8;
    --icv-sunk: #172033;
    --icv-open: #1a2438;
    --icv-warn: #fbbf24;
    --icv-red: #f87171;
    --icv-red-soft: rgba(248, 113, 113, 0.1);
    --icv-red-line: rgba(248, 113, 113, 0.4);
    --icv-bg: #0f172a;
    --icv-fg: #e2e8f0;
    --icv-gut: #131c30;
    --icv-gut-t: #64748b;
    --icv-gut-line: #24314a;
    --icv-ws: #475569;
    --icv-ts: #5eead4;
    --icv-e: #f87171;
    --icv-w: #fbbf24;
    --icv-i: #7dd3fc;
    --icv-d: #7c8aa3;
}

.icv-root.tool-container { max-width: 1100px; margin: 0 auto; padding: 2rem; }
.icv-root [hidden] { display: none !important; }
.icv-root .icv-main { background: none; border: none; box-shadow: none; border-radius: 0; overflow: visible; padding: 0; }
.icv-root button { font: inherit; }
.icv-root code { font-family: var(--icv-mono); font-size: 0.86em; padding: 0.05rem 0.35rem; border-radius: 5px; background: var(--icv-sunk); }
.icv-root kbd {
    display: inline-block; padding: 0.05rem 0.4rem; border-radius: 5px; border: 1px solid var(--icv-line); border-bottom-width: 2px;
    background: var(--icv-card); font: 600 0.78em var(--icv-mono); color: var(--icv-text-1);
}
.icv-root .icv-muted { color: var(--icv-muted); font-weight: 500; }
.icv-root :focus-visible { outline: 3px solid var(--icv-accent-line); outline-offset: 2px; }

/* ---------- title ---------- */
.icv-root .tool-header { text-align: center; margin-bottom: 1.75rem; }
.icv-root .icv-title-row { display: flex; align-items: center; justify-content: center; gap: 0.9rem; margin-bottom: 0.9rem; }
.icv-root .icv-title-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--icv-accent); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
[data-theme="dark"] .icv-root .icv-title-icon { color: #0b1e33; }
.icv-root .icv-title-icon svg { width: 30px; height: 30px; display: block; }
.icv-root .tool-title { margin: 0; font-size: 2rem; font-weight: 700; color: var(--icv-accent); line-height: 1.2; }
.icv-root .tool-description { max-width: 800px; margin: 0 auto; font-size: 1.05rem; line-height: 1.65; color: var(--icv-text-2); }
.icv-root .tool-description a { color: var(--icv-accent-strong); font-weight: 500; }
[data-theme="dark"] .icv-root .tool-description a { color: var(--icv-accent); }

/* ---------- error ---------- */
.icv-root .icv-error { display: flex; align-items: flex-start; gap: 0.7rem; margin: 0 0 1rem; padding: 0.9rem 1rem; border-radius: 12px; border: 1px solid var(--icv-red-line); background: var(--icv-red-soft); color: var(--icv-text-1); }
.icv-root .icv-error > svg { width: 20px; height: 20px; color: #e64e4e; flex-shrink: 0; margin-top: 2px; }
.icv-root .icv-error > div { flex: 1; min-width: 0; }
.icv-root .icv-error p { margin: 0; font-size: 0.92rem; line-height: 1.55; overflow-wrap: anywhere; }
.icv-root .icv-error p + p { margin-top: 0.3rem; color: var(--icv-muted); font-size: 0.86rem; }
.icv-root .icv-error a { color: var(--icv-red); font-weight: 600; }
.icv-root .icv-error-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.55rem; }
.icv-root .icv-x { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex-shrink: 0; border: none; border-radius: 8px; background: none; color: var(--icv-muted); cursor: pointer; padding: 0; margin: 0; }
.icv-root .icv-x:hover { background: rgba(100, 116, 139, 0.12); color: var(--icv-text-1); }
.icv-root .icv-x svg { width: 17px; height: 17px; }

/* ---------- cards ---------- */
.icv-root .icv-card { background: var(--icv-card); border: 1px solid var(--icv-line); border-radius: 20px; padding: 1.25rem; box-shadow: var(--shadow-sm); margin-bottom: 1.25rem; min-width: 0; }
.icv-root .icv-caption { display: inline-flex; align-items: center; gap: 0.35rem; margin: 0 0 0.45rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--icv-muted); }
.icv-root .icv-caption svg { width: 14px; height: 14px; }

/* ---------- buttons ---------- */
.icv-root .icv-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; width: auto; min-height: 44px; padding: 0.6rem 1.1rem; margin: 0;
    border-radius: 12px; border: 1px solid transparent; font-size: 0.95rem; font-weight: 700; cursor: pointer; white-space: nowrap; text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.icv-root .icv-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.icv-root .icv-go { background: var(--icv-go); color: #fff; }
.icv-root .icv-go:hover:not(:disabled) { background: var(--icv-go-hover); color: #fff; }
.icv-root .icv-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.icv-root .icv-btn-lg { min-height: 50px; padding: 0.65rem 1.5rem; font-size: 1rem; }
.icv-root .icv-btn-sm { min-height: 36px; padding: 0.4rem 0.8rem; font-size: 0.85rem; border-radius: 10px; }
.icv-root .icv-btn-sm svg { width: 16px; height: 16px; }
.icv-root .icv-btn-ghost { background: var(--icv-sunk); color: var(--icv-text-2); border-color: var(--icv-line); }
.icv-root .icv-btn-ghost:hover:not(:disabled) { color: var(--icv-text-1); border-color: var(--icv-accent-line); }
.icv-root .icv-text-btn { display: inline-flex; align-items: center; gap: 0.35rem; width: auto; padding: 0.35rem 0.6rem; margin: 0; border: none; border-radius: 8px; background: none; color: var(--icv-accent-strong); font-size: 0.85rem; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none; }
[data-theme="dark"] .icv-root .icv-text-btn { color: var(--icv-accent); }
.icv-root .icv-text-btn:hover:not(:disabled) { background: var(--icv-accent-soft); }
.icv-root .icv-text-btn svg { width: 15px; height: 15px; }
.icv-root .icv-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; margin: 0; border: none; border-radius: 7px; background: none; color: var(--icv-text-2); cursor: pointer; flex-shrink: 0; }
.icv-root .icv-icon-btn:hover:not(:disabled) { background: var(--icv-accent-soft); color: var(--icv-text-1); }
.icv-root .icv-icon-btn:disabled { opacity: 0.35; cursor: default; }
.icv-root .icv-icon-btn svg { width: 16px; height: 16px; }
.icv-root .icv-seg-btn { display: inline-flex; align-items: center; gap: 0.4rem; width: auto; min-height: 36px; padding: 0.35rem 0.85rem; margin: 0; border-radius: 999px; border: 1px solid var(--icv-line); background: var(--icv-card); color: var(--icv-text-2); font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.icv-root .icv-seg-btn svg { width: 15px; height: 15px; color: var(--icv-accent); }
.icv-root .icv-seg-btn:hover { border-color: var(--icv-accent-line); color: var(--icv-text-1); }
.icv-root .icv-chip { display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; width: auto; min-height: 34px; padding: 0.3rem 0.55rem; margin: 0; border-radius: 9px; border: 1px solid var(--icv-line); background: var(--icv-card); color: var(--icv-text-2); font-size: 0.8rem; font-weight: 700; cursor: pointer; min-width: 0; }
.icv-root .icv-chip:hover { border-color: var(--icv-accent-line); }
.icv-root .icv-chip.is-active { border-color: var(--icv-accent); background: var(--icv-accent-soft); color: var(--icv-accent-strong); }
[data-theme="dark"] .icv-root .icv-chip.is-active { color: var(--icv-accent); }
.icv-root .icv-chip svg { width: 15px; height: 15px; }
.icv-root .icv-quick { display: grid; gap: 0.35rem; }
.icv-root .icv-quick > * { min-width: 0; }
.icv-root .icv-quick-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.icv-root .icv-quick-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.icv-root .icv-quick-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.icv-root .icv-sub { margin: 0.75rem 0 0.35rem; font-size: 0.78rem; font-weight: 700; color: var(--icv-text-2); }
.icv-root .icv-sub:first-child { margin-top: 0.2rem; }

/* ---------- upload ---------- */
.icv-root .icv-drop {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.35rem; text-align: center; min-height: 180px; padding: 1.5rem 1.25rem;
    border-radius: 16px; border: 2px dashed var(--icv-accent-line); background: var(--icv-accent-soft); cursor: pointer; color: var(--icv-muted); font-size: 0.86rem; line-height: 1.5;
    transition: border-color 0.15s, background 0.15s; box-sizing: border-box; margin: 0;
}
.icv-root .icv-drop:hover, .icv-root .icv-drop.is-drag { border-color: var(--icv-accent); background: rgba(51, 153, 204, 0.14); }
.icv-root .icv-drop:focus-within { outline: 3px solid var(--icv-accent-soft); }
.icv-root .icv-drop strong { font-size: 1.08rem; color: var(--icv-text-1); }
.icv-root .icv-drop-link { color: var(--icv-accent-strong); text-decoration: underline; text-underline-offset: 3px; }
[data-theme="dark"] .icv-root .icv-drop-link { color: var(--icv-accent); }
.icv-root .icv-drop-icon { width: 58px; height: 58px; border-radius: 16px; display: flex; align-items: center; justify-content: center; margin-bottom: 0.35rem; background: var(--icv-card); color: var(--icv-accent); border: 1px solid var(--icv-line); }
.icv-root .icv-drop-icon svg { width: 28px; height: 28px; }
.icv-root .icv-types { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3rem; margin-top: 0.35rem; max-width: 560px; }
.icv-root .icv-types span { padding: 0.05rem 0.45rem; border-radius: 6px; background: var(--icv-card); border: 1px solid var(--icv-line); font: 600 0.72rem var(--icv-mono); color: var(--icv-text-2); }
.icv-root .icv-textarea { display: block; width: 100%; min-height: 130px; max-height: 60vh; resize: vertical; box-sizing: border-box; margin: 0; padding: 0.75rem 0.85rem; border-radius: 12px; border: 1px solid var(--icv-line); background: var(--input-bg, #fff); color: var(--icv-text-1); font: 0.86rem/1.55 var(--icv-mono); tab-size: 4; }
.icv-root .icv-textarea:focus { outline: none; border-color: var(--icv-accent); box-shadow: 0 0 0 3px var(--icv-accent-soft); }
.icv-root .icv-kbd-hint { margin-left: auto; font-size: 0.76rem; color: var(--icv-muted); }
.icv-root .icv-samples { margin-top: 1rem; }
.icv-root .icv-sample-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.icv-root .icv-under { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem 0.6rem; margin-top: 1rem; }
.icv-root .icv-pill { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.22rem 0.65rem; border-radius: 999px; background: var(--icv-sunk); border: 1px solid var(--icv-line); font-size: 0.78rem; font-weight: 600; color: var(--icv-text-2); }
.icv-root .icv-pill svg { width: 14px; height: 14px; color: var(--icv-accent); }

/* page-wide drop overlay */
.icv-root .icv-overlay { position: fixed; inset: 0; z-index: 10004; display: flex; align-items: center; justify-content: center; background: rgba(15, 23, 42, 0.45); pointer-events: none; }
.icv-root .icv-overlay-box { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 2rem 2.5rem; border-radius: 20px; border: 2px dashed var(--icv-accent); background: var(--icv-card); color: var(--icv-text-1); font-weight: 700; font-size: 1.1rem; }
.icv-root .icv-overlay-box svg { width: 36px; height: 36px; color: var(--icv-accent); }

/* ---------- progress ---------- */
.icv-root .icv-prog { padding: 1rem 1.1rem; }
.icv-root .icv-prog-top { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; }
.icv-root .icv-prog-top .icv-btn { margin-left: auto; }
.icv-root .icv-loader { display: block; width: 40px; height: 40px; flex-shrink: 0; overflow: visible; --cico-outer: #f2534e; --cico-outer-soft: #f8d3d1; --cico-mid: #31ae77; --cico-mid-soft: #d0e7dd; --cico-inner: #2b9edb; }
[data-theme="dark"] .icv-root .icv-loader { --cico-outer-soft: rgba(242, 83, 78, 0.22); --cico-mid-soft: rgba(49, 174, 119, 0.22); }
.icv-root .icv-loader circle { fill: none; stroke-width: 72; transform-box: fill-box; transform-origin: center; }
.icv-root .icv-loader .bp { stroke: var(--cico-outer-soft); }
.icv-root .icv-loader .gp { stroke: var(--cico-mid-soft); }
.icv-root .icv-loader .b { stroke: var(--cico-outer); stroke-linecap: round; stroke-dasharray: 35.3 100; animation: icvSpinL 1.3s linear infinite; }
.icv-root .icv-loader .g { stroke: var(--cico-mid); stroke-linecap: round; stroke-dasharray: 75.8 100; animation: icvSpinR 2.1s linear infinite; }
.icv-root .icv-loader .r { stroke: var(--cico-inner); animation: icvBreathe 1.3s ease-in-out infinite; }
@keyframes icvSpinL { from { transform: rotate(117deg); } to { transform: rotate(-243deg); } }
@keyframes icvSpinR { from { transform: rotate(36deg); } to { transform: rotate(396deg); } }
@keyframes icvBreathe { 50% { transform: scale(0.9); } }
@media (prefers-reduced-motion: reduce) {
    .icv-root .icv-loader .b { animation-duration: 4s; }
    .icv-root .icv-loader .g { animation-duration: 6s; }
    .icv-root .icv-loader .r { animation: none; }
}
.icv-root .icv-stages { display: flex; align-items: center; flex-wrap: wrap; row-gap: 0.4rem; }
.icv-root .icv-stage { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; font-weight: 700; color: var(--icv-muted); }
.icv-root .icv-dot { display: inline-flex; align-items: center; justify-content: center; padding: 6px; border-radius: 50%; background: var(--icv-card); border: 1px solid var(--icv-line); color: var(--icv-muted); }
.icv-root .icv-dot svg { width: 18px; height: 18px; display: block; }
.icv-root .icv-stage.active { color: var(--icv-text-1); }
.icv-root .icv-stage.active .icv-dot { background: var(--icv-go); border-color: var(--icv-go); color: #fff; }
.icv-root .icv-stage.done .icv-dot { background: #339966; border-color: #339966; color: #fff; }
.icv-root .icv-stage-line { width: 28px; height: 2px; margin: 0 0.5rem; border-radius: 2px; background: var(--icv-line); flex-shrink: 0; }
.icv-root .icv-stage-line.done { background: #339966; }
.icv-root .icv-prog-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; margin-top: 0.85rem; }
.icv-root .icv-prog-text { font-size: 0.86rem; color: var(--icv-text-2); min-width: 0; overflow-wrap: anywhere; }
.icv-root .icv-prog-pct { font-size: 0.95rem; font-weight: 800; color: var(--icv-text-1); font-variant-numeric: tabular-nums; }
.icv-root .icv-bar { position: relative; height: 8px; margin-top: 0.5rem; border-radius: 999px; background: var(--icv-line); overflow: hidden; }
.icv-root .icv-bar-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--icv-go); border-radius: 999px; transition: width 0.2s; }

/* ---------- viewer head ---------- */
.icv-root .icv-filehead { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.icv-root .icv-fileicon { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--icv-accent-soft); color: var(--icv-accent); }
.icv-root .icv-fileicon svg { width: 22px; height: 22px; }
.icv-root .icv-filetext { flex: 1; min-width: 0; }
.icv-root .icv-filetext strong { display: block; font-size: 1.02rem; color: var(--icv-text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icv-root .icv-filetext span { display: block; font-size: 0.82rem; color: var(--icv-muted); }
.icv-root .icv-badges { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.icv-root .icv-badge { display: inline-flex; align-items: center; gap: 0.35rem; width: auto; margin: 0; padding: 0.25rem 0.7rem; border-radius: 999px; font-size: 0.8rem; font-weight: 700; white-space: nowrap; background: var(--icv-accent-soft); border: 1px solid var(--icv-accent-line); color: var(--icv-accent-strong); cursor: pointer; }
[data-theme="dark"] .icv-root .icv-badge { color: var(--icv-accent); }
.icv-root .icv-badge svg { width: 14px; height: 14px; }
.icv-root .icv-badge.is-plain { cursor: default; background: var(--icv-sunk); border-color: var(--icv-line); color: var(--icv-text-2); }
.icv-root .icv-badge.is-edit { cursor: default; background: rgba(217, 119, 6, 0.1); border-color: rgba(217, 119, 6, 0.4); color: var(--icv-warn); }

/* notes */
.icv-root .icv-notes { display: grid; gap: 0.5rem; margin-top: 0.75rem; }
.icv-root .icv-note { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.65rem 0.9rem; border-radius: 12px; font-size: 0.86rem; line-height: 1.5; color: var(--icv-text-1); background: rgba(51, 153, 204, 0.08); border: 1px solid rgba(51, 153, 204, 0.3); }
.icv-root .icv-note.is-warn { background: rgba(217, 119, 6, 0.08); border-color: rgba(217, 119, 6, 0.35); }
.icv-root .icv-note > svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; color: var(--icv-accent); }
.icv-root .icv-note.is-warn > svg { color: var(--icv-warn); }
.icv-root .icv-note > div { flex: 1; min-width: 0; }
.icv-root .icv-note p { margin: 0; overflow-wrap: anywhere; }
.icv-root .icv-note a { color: var(--icv-accent-strong); font-weight: 600; }
[data-theme="dark"] .icv-root .icv-note a { color: var(--icv-accent); }
.icv-root .icv-alts { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.45rem; align-items: center; }

/* stats */
.icv-root .icv-stats { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.75rem; }
.icv-root .icv-stat { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.22rem 0.6rem; border-radius: 999px; background: var(--icv-sunk); border: 1px solid var(--icv-line); font-size: 0.78rem; color: var(--icv-text-2); max-width: 100%; }
.icv-root .icv-stat svg { width: 14px; height: 14px; color: var(--icv-accent); flex-shrink: 0; }
.icv-root .icv-stat strong { color: var(--icv-text-1); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.icv-root .icv-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }

/* ---------- toolbar ---------- */
.icv-root .icv-toolbar { position: relative; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }
.icv-root .icv-search { flex: 1; min-width: 260px; display: flex; align-items: center; gap: 0.2rem; height: 42px; padding: 0 0.3rem 0 0.7rem; border-radius: 10px; border: 1px solid var(--icv-line); background: var(--input-bg, #fff); box-sizing: border-box; }
.icv-root .icv-search:focus-within { border-color: var(--icv-accent); box-shadow: 0 0 0 3px var(--icv-accent-soft); }
.icv-root .icv-search > svg { width: 16px; height: 16px; color: var(--icv-muted); flex-shrink: 0; }
.icv-root .icv-search input { flex: 1; min-width: 0; width: auto; height: 100%; border: none; background: none; outline: none; box-shadow: none; color: var(--icv-text-1); font-size: 0.9rem; padding: 0 0 0 0.4rem; margin: 0; }
.icv-root .icv-search-count { font-size: 0.76rem; color: var(--icv-muted); white-space: nowrap; font-variant-numeric: tabular-nums; max-width: 210px; overflow: hidden; text-overflow: ellipsis; }
.icv-root .icv-select { width: 100%; height: 40px; max-width: 100%; min-width: 0; padding: 0 0.6rem; margin: 0; border-radius: 9px; border: 1px solid var(--icv-line); background: var(--input-bg, #fff); color: var(--icv-text-1); font-size: 0.88rem; box-sizing: border-box; }

/* log bar */
.icv-root .icv-segs { display: inline-flex; flex-wrap: wrap; padding: 0.15rem; gap: 0.15rem; border-radius: 9px; background: var(--icv-sunk); border: 1px solid var(--icv-line); max-width: 100%; }
.icv-root .icv-segs button { display: inline-flex; align-items: center; gap: 0.3rem; width: auto; min-height: 30px; padding: 0.15rem 0.6rem; margin: 0; border: none; border-radius: 7px; background: none; color: var(--icv-muted); font-size: 0.8rem; font-weight: 700; cursor: pointer; }
.icv-root .icv-segs button:hover:not(:disabled) { color: var(--icv-text-1); }
.icv-root .icv-segs button:disabled { opacity: 0.45; cursor: default; }
.icv-root .icv-segs button.is-active { background: var(--icv-card); color: var(--icv-accent-strong); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
[data-theme="dark"] .icv-root .icv-segs button.is-active { color: var(--icv-accent); background: #26334a; }

/* ---------- options (collapsed rows) ---------- */
.icv-root .icv-adv { border: 1px solid var(--icv-line); border-radius: 12px; overflow: hidden; background: var(--icv-card); margin-top: 0.75rem; }
.icv-root .icv-adv-row + .icv-adv-row { border-top: 1px solid var(--icv-line); }
.icv-root .icv-adv-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; width: 100%; min-height: 52px; box-sizing: border-box; padding: 0.55rem 1rem; margin: 0; border: none; background: none; cursor: pointer; text-align: left; color: var(--icv-text-1); font-weight: 400; }
.icv-root .icv-adv-left { display: flex; align-items: center; gap: 0.65rem; min-width: 0; }
.icv-root .icv-adv-left > svg { width: 18px; height: 18px; color: var(--icv-accent); flex-shrink: 0; }
.icv-root .icv-adv-text { display: flex; flex-direction: column; min-width: 0; }
.icv-root .icv-adv-title { font-size: 0.9rem; font-weight: 700; }
.icv-root .icv-adv-hint { font-size: 0.76rem; color: var(--icv-muted); line-height: 1.35; }
.icv-root .icv-adv-right { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.icv-root .icv-adv-value { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0.2rem 0.55rem; border-radius: 999px; background: var(--icv-accent-soft); color: var(--icv-accent-strong); font-size: 0.76rem; font-weight: 700; }
[data-theme="dark"] .icv-root .icv-adv-value { color: var(--icv-accent); }
.icv-root .icv-chevron { width: 17px; height: 17px; color: var(--icv-muted); transition: transform 0.2s; }
.icv-root .icv-adv-row.open .icv-chevron { transform: rotate(180deg); }
.icv-root .icv-adv-row.open .icv-adv-head, .icv-root .icv-adv-row.open .icv-adv-body { background: var(--icv-open); }
.icv-root .icv-adv-body { padding: 0.2rem 1rem 1rem; }
.icv-root .icv-adv-note { margin: 0.5rem 0 0; font-size: 0.78rem; color: var(--icv-muted); line-height: 1.45; }
.icv-root .icv-switch-text { font-size: 0.74rem; font-weight: 800; color: var(--icv-muted); min-width: 26px; text-align: right; }
/* switch - beats the global .tool-container checkbox rules */
.tool-container.icv-root input[type="checkbox"].icv-switch {
    -webkit-appearance: none !important; appearance: none !important; position: relative; flex-shrink: 0;
    width: 40px !important; height: 22px !important; margin: 0 !important; padding: 0 !important;
    border: none !important; border-radius: 999px !important; background: #cbd5e1 !important; box-shadow: none !important; cursor: pointer; transition: background 0.2s;
}
[data-theme="dark"] .tool-container.icv-root input[type="checkbox"].icv-switch { background: #475569 !important; }
.tool-container.icv-root input[type="checkbox"].icv-switch::after, .tool-container.icv-root input[type="checkbox"].icv-switch:checked::after {
    content: '' !important; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
    background: #fff; transform: none !important; transition: left 0.2s; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); font-size: 0; line-height: 0; border: none;
}
.tool-container.icv-root input[type="checkbox"].icv-switch:checked { background: var(--icv-go) !important; }
.tool-container.icv-root input[type="checkbox"].icv-switch:checked::after { left: 21px; }
.tool-container.icv-root input[type="checkbox"].icv-switch:focus-visible { outline: 3px solid var(--icv-accent-line); outline-offset: 2px; }
/* action bar */
.icv-root .icv-actionbar { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--icv-line); }
.icv-root .icv-actionbar .icv-btn-ghost { min-height: 40px; padding: 0.4rem 0.7rem; font-size: 0.86rem; gap: 0.35rem; }
.icv-root .icv-actionbar .icv-btn-ghost svg { width: 16px; height: 16px; }
.icv-root .icv-actionbar .icv-go { margin-left: auto; }
.icv-root .icv-dl-hint { font-weight: 600; font-size: 0.8rem; opacity: 0.85; }

/* toast */
.icv-root .icv-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 10003; max-width: calc(100vw - 32px); box-sizing: border-box; padding: 0.55rem 1rem; border-radius: 10px; background: #1e293b; color: #fff; font-size: 0.86rem; font-weight: 600; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); transition: opacity 0.25s; text-align: center; }
[data-theme="dark"] .icv-root .icv-toast { background: #e2e8f0; color: #0f172a; }
.icv-root .icv-toast.is-out { opacity: 0; }

/* ---------- content ---------- */
.icv-root .icv-info { margin-top: 2rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
.icv-root .icv-info > * { min-width: 0; }
.icv-root .icv-info-card { background: var(--bg-elevated, #fff); border: 1px solid var(--icv-line); border-radius: var(--radius-md, 12px); padding: 1.4rem 1.5rem; }
.icv-root .icv-info-card h2 { display: flex; align-items: center; gap: 0.55rem; margin: 0 0 0.9rem; font-size: 1.25rem; color: var(--icv-text-1); }
.icv-root .icv-info-card h2 svg { width: 22px; height: 22px; color: var(--icv-accent); flex-shrink: 0; }
.icv-root .icv-info-card h3 { margin: 1.2rem 0 0.5rem; font-size: 1.05rem; color: var(--icv-text-1); }
.icv-root .icv-info-card p, .icv-root .icv-info-card li { color: var(--icv-text-2); line-height: 1.65; font-size: 0.97rem; }
.icv-root .icv-info-card p { margin: 0.8rem 0 0; }
.icv-root .icv-info-card h2 + p { margin-top: 0; }
.icv-root .icv-info a { color: var(--icv-accent-strong); font-weight: 500; }
[data-theme="dark"] .icv-root .icv-info a { color: var(--icv-accent); }
.icv-root .icv-steps, .icv-root .icv-list { margin: 0; padding-left: 1.3rem; display: grid; gap: 0.45rem; }
.icv-root .icv-info-card p + .icv-list, .icv-root .icv-info-card p + .icv-steps { margin-top: 0.7rem; }
.icv-root .icv-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.icv-root .icv-feature { padding: 0.9rem 1rem; border-radius: 12px; border: 1px solid var(--icv-line); background: var(--icv-open); min-width: 0; }
.icv-root .icv-feature > svg { width: 20px; height: 20px; color: var(--icv-accent); }
.icv-root .icv-info-card .icv-feature h3 { margin: 0.35rem 0 0.2rem; font-size: 0.95rem; }
.icv-root .icv-info-card .icv-feature p { margin: 0; font-size: 0.88rem; line-height: 1.55; }
.icv-root .icv-table-wrap { overflow-x: auto; border: 1px solid var(--icv-line); border-radius: 10px; margin-top: 0.9rem; }
.icv-root .icv-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 520px; margin: 0; }
.icv-root .icv-table th, .icv-root .icv-table td { padding: 0.6rem 0.8rem; text-align: left; border-bottom: 1px solid var(--icv-line); color: var(--icv-text-2); vertical-align: top; }
.icv-root .icv-table th { background: var(--icv-sunk); color: var(--icv-text-1); font-weight: 700; font-size: 0.82rem; }
.icv-root .icv-table tr:last-child td { border-bottom: none; }
.icv-root .icv-table td:first-child { font-weight: 700; color: var(--icv-text-1); white-space: nowrap; }
.icv-root .icv-keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem 1rem; margin-top: 0.9rem; padding: 0; list-style: none; }
.icv-root .icv-keys li { display: flex; justify-content: space-between; gap: 0.6rem; padding: 0.35rem 0.6rem; border-radius: 8px; background: var(--icv-open); font-size: 0.88rem; min-width: 0; }
.icv-root .icv-keys li span:last-child { text-align: right; white-space: nowrap; }
.icv-root .icv-faq .faq-question svg { width: 18px; height: 18px; flex-shrink: 0; }

.icv-root .icv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* privacy strip */
.icv-root .icv-privacy { display: flex; align-items: center; gap: 0.75rem; max-width: 800px; margin: -0.5rem auto 1.25rem; padding: 0.65rem 1rem; border-radius: 14px; background: rgba(51, 153, 102, 0.08); border: 1px solid rgba(51, 153, 102, 0.35); color: var(--icv-text-1); }
[data-theme="dark"] .icv-root .icv-privacy { background: rgba(52, 211, 153, 0.08); border-color: rgba(52, 211, 153, 0.35); }
.icv-root .icv-privacy-icon { width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: #339966; color: #fff; }
.icv-root .icv-privacy-icon svg { width: 18px; height: 18px; }
.icv-root .icv-privacy p { margin: 0; font-size: 0.92rem; line-height: 1.5; color: var(--icv-text-2); }
.icv-root .icv-privacy strong { color: var(--icv-text-1); }

/* upload extras */
.icv-root .icv-sample-row { align-items: center; }
.icv-root .icv-paste { margin-top: 0.9rem; }
.icv-root .icv-badge.is-ok { cursor: default; background: rgba(51, 153, 102, 0.1); border-color: rgba(51, 153, 102, 0.4); color: #237a52; }
[data-theme="dark"] .icv-root .icv-badge.is-ok { color: #6ee7b7; }
.icv-root span.icv-badge, .icv-root .icv-badge.is-plain { cursor: default; }

/* tabs */
.icv-root .icv-tabs { display: flex; gap: 0.25rem; margin-top: 1rem; border-bottom: 1px solid var(--icv-line); overflow-x: auto; scrollbar-width: none; }
.icv-root .icv-tabs::-webkit-scrollbar { display: none; }
.icv-root .icv-tab { display: inline-flex; align-items: center; gap: 0.4rem; width: auto; flex-shrink: 0; margin: 0 0 -1px; padding: 0.6rem 0.9rem; border: none; border-bottom: 2px solid transparent; border-radius: 10px 10px 0 0; background: none; color: var(--icv-muted); font-size: 0.92rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.icv-root .icv-tab svg { width: 17px; height: 17px; }
.icv-root .icv-tab:hover { color: var(--icv-text-1); background: var(--icv-accent-soft); }
.icv-root .icv-tab.is-active { color: var(--icv-accent-strong); border-bottom-color: var(--icv-accent); }
[data-theme="dark"] .icv-root .icv-tab.is-active { color: var(--icv-accent); }
.icv-root .icv-tab-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 0.4rem; border-radius: 999px; background: var(--icv-go); color: #fff; font-size: 0.72rem; font-weight: 800; box-sizing: border-box; }
.icv-root .icv-tab-count.is-warn { background: #d97706; }
.icv-root .icv-panel { padding-top: 0.9rem; min-width: 0; }

/* ============================================================
   Page shell extras (EML / MBOX pages)
   ============================================================ */
.icv-root .icv-input-bar { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.6rem; }
.icv-root .icv-adv-paste { margin-top: 1rem; }
.icv-root .icv-adv-paste .icv-adv-body { padding-top: 0.5rem; }
.icv-root .icv-recent { margin-top: 1rem; padding-top: 0.85rem; border-top: 1px solid var(--icv-line); }
.icv-root .icv-recent-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.icv-root .icv-recent-head .icv-caption { margin: 0; }
.icv-root .icv-recent-list { list-style: none; margin: 0.4rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem; }
.icv-root .icv-recent-list li { min-width: 0; }
.icv-root .icv-recent-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.5rem; width: 100%; padding: 0.5rem 0.7rem; margin: 0; border-radius: 10px; border: 1px solid var(--icv-line); background: var(--icv-sunk); cursor: pointer; text-align: left; min-width: 0; color: var(--icv-text-1); }
.icv-root .icv-recent-item:hover { border-color: var(--icv-accent-line); }
.icv-root .icv-recent-item svg { width: 16px; height: 16px; color: var(--icv-accent); }
.icv-root .icv-recent-name { font-size: 0.85rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icv-root .icv-recent-meta { font-size: 0.74rem; color: var(--icv-muted); white-space: nowrap; }
.icv-root .icv-prog-top { min-height: 40px; }
.icv-root .icv-filehead .icv-badges { align-items: center; }
.icv-root .icv-files { margin-top: 0.85rem; }
.icv-root .icv-files .icv-caption { margin: 0 0 0.35rem; }
.icv-root .icv-files-row { display: flex; gap: 0.35rem; overflow-x: auto; padding-bottom: 0.25rem; scrollbar-width: thin; }
.icv-root .icv-files-row .icv-fchip { flex-shrink: 0; max-width: 260px; }
.icv-root .icv-mailhost { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--icv-line); min-width: 0; }
.icv-root .icv-info-card .icv-table td:first-child { font-family: var(--icv-mono); }
.icv-root .icv-stat-row { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.75rem; }

@media (max-width: 760px) {
    .icv-root .icv-search { flex-basis: 100%; min-width: 0; }
    .icv-root .icv-features { grid-template-columns: minmax(0, 1fr); }
    .icv-root .icv-keys { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
    .icv-root .icv-chiprow { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 0.3rem; scrollbar-width: thin; }
    .icv-root .icv-chiprow .icv-fchip { flex-shrink: 0; }
    .icv-root .icv-sort { flex: 1 1 auto; min-width: 0; }
    .icv-root .icv-thread { flex: 0 0 auto; }
    .icv-root .icv-actionbar .icv-go { flex: 1 1 100%; margin-left: 0; }
    .icv-root .icv-actionbar .icv-btn-ghost { flex: 1; }
    .icv-root.tool-container { padding: 1.1rem 16px; }
    .icv-root .tool-title { font-size: 1.5rem; }
    .icv-root .icv-title-icon { width: 46px; height: 46px; border-radius: 13px; }
    .icv-root .icv-title-icon svg { width: 25px; height: 25px; }
    .icv-root .icv-title-row { gap: 0.7rem; }
    .icv-root .tool-description { font-size: 0.98rem; }
    .icv-root .icv-card { padding: 1rem; border-radius: 16px; }
    .icv-root .icv-drop { min-height: 150px; padding: 1.2rem 0.9rem; }
    .icv-root .icv-kbd-hint { display: none; }
    .icv-root .icv-input-bar .icv-go { flex: 1 1 100%; }
    .icv-root .icv-input-bar .icv-btn-ghost { flex: 1; }
    .icv-root .icv-recent-list { grid-template-columns: minmax(0, 1fr); }
    .icv-root .icv-info-card { padding: 1.1rem 1rem; }
    .icv-root .icv-adv-head { padding: 0.55rem 0.75rem; }
    .icv-root .icv-adv-value { max-width: 96px; }
    .icv-root .icv-filehead .icv-badges { width: 100%; }
    .icv-root .icv-filehead .icv-badges .icv-btn { flex: 1; }
    .icv-root .icv-sample-row .icv-seg-btn { flex: 1 1 100%; justify-content: center; }
}

/* ============================================================
   ICS viewer: toolbar, agenda (virtualised), month grid,
   event detail dialog, print
   ============================================================ */
.icv-root .icv-notes { margin-top: 0.75rem; }
.icv-root .icv-stats .icv-stat > span { min-width: 0; overflow-wrap: anywhere; }
.icv-root .icv-toolbar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.6rem; margin-top: 1rem; }
.icv-root .icv-toolbar .icv-search { min-width: 0; }
.icv-root .icv-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.5rem; }
.icv-root .icv-filters > * { min-width: 0; }
.icv-root .icv-field { display: flex; flex-direction: column; gap: 0.2rem; margin: 0; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--icv-muted); }
.icv-root .icv-field > span { display: inline-flex; align-items: center; gap: 0.3rem; }
.icv-root .icv-field > span svg { width: 13px; height: 13px; }
.icv-root .icv-field .icv-select { text-transform: none; letter-spacing: 0; font-weight: 500; }
.icv-root .icv-field-tz { grid-column: span 2; }
.icv-root .icv-viewbar { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin: 0.9rem 0 0.6rem; }
.icv-root .icv-viewbar .icv-segs svg { width: 15px; height: 15px; }
.icv-root .icv-monthnav { display: inline-flex; align-items: center; gap: 0.35rem; }
.icv-root .icv-monthnav strong { min-width: 150px; text-align: center; font-size: 1rem; color: var(--icv-text-1); }
.icv-root #icvToday { margin-left: auto; }

/* agenda */
.icv-root .icv-agenda { position: relative; height: 64vh; min-height: 320px; max-height: 760px; overflow: auto; border: 1px solid var(--icv-line); border-radius: 14px; background: var(--icv-card); contain: strict; overscroll-behavior: contain; }
.icv-root .icv-agenda:focus-visible { outline: 3px solid var(--icv-accent-line); outline-offset: 1px; }
.icv-root .icv-agenda-spacer { width: 1px; }
.icv-root .icv-agenda-rows { position: absolute; top: 0; left: 0; right: 0; will-change: transform; }
.icv-root .icv-day { position: relative; display: flex; align-items: center; gap: 0.5rem; height: 40px; box-sizing: border-box; padding: 0 1rem; background: var(--icv-sunk); border-bottom: 1px solid var(--icv-line); font-size: 0.82rem; font-weight: 800; color: var(--icv-text-1); }
.icv-root .icv-day em { font-style: normal; font-weight: 700; font-size: 0.72rem; padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--icv-accent-soft); color: var(--icv-accent-strong); }
[data-theme="dark"] .icv-root .icv-day em { color: var(--icv-accent); }
.icv-root .icv-day.is-today { background: var(--icv-accent-soft); }
.icv-root .icv-day.is-past { color: var(--icv-text-2); }
.icv-root .icv-ev { display: grid; grid-template-columns: 92px 10px minmax(0, 1fr) auto; align-items: center; gap: 0.7rem; width: 100%; height: 64px; box-sizing: border-box; margin: 0; padding: 0 1rem; border: none; border-bottom: 1px solid var(--icv-line); background: none; text-align: left; cursor: pointer; color: var(--icv-text-1); border-radius: 0; }
.icv-root .icv-ev:hover { background: var(--icv-accent-soft); }
.icv-root .icv-ev:focus-visible { outline: 3px solid var(--icv-accent-line); outline-offset: -3px; }
.icv-root .icv-ev-time { display: flex; flex-direction: column; font-size: 0.84rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--icv-text-1); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icv-root .icv-ev-time span { font-weight: 500; color: var(--icv-muted); font-size: 0.78rem; }
.icv-root .icv-dot { width: 10px; height: 10px; border-radius: 50%; }
.icv-root .icv-ev-main { display: flex; flex-direction: column; min-width: 0; gap: 0.15rem; }
.icv-root .icv-ev-title { font-size: 0.95rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icv-root .icv-ev-meta { display: flex; align-items: center; gap: 0.35rem; font-size: 0.78rem; color: var(--icv-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.icv-root .icv-ev-meta svg { width: 13px; height: 13px; flex-shrink: 0; }
.icv-root .icv-ev-meta b { font-weight: 400; opacity: 0.5; padding: 0 0.1rem; }
.icv-root .icv-ev.is-past .icv-ev-title, .icv-root .icv-ev.is-past .icv-ev-time { opacity: 0.72; }
.icv-root .icv-ev.is-cancelled .icv-ev-title { text-decoration: line-through; opacity: 0.6; }
.icv-root .icv-tag { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.12rem 0.5rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; white-space: nowrap; background: var(--icv-sunk); border: 1px solid var(--icv-line); color: var(--icv-text-2); }
.icv-root .icv-tag svg { width: 12px; height: 12px; }
.icv-root .icv-tag.is-red { background: var(--icv-red-soft); border-color: var(--icv-red-line); color: var(--icv-red); }
.icv-root .icv-tag.is-green { background: rgba(51, 153, 102, 0.1); border-color: rgba(51, 153, 102, 0.4); color: #237a52; }
[data-theme="dark"] .icv-root .icv-tag.is-green { color: #6ee7b7; }
.icv-root .icv-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.icv-root .icv-empty { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; padding: 2.5rem 1rem; border: 1px dashed var(--icv-line); border-radius: 14px; color: var(--icv-muted); text-align: center; }
.icv-root .icv-empty svg { width: 30px; height: 30px; color: var(--icv-accent); }
.icv-root .icv-empty p { margin: 0; }

/* month */
.icv-root .icv-mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--icv-line); border-radius: 14px; overflow: hidden; background: var(--icv-line); gap: 1px; }
.icv-root .icv-mhead { padding: 0.45rem 0.5rem; background: var(--icv-sunk); font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--icv-muted); text-align: center; }
.icv-root .icv-mcell { position: relative; min-height: 112px; min-width: 0; padding: 0.3rem; background: var(--icv-card); display: flex; flex-direction: column; gap: 0.2rem; cursor: pointer; }
.icv-root .icv-mcell.is-out { background: var(--icv-open); }
.icv-root .icv-mcell.is-out .icv-mnum { opacity: 0.5; }
.icv-root .icv-mnum { align-self: flex-start; display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 0.3rem; margin: 0; border: none; border-radius: 999px; background: none; font-size: 0.82rem; font-weight: 800; color: var(--icv-text-1); cursor: pointer; }
.icv-root .icv-mnum:hover { background: var(--icv-accent-soft); }
.icv-root .icv-mcell.is-today .icv-mnum { background: var(--icv-go); color: #fff; }
.icv-root .icv-mchips { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.icv-root .icv-mchip { display: block; width: 100%; min-width: 0; margin: 0; padding: 0.12rem 0.35rem; border: none; border-radius: 6px; background: color-mix(in srgb, var(--icv-c, #3399cc) 13%, transparent); color: var(--icv-text-1); font-size: 0.74rem; font-weight: 600; text-align: left; cursor: pointer; }
.icv-root .icv-mchip span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icv-root .icv-mchip.is-allday { background: var(--icv-c, #3399cc); color: #fff; }
.icv-root .icv-mchip.is-cancelled span { text-decoration: line-through; opacity: 0.65; }
.icv-root .icv-mchip:hover { filter: brightness(0.95); }
.icv-root .icv-mmore { align-self: flex-start; margin: 0; padding: 0.05rem 0.3rem; border: none; background: none; color: var(--icv-accent-strong); font-size: 0.72rem; font-weight: 700; cursor: pointer; }
[data-theme="dark"] .icv-root .icv-mmore { color: var(--icv-accent); }
.icv-root .icv-mdots { display: none; }

/* dialog */
.icv-root .icv-modal { position: fixed; inset: 0; z-index: 10005; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.icv-root .icv-modal-back { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.55); }
.icv-root .icv-modal-box { position: relative; width: 100%; max-width: 680px; max-height: calc(100vh - 2rem); overflow: auto; box-sizing: border-box; padding: 1.4rem 1.5rem 1.2rem; border-radius: 18px; background: var(--icv-card); border: 1px solid var(--icv-line); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3); color: var(--icv-text-1); }
.icv-root .icv-modal-x { position: absolute; top: 0.7rem; right: 0.7rem; }
html.icv-noscroll { overflow: hidden; }
.icv-root .icv-mt { margin: 0 2rem 0.4rem 0; font-size: 1.3rem; line-height: 1.3; color: var(--icv-text-1); overflow-wrap: anywhere; }
.icv-root .icv-dhead { display: flex; gap: 0.75rem; align-items: flex-start; margin-bottom: 0.6rem; }
.icv-root .icv-dbar { width: 14px; height: 14px; border-radius: 4px; margin-top: 0.45rem; flex-shrink: 0; }
.icv-root .icv-back { margin: -0.4rem 0 0.6rem -0.5rem; }
.icv-root .icv-drows { margin: 0.4rem 0 0; display: grid; gap: 0; }
.icv-root .icv-drows > div { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 0.75rem; padding: 0.6rem 0; border-top: 1px solid var(--icv-line); }
.icv-root .icv-drows dt { display: flex; align-items: flex-start; gap: 0.45rem; font-size: 0.82rem; font-weight: 700; color: var(--icv-muted); }
.icv-root .icv-drows dt svg { width: 16px; height: 16px; color: var(--icv-accent); flex-shrink: 0; margin-top: 1px; }
.icv-root .icv-drows dd { margin: 0; min-width: 0; font-size: 0.92rem; line-height: 1.55; color: var(--icv-text-1); overflow-wrap: anywhere; }
.icv-root .icv-drows dd a, .icv-root .icv-desc a { color: var(--icv-accent-strong); font-weight: 600; }
[data-theme="dark"] .icv-root .icv-drows dd a, [data-theme="dark"] .icv-root .icv-desc a { color: var(--icv-accent); }
.icv-root .icv-drows dd a.icv-btn { color: #fff; }
.icv-root .icv-sub { display: block; font-size: 0.8rem; color: var(--icv-muted); margin-top: 0.1rem; }
.icv-root .icv-links { display: flex; flex-wrap: wrap; gap: 0.3rem 0.4rem; margin-top: 0.3rem; }
.icv-root .icv-links .icv-text-btn { padding-left: 0; }
.icv-root .icv-people { list-style: none; margin: 0.35rem 0 0; padding: 0; display: grid; gap: 0.35rem; max-height: 320px; overflow: auto; }
.icv-root .icv-person { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 0.55rem; }
.icv-root .icv-avatar { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 0.72rem; font-weight: 800; }
.icv-root .icv-pname { display: flex; flex-direction: column; min-width: 0; font-size: 0.86rem; }
.icv-root .icv-pname strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icv-root .icv-pname span { font-size: 0.76rem; color: var(--icv-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icv-root .icv-rsvp { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.74rem; font-weight: 700; color: var(--icv-muted); white-space: nowrap; }
.icv-root .icv-rsvp svg { width: 14px; height: 14px; }
.icv-root .icv-rsvp.is-green { color: #237a52; }
[data-theme="dark"] .icv-root .icv-rsvp.is-green { color: #6ee7b7; }
.icv-root .icv-rsvp.is-red { color: var(--icv-red); }
.icv-root .icv-rsvp.is-amber { color: var(--icv-warn); }
.icv-root .icv-desc { margin-top: 0.4rem; padding: 0.85rem 1rem; border-radius: 12px; background: var(--icv-sunk); border: 1px solid var(--icv-line); font-size: 0.9rem; line-height: 1.6; color: var(--icv-text-1); overflow-wrap: anywhere; max-height: 340px; overflow: auto; }
.icv-root .icv-desc p { margin: 0 0 0.5rem; }
.icv-root .icv-desc ul, .icv-root .icv-desc ol { margin: 0.3rem 0; padding-left: 1.2rem; }
.icv-root .icv-dfoot { margin: 0.7rem 0 0; font-size: 0.74rem; color: var(--icv-muted); overflow-wrap: anywhere; }
.icv-root .icv-dacts { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 1rem; padding-top: 0.9rem; border-top: 1px solid var(--icv-line); }
.icv-root .icv-daylist { display: grid; border: 1px solid var(--icv-line); border-radius: 12px; overflow: hidden; margin-top: 0.6rem; }
.icv-root .icv-daylist .icv-ev:last-child { border-bottom: none; }

/* print */
.icv-root .icv-printout { display: none; }
@media print {
    body.icv-printing * { visibility: hidden !important; }
    body.icv-printing .icv-root .icv-printout, body.icv-printing .icv-root .icv-printout * { visibility: visible !important; }
    body.icv-printing .icv-root .icv-printout { display: block; position: absolute; left: 0; top: 0; width: 100%; color: #000; background: #fff; font: 11pt/1.4 Arial, sans-serif; }
    .icv-root .icv-printout h1 { font-size: 16pt; margin: 0 0 4pt; }
    .icv-root .icv-printout .icv-psub { margin: 0 0 10pt; color: #555; }
    .icv-root .icv-printout h2 { font-size: 11pt; margin: 10pt 0 3pt; padding-bottom: 2pt; border-bottom: 1px solid #999; break-after: avoid; }
    .icv-root .icv-printout table { width: 100%; border-collapse: collapse; }
    .icv-root .icv-printout td { padding: 2pt 4pt; vertical-align: top; break-inside: avoid; }
    .icv-root .icv-printout .icv-pt { width: 110pt; white-space: nowrap; color: #333; }
}

@media (max-width: 760px) {
    .icv-root .icv-field-tz { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
    .icv-root .icv-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .icv-root .icv-ev { grid-template-columns: 62px 8px minmax(0, 1fr); gap: 0.5rem; padding: 0 0.7rem; }
    .icv-root .icv-ev > .icv-tag { display: none; }
    .icv-root .icv-ev-time { font-size: 0.78rem; }
    .icv-root .icv-day { padding: 0 0.7rem; }
    .icv-root .icv-agenda { height: 62vh; }
    .icv-root .icv-viewbar .icv-segs { flex: 1 1 auto; }
    .icv-root .icv-monthnav { order: 3; width: 100%; justify-content: space-between; }
    .icv-root .icv-monthnav strong { min-width: 0; }
    .icv-root .icv-mcell { min-height: 58px; padding: 0.15rem; align-items: center; }
    .icv-root .icv-mhead { padding: 0.35rem 0.1rem; font-size: 0.66rem; }
    .icv-root .icv-mchips { display: none; }
    .icv-root .icv-mdots { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
    .icv-root .icv-mdots i { width: 6px; height: 6px; border-radius: 50%; }
    .icv-root .icv-mdots b { font-size: 0.6rem; color: var(--icv-muted); }
    .icv-root .icv-mnum { align-self: center; font-size: 0.78rem; }
    .icv-root .icv-modal { padding: 0; align-items: flex-end; }
    .icv-root .icv-modal-box { max-height: 92vh; border-radius: 18px 18px 0 0; padding: 1.1rem 1rem 1rem; }
    .icv-root .icv-drows > div { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
    .icv-root .icv-dacts .icv-btn { flex: 1 1 auto; }
    .icv-root .icv-actionbar .icv-btn-ghost { flex: 1 1 calc(50% - 0.5rem); }
}
