:root {
    --bg-base: #131314;
    --bg-card: #1e1f22;
    --bg-card-hover: #2a2b2e;
    --text-main: #e3e3e3;
    --text-muted: #9ca3af;
    --border-color: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.2);

    --accent-bg: rgba(255, 255, 255, 0.1);
    --accent-text: #ffffff;

    --primary-blue: #3b82f6;
    --danger-red: #ef4444;
    --success-green: #10b981;
    --warning-orange: #f59e0b;

    --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
    --font-sans: "Segoe UI", "Yu Gothic UI", "Hiragino Sans", Meiryo, sans-serif;

    --cti-side-w: 250px;
    --cti-side-w-min: 65px;

    --cti-icon-box: 24px;
    --cti-icon-x: calc((var(--cti-side-w-min) - var(--cti-icon-box)) / 2);
    --cti-icon-gap: 14px;

    --cti-st-idle:    #7c8598;
    --cti-st-calling: #5b8dd9;
    --cti-st-talking: #57a978;
    --cti-st-hold:    #d19154;
    --cti-st-ring:    #cc6b6b;
    --cti-btn-call: #16a34a;
    --cti-btn-end:  #dc2626;

    --cti-mono: var(--font-mono);

    --dash-colhead-h: 35px;
    --cti-st-busy: #8e7cc3;

    --primary-rgb: 59, 130, 246;
    --warning-rgb: 245, 158, 11;
    --danger-rgb: 239, 68, 68;
    --success-rgb: 16, 185, 129;
    --amber-rgb: 251, 191, 36;
    --amber-fg: #fbbf24;
    --danger-fg: #fca5a5;
    --primary-fg: #93c5fd;
    --success-fg: #6ee7b7;

    --bg-raised: #26272b;
    --row-hover: rgba(255, 255, 255, 0.03);
    --scrim: rgba(0, 0, 0, 0.7);
    --primary-strong: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-soft: rgba(59, 130, 246, 0.14);
    --primary-line: rgba(59, 130, 246, 0.5);
    --focus-ring: var(--primary-blue);
    --danger-strong: #dc2626;
    --danger-hover: #b91c1c;
    --danger-text: #f87171;
    --danger-line: rgba(239, 68, 68, 0.5);
    --danger-soft: rgba(239, 68, 68, 0.12);
    --warning-soft: rgba(245, 158, 11, 0.12);
    --success-line: rgba(16, 185, 129, 0.45);
    --warning-line: rgba(245, 158, 11, 0.5);
    --success-soft: rgba(16, 185, 129, 0.12);

    --fs-xs: 11px; --fs-sm: 12px; --fs-md: 13px; --fs-lg: 15px; --fs-xl: 18px; --fs-2xl: 24px;
    --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px; --space-8: 32px;
    --radius-sm: 4px; --radius-md: 6px; --radius-lg: 8px; --radius-xl: 12px;
    --shadow-pop: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-modal: 0 16px 48px rgba(0, 0, 0, 0.55);
    --h-sm: 24px; --h-md: 32px; --h-row: 36px; --h-row-dense: 26px;

    --z-page-modal: 200;
    --z-float-under: 999;
    --z-float: 1000;
    --z-modal: 1050;
    --z-modal-pop: 1100;
    --z-cg-modal: 9999;
    --z-drag: 99997;
    --z-top: 99999;
    --z-top-pop: 100000;
    --z-confirm: 100001;
    --z-editor: 999999;
    --z-lock: 1000000;
}

html {
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
html::-webkit-scrollbar {
    display: none;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, .16); border-radius: 8px;
    border: 2px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, .32); }
::-webkit-scrollbar-thumb:active { background-color: rgba(255, 255, 255, .42); }
::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
@supports not selector(::-webkit-scrollbar) {
    * { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .22) transparent; }
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-base);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    background-color: var(--bg-base);
    position: relative;
}

.main-content {
    flex-grow: 1;
    overflow-y: auto;
    position: relative;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-box {
    box-sizing: border-box;
    width: 360px;
    padding: var(--space-8) 28px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-modal);
}

.login-title { margin: 0 0 var(--space-5); font-size: var(--fs-2xl); font-weight: 600; color: var(--text-main); text-align: center; }

.login-msg { margin: 0 0 var(--space-4); }
.login-form { display: flex; flex-direction: column; gap: var(--space-4); }
.login-submit { width: 100%; height: 36px; margin-top: var(--space-1); }

html:has(> body.lgp-body) { overflow: hidden; height: 100%; overscroll-behavior: none; }
body.lgp-body {
    overflow: hidden; overscroll-behavior: none; width: auto; height: 100%; min-height: 100vh; min-height: 100dvh;
    background: #131314; color: #e3e3e3; -webkit-text-size-adjust: 100%; touch-action: manipulation;
    font-family: -apple-system, 'Hiragino Sans', 'Segoe UI', 'Yu Gothic UI', Meiryo, sans-serif;
}
.lgp { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: stretch;
       padding: env(safe-area-inset-top) 0 calc(24px + env(safe-area-inset-bottom)); box-sizing: border-box;
       -webkit-user-select: none; user-select: none; }
.lgp-glow { position: absolute; left: 0; right: 0; top: 24%; height: 440px; pointer-events: none;
            background: radial-gradient(closest-side, rgba(37, 99, 235, .15), rgba(37, 99, 235, 0)); }
.lgp-head { position: relative; padding-top: clamp(48px, 14.2vh, 120px); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lgp-logo { display: block; margin: 0; font-size: 28px; font-weight: 700; line-height: 1; letter-spacing: .14em; color: #f3f4f6; }
.lgp-tag { margin: 0; font-size: 13px; font-weight: 300; letter-spacing: .08em; color: #7d828b; display: flex; align-items: baseline; gap: .5em; }
.lgp-tag b { font-size: 15px; font-weight: 700; color: #f3f4f6; letter-spacing: .04em; }
.lgp-main { position: relative; margin-top: clamp(32px, 12.8vh, 108px); padding: 0 20px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.lgp-msg, .lgp-note { width: min(350px, 100%); box-sizing: border-box; border-radius: 14px; padding: 12px 14px; font-size: 14px; line-height: 1.5; }
.lgp-msg { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); color: #d6d8dc; }
.lgp-msg-warn { background: rgba(239, 68, 68, .1); border-color: rgba(239, 68, 68, .35); color: #fecaca; }
.lgp-note { display: flex; gap: 10px; align-items: flex-start; background: rgba(245, 158, 11, .1); border: 1px solid rgba(245, 158, 11, .35); }
.lgp-note svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; fill: none; stroke: #fbbf24; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lgp-note div { display: flex; flex-direction: column; gap: 2px; }
.lgp-note b { font-size: 14px; font-weight: 600; color: #fcd34d; }
.lgp-note span { font-size: 13px; color: #c4c7cc; }
.lgp-msg[hidden], .lgp-note[hidden] { display: none; }
.lgp-morph { position: relative; box-sizing: border-box; margin: 0 auto; background: #1b1c20; border: 1px solid rgba(255, 255, 255, .12); overflow: hidden; }
.lgp-morph.is-pk { width: 124px; height: 124px; border-radius: 62px; box-shadow: 0 0 0 10px rgba(255, 255, 255, .025), 0 18px 40px rgba(0, 0, 0, .45); }
.lgp-morph.is-pw { width: min(350px, calc(100vw - 40px)); height: 212px; border-radius: 20px; box-shadow: 0 0 0 0 rgba(255, 255, 255, 0), 0 18px 40px rgba(0, 0, 0, .45); }
.lgp-pk { position: absolute; left: 0; top: 0; width: 122px; height: 122px; padding: 0; border: none; border-radius: 61px; background: transparent;
          color: #e8eaee; display: flex; align-items: center; justify-content: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.lgp-pk svg { width: 58px; height: 58px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.lgp-pk:active { background: rgba(255, 255, 255, .05); }
.lgp-pk:focus-visible { outline: 2px solid #93c5fd; outline-offset: -4px; }
.lgp-morph.is-pw .lgp-pk { opacity: 0; transform: scale(.35) rotate(-24deg); pointer-events: none; }
.lgp.is-busy .lgp-morph.is-pk { box-shadow: 0 0 0 10px rgba(37, 99, 235, .18), 0 18px 40px rgba(0, 0, 0, .45); }
.lgp-form { position: absolute; left: 0; top: 0; width: min(348px, calc(100vw - 42px)); box-sizing: border-box; margin: 0; padding: 16px;
            display: flex; flex-direction: column; gap: 10px; opacity: 0; transform: translateY(14px); pointer-events: none; }
.lgp-morph.is-pw .lgp-form { opacity: 1; transform: none; pointer-events: auto; }
.lgp-row { height: 52px; box-sizing: border-box; background: #26272b; border: 1px solid rgba(255, 255, 255, .06); border-radius: 12px;
           display: flex; align-items: center; gap: 12px; padding: 0 14px; }
.lgp-row > span { flex: 0 0 76px; font-size: 15px; color: #c4c7cc; }
.lgp-inp { flex-grow: 1; min-width: 0; height: 50px; border: none; background: transparent; color: #e3e3e3; font: inherit; font-size: 17px; padding: 0; outline: none;
           -webkit-user-select: text; user-select: text; }
.lgp-inp::placeholder { color: #6b7078; }
.lgp-row:focus-within { border-color: rgba(147, 197, 253, .55); }
.lgp-go { height: 50px; margin-top: 4px; border: none; border-radius: 12px; background: #2563eb; color: #fff; font: inherit; font-size: 17px; font-weight: 700; cursor: pointer; }
.lgp-go:active { background: #1d4ed8; }
.lgp-go:disabled { opacity: .6; }
.lgp-swap { height: 44px; padding: 0 14px; border: none; border-radius: 22px; background: transparent; color: #c4c7cc; font: inherit; font-size: 15px; font-weight: 600;
            display: inline-flex; align-items: center; gap: 8px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.lgp-swap:active { background: rgba(255, 255, 255, .06); }
.lgp-swap[hidden] { display: none; }
.lgp-swap svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lgp-swap .lgp-swap-pk { stroke-width: 3.4; }
.lgp[data-mode="pk"] .lgp-swap-pk, .lgp[data-mode="pw"] .lgp-swap-pw { display: none; }
.lgp-ready .lgp-morph { transition: width .44s cubic-bezier(.2, .8, .2, 1), height .44s cubic-bezier(.2, .8, .2, 1), border-radius .44s cubic-bezier(.2, .8, .2, 1), box-shadow .44s ease; }
.lgp-ready .lgp-pk { transition: opacity .22s ease, transform .44s cubic-bezier(.2, .8, .2, 1), background .15s; }
.lgp-ready .lgp-form { transition: opacity .16s ease, transform .2s ease; }
.lgp-ready .lgp-morph.is-pw .lgp-form { transition: opacity .3s ease .16s, transform .44s cubic-bezier(.2, .8, .2, 1) .1s; }
@media (prefers-reduced-motion: reduce) {
    .lgp-ready .lgp-morph, .lgp-ready .lgp-pk, .lgp-ready .lgp-form, .lgp-ready .lgp-morph.is-pw .lgp-form { transition: none; }
}

.dashboard-container {
    width: 100%;
    padding: var(--space-6) var(--space-8);
    box-sizing: border-box;
}

body[data-off~="top"] [data-feature~="top"],
body[data-off~="conflicts"] [data-feature~="conflicts"],
body[data-off~="aimed"] [data-feature~="aimed"],
body[data-off~="di"] [data-feature~="di"],
body[data-off~="seats"] [data-feature~="seats"],
body[data-off~="callgw"] [data-feature~="callgw"],
body[data-off~="htpg"] [data-feature~="htpg"],
body[data-off~="extnotes"] [data-feature~="extnotes"],
body[data-off~="callgw"] .callbtn { display: none !important; }

.content-card {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 25px;
}

.hist-phone { font-family: var(--font-mono); font-size: 16px; }
.hist-old { color: var(--danger-fg); text-decoration: line-through; }
.hist-new { color: var(--success-fg); font-weight: bold; }
.ui-kv .mono { font-family: var(--font-mono); }
.cr-sfa { color: var(--primary-fg); }
.cr-ext { color: var(--amber-fg); }

.ui-input {
    width: 100%;
    height: var(--h-md);
    padding: 0 10px;
    border: 1px solid var(--border-strong);
    background-color: var(--bg-base);
    color: var(--text-main);
    border-radius: var(--radius-md);
    box-sizing: border-box;
    font: inherit;
    font-size: var(--fs-md);
}
.ui-input::placeholder { color: var(--text-muted); }

.ui-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px var(--primary-soft);
}
.ui-input:disabled { opacity: .5; cursor: not-allowed; }

.ui-minitabs {
    display: flex; gap: 4px;
}
.ui-minitab {
    all: unset; cursor: pointer;
    display: inline-flex; align-items: center; box-sizing: border-box;
    height: var(--h-sm); padding: 0 10px; border-radius: var(--radius-md);
    font-size: var(--fs-sm); font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
}
.ui-minitab:hover {
    color: var(--text-main);
    background: rgba(255,255,255,0.05);
}
.ui-minitab.active {
    color: var(--primary-fg);
    background: var(--primary-soft);
    border-color: var(--primary-line);
}

#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: var(--z-top);
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    box-sizing: border-box;
    min-width: 260px;
    padding: 12px 14px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-strong);
    background: var(--bg-raised);
    font-size: var(--fs-md);
    color: var(--text-main);
    box-shadow: var(--shadow-pop);
    pointer-events: auto;
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: 400px;
    word-break: break-word;
}

.toast-show {
    opacity: 1;
    transform: translateX(0);
}

.toast-hide {
    opacity: 0;
    transform: translateX(40px);
}

.toast-icon {
    display: flex;
    flex-shrink: 0;
    margin-top: 1px;
}
.toast-icon svg { width: 18px; height: 18px; fill: currentColor; }

.toast-msg {
    line-height: 1.5;
}

.toast-success { border-color: var(--success-line); }
.toast-success .toast-icon { color: var(--success-fg); }
.toast-error { border-color: var(--danger-line); }
.toast-error .toast-icon { color: var(--danger-fg); }
.toast-warn { border-color: var(--warning-line); }
.toast-warn .toast-icon { color: var(--amber-fg); }
.toast-info { border-color: var(--primary-line); }
.toast-info .toast-icon { color: var(--primary-fg); }

.ui-notice.disconnect-banner {
    margin: 0 0 15px 0;
    justify-content: center;
    align-items: center;
    animation: disconnect-fadein 0.3s ease;
}

.disconnect-banner-hide {
    opacity: 0;
    transition: opacity 0.4s ease;
}

@keyframes disconnect-fadein {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

tr.conflict-row-selected {
    background: rgba(var(--primary-rgb), 0.15) !important;
}
tr.conflict-row-selected td {
    border-bottom-color: rgba(var(--primary-rgb), 0.3);
}
tr.conflict-row {
    cursor: default;
    user-select: none;
}

.ui-modal {
    display: none; position: fixed; inset: 0; background: var(--scrim); z-index: var(--z-modal);
    align-items: center; justify-content: center; backdrop-filter: blur(4px);
}
.ui-modal.open { display: flex; }
.ui-box {
    background: var(--bg-card); padding: 24px 28px; border-radius: var(--radius-xl); border: 1px solid var(--border-color);
    width: 92%; max-width: 600px; box-shadow: var(--shadow-modal); max-height: 90vh; overflow: auto;
}
.ui-box:has(> .ui-box-head) { display: flex; flex-direction: column; padding: 0; overflow: hidden; border-color: var(--border-strong); }
.ui-box-head { flex: none; display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-4) var(--space-4) var(--space-5);
               border-bottom: 1px solid var(--border-color); }
.ui-box-head .ui-title { margin: 0; padding: 0; border: 0; }
.ui-box-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: var(--space-5); }
.ui-box-foot { flex: none; display: flex; align-items: center; justify-content: flex-end; gap: var(--space-2);
               padding: var(--space-3) var(--space-5); border-top: 1px solid var(--border-color); }
.ui-box-head .ui-x { margin-left: auto; }
.ui-box-sub { margin-top: 2px; font-size: var(--fs-sm); color: var(--text-muted); }
.ui-box-xl { max-width: 1180px; }
.ui-box-tall { height: 88vh; max-height: 88vh; }
.ui-box-foot .ui-foot-left { margin-right: auto; }
.ui-box > form.ui-box-form { display: contents; }
.ui-modal.ui-confirm { z-index: var(--z-confirm); }
.ui-confirm .ui-box { max-width: 420px; }
.ui-confirm-msg { margin: 0; font-size: var(--fs-md); line-height: 1.7; color: var(--text-main); white-space: pre-line; word-break: break-word; }
.ui-confirm-msg + .ui-confirm-msg { margin-top: var(--space-2); }
.ui-confirm-sub { color: var(--text-muted); font-size: var(--fs-sm); }
.ui-title { margin: 0 0 16px; font-size: var(--fs-xl); font-weight: 600; color: var(--text-main); border-bottom: 1px solid var(--border-color); padding-bottom: 12px; }
.ui-title-danger { color: var(--danger-text); }
.ui-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.ui-field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--text-muted); min-width: 0; }
.ui-field > span:first-child { font-weight: bold; }
.ui-field b { color: var(--danger-text); }
.ui-span2 { grid-column: 1 / -1; }
.ui-field[hidden] { display: none; }
.ui-hint { font-size: var(--fs-xs); color: var(--text-muted); min-height: 14px; }
.ui-static { color: var(--text-main); padding: 8px 0; font-size: 13px; }
.ui-note { font-size: var(--fs-sm); color: var(--text-muted); margin: 12px 0 0; line-height: 1.6; }
.ui-warn { font-size: 12.5px; color: var(--amber-fg); margin: 12px 0 0; line-height: 1.5; }
.ui-notice { display: flex; gap: var(--space-3); align-items: flex-start; padding: 10px 14px; border: 1px solid var(--primary-line);
             border-radius: var(--radius-lg); background: var(--primary-soft); color: var(--text-main); font-size: var(--fs-md); line-height: 1.6; text-align: left; }
.ui-notice svg { flex: none; width: 18px; height: 18px; margin-top: 1px; fill: var(--primary-fg); }
.ui-notice-danger { border-color: var(--danger-line); background: var(--danger-soft); }
.ui-notice-danger svg { fill: var(--danger-fg); }
.ui-notice-warn { border-color: var(--warning-line); background: var(--warning-soft); }
.ui-notice-warn svg { fill: var(--amber-fg); }
.ui-error { color: var(--danger-fg); }
.ui-table td.ui-empty.ui-error { color: var(--danger-fg); }
.ui-empty { padding: var(--space-6) var(--space-4); text-align: center; color: var(--text-muted); font-size: var(--fs-md); }

.ui-page-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-4); margin-bottom: var(--space-4); }
.ui-page-title { margin: 0; font-size: var(--fs-2xl); line-height: 1.3; font-weight: 600; color: var(--text-main); }
.ui-page-meta { font-size: var(--fs-sm); color: var(--text-muted); }
.ui-page-meta b { font-family: var(--font-mono); font-size: var(--fs-lg); color: var(--text-main); }
.ui-page-head:has(+ .ui-page-lead) { margin-bottom: var(--space-1); }
.ui-page-lead { margin: 0 0 var(--space-4); max-width: 960px; font-size: var(--fs-md); line-height: 1.7; color: var(--text-muted); }
.ui-page-lead a { color: var(--primary-fg); }
.ui-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); min-width: 0; }
.ui-card + .ui-card { margin-top: var(--space-4); }
.ui-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); min-height: var(--h-md);
                padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border-color); }
.ui-card-title { margin: 0; font-size: var(--fs-lg); line-height: 1.4; font-weight: 600; color: var(--text-main); }
.ui-card-meta { font-size: var(--fs-sm); color: var(--text-muted); }
.ui-card-body { padding: var(--space-4); }
.ui-card-body.flush { padding: 0; }
.ui-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.ui-spacer { flex: 1 1 auto; }
.ui-count { font-size: var(--fs-sm); color: var(--text-muted); white-space: nowrap; }
.ui-pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--space-1); margin: var(--space-4) 0 var(--space-6); }
.ui-pager .ui-btn[aria-current="page"] { background: var(--primary-soft); border-color: var(--primary-blue); color: var(--primary-fg); font-weight: 600; }
.ui-pager-gap { padding: 0 var(--space-1); color: var(--text-muted); }
.ui-tag { display: inline-flex; align-items: center; gap: var(--space-1); box-sizing: border-box; height: 20px; padding: 0 8px; border: 1px solid var(--border-strong);
          border-radius: 999px; color: var(--text-muted); font-size: var(--fs-xs); font-weight: 600; line-height: 1; white-space: nowrap; }
.ui-tag-primary { color: var(--primary-fg); background: var(--primary-soft); border-color: transparent; }
.ui-tag-success { color: var(--success-fg); background: var(--success-soft); border-color: transparent; }
.ui-tag-warn { color: var(--amber-fg); background: var(--warning-soft); border-color: transparent; }
.ui-tag-danger { color: var(--danger-fg); background: var(--danger-soft); border-color: transparent; }
.ui-menu { box-sizing: border-box; min-width: 200px; padding: var(--space-1); background: var(--bg-raised); border: 1px solid var(--border-strong);
           border-radius: var(--radius-md); box-shadow: var(--shadow-pop); }
.ui-menu-item { display: flex; align-items: center; gap: var(--space-2); box-sizing: border-box; width: 100%; height: 30px; padding: 0 var(--space-3);
                border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-main); font: inherit; font-size: var(--fs-md); text-align: left; cursor: pointer; }
.ui-menu-item:hover { background: var(--bg-card-hover); }
.ui-menu-item svg { width: 16px; height: 16px; flex: none; fill: var(--text-muted); }
.ui-menu-item.danger { color: var(--danger-fg); }
.ui-menu-item.danger svg { fill: var(--danger-fg); }
.ui-menu-item[hidden] { display: none; }
.ui-menu-sep { height: 1px; margin: var(--space-1) 0; background: var(--border-color); }
.ui-pop { box-sizing: border-box; padding: var(--space-3); background: var(--bg-raised); border: 1px solid var(--border-strong);
          border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); font-size: var(--fs-md); }
.ui-ico { width: 16px; height: 16px; flex: none; fill: currentColor; vertical-align: -3px; }
.ui-tag svg { width: 12px; height: 12px; flex: none; fill: currentColor; }
.ui-tag[hidden] { display: none; }
.ui-radio {
    display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); margin-bottom: 8px; cursor: pointer; color: var(--text-main); font-size: var(--fs-md);
}
.ui-radio:has(input:checked) { border-color: var(--primary-line); background: var(--primary-soft); }
.ui-radio small { display: block; color: var(--text-muted); font-size: 11.5px; margin-top: 2px; line-height: 1.5; }
.ui-radio input { margin-top: 3px; flex: none; accent-color: var(--primary-blue); }
.ui-radio:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.ui-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.ui-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); box-sizing: border-box;
    height: var(--h-md); padding: 0 14px; border-radius: var(--radius-md); border: 1px solid var(--border-strong); background: transparent;
    color: var(--text-main); cursor: pointer; font: inherit; font-size: var(--fs-md); line-height: 1; white-space: nowrap; text-decoration: none;
}
.ui-btn:hover:not(:disabled) { background: var(--bg-card-hover); }
.ui-btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.ui-btn:disabled { opacity: .45; cursor: not-allowed; }
.ui-btn[aria-pressed="true"] { color: var(--primary-fg); background: var(--primary-soft); border-color: var(--primary-line); }
.ui-btn[hidden] { display: none; }
.ui-notice[hidden] { display: none; }
.ui-btn svg { width: 16px; height: 16px; flex: none; fill: currentColor; }
.ui-btn-primary { background: var(--primary-strong); border-color: var(--primary-strong); color: var(--accent-text); font-weight: 600; }
.ui-btn-primary:hover:not(:disabled) { background: var(--primary-hover); border-color: var(--primary-hover); }
.ui-btn-danger { background: var(--danger-strong); border-color: var(--danger-strong); color: var(--accent-text); font-weight: 600; }
.ui-btn-danger:hover:not(:disabled) { background: var(--danger-hover); border-color: var(--danger-hover); }
.ui-input.mono { font-family: var(--font-mono); }

.ui-note-top { margin: 0 0 12px; }
.ui-table-wrap { max-height: 50vh; overflow: auto; border: 1px solid var(--border-color); border-radius: var(--radius-lg); }
.ui-table { width: 100%; border-collapse: collapse; font-size: var(--fs-md); color: var(--text-main); }
.ui-table th, .ui-table td { box-sizing: border-box; height: var(--h-row); padding: 6px var(--space-3); text-align: left; border-bottom: 1px solid var(--border-color); white-space: nowrap; }
.ui-table th { font-size: var(--fs-sm); color: var(--text-muted); font-weight: 600; position: sticky; top: 0; background: var(--bg-card); }
.ui-table tbody tr:hover { background-color: var(--row-hover); }
.ui-table td.ui-empty { height: auto; text-align: center; color: var(--text-muted); padding: var(--space-6) var(--space-4); white-space: normal; }
.ui-table .ui-btn { height: var(--h-sm); padding: 0 10px; font-size: var(--fs-sm); }
.ui-table-dense { font-size: var(--fs-sm); }
.ui-table-dense th, .ui-table-dense td { height: var(--h-row-dense); padding: 0 var(--space-2); }
.ui-table-dense .ui-btn { height: 20px; padding: 0 8px; }
.ui-kv { background: var(--bg-base); padding: 15px; border-radius: 6px; margin-bottom: 18px; border: 1px solid var(--border-color);
         font-size: 14px; color: var(--text-main); }
.ui-kv > div + div { margin-top: 8px; }
.ui-kv .k { color: var(--text-muted); display: inline-block; width: 80px; }
.ui-kv hr { border: 0; border-top: 1px dashed var(--border-color); margin: 10px 0; }
.ui-row { display: flex; gap: 10px; }
.ui-row .ui-input { flex: 1; }
.ui-field small { font-weight: normal; }
.ui-choice { cursor: pointer; padding: 15px; border-radius: var(--radius-lg); border: 2px solid var(--border-color); margin-bottom: 10px; transition: .2s; }
.ui-choice-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.ui-choice-label { font-weight: bold; font-size: 13px; }
.ui-choice-date { font-size: 11px; color: var(--text-muted); }
.ui-choice-value { font-size: var(--fs-lg); color: var(--text-main); font-weight: bold; word-break: break-all; }
.ui-choice.sel-sfa { border-color: var(--primary-blue); background: var(--primary-soft); }
.ui-choice.sel-ext { border-color: var(--warning-orange); background: var(--warning-soft); }
.ui-box-narrow { max-width: 460px; }
.ui-box-wide { max-width: 860px; }
.ui-radios { display: inline-flex; gap: 16px; padding: 8px 0; color: var(--text-main); font-size: 13px; }
.ui-radios label { display: inline-flex; gap: 4px; align-items: center; cursor: pointer; }
.ui-check { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-md); color: var(--text-main); cursor: pointer; white-space: nowrap; }
.ui-check input { margin: 0; accent-color: var(--primary-blue); }
.ui-check[hidden] { display: none; }
.ui-btn-sm { height: var(--h-sm); padding: 0 10px; gap: var(--space-1); font-size: var(--fs-sm); }
.ui-btn-sm svg { width: 14px; height: 14px; }
.ui-btn-ghost { border-color: transparent; color: var(--text-muted); }
.ui-btn-ghost:hover:not(:disabled) { color: var(--text-main); }
.ui-btn-icon { width: var(--h-md); padding: 0; }
.ui-btn-sm.ui-btn-icon { width: var(--h-sm); }
.ui-btn-danger-ghost { color: var(--danger-text); border-color: var(--danger-line); }
.ui-btn-danger-ghost:hover:not(:disabled) { background: var(--danger-soft); color: var(--danger-fg); }
.ui-input-sm { height: var(--h-sm); padding: 0 8px; font-size: var(--fs-sm); }
.ui-tabs-sm .ui-tab { height: calc(var(--h-sm) - 2px); padding: 0 10px; font-size: var(--fs-sm); }
.ui-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.ui-chip { height: var(--h-sm); padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 999px; background: transparent;
           color: var(--text-muted); font: inherit; font-size: var(--fs-sm); cursor: pointer; white-space: nowrap; }
.ui-chip:hover { color: var(--text-main); border-color: var(--text-muted); }
.ui-chip.on { color: var(--primary-fg); background: var(--primary-soft); border-color: var(--primary-blue); font-weight: 600; }
.ui-chip:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.ui-tabs { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-md); overflow: hidden; }
.ui-tab { font: inherit; font-size: var(--fs-md); height: calc(var(--h-md) - 2px); padding: 0 14px; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; white-space: nowrap; }
.ui-tab + .ui-tab { border-left: 1px solid var(--border-strong); }
.ui-tab.active { background: var(--primary-strong); color: var(--accent-text); font-weight: 600; }
.ui-tab:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.ui-tab:hover:not(.active):not(:disabled) { background: var(--bg-card-hover); color: var(--text-main); }
.ui-tab:disabled { opacity: .45; cursor: not-allowed; }

.sidebar {
    width: var(--cti-side-w);
    background-color: var(--bg-card);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    transition: width 0.26s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.5);
    z-index: var(--z-float);
    overflow: hidden;
}

.sidebar-menu {
    flex-grow: 1;
    padding: 20px 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.menu-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--cti-icon-gap);
    padding: 12px 20px 12px var(--cti-icon-x);
    position: relative;
    box-sizing: border-box;
    color: var(--text-muted);
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    white-space: nowrap;
}

.menu-item:hover {
    background-color: var(--bg-card-hover);
    color: var(--text-main);
}

.menu-item.active {
    background-color: var(--accent-bg);
    color: var(--accent-text);
}

.menu-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent-text);
}

.admin-menu {
    color: var(--text-muted);
}

.menu-icon {
    width: var(--cti-icon-box);
    height: var(--cti-icon-box);
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.menu-text {
    transition: opacity 0.2s;
}

.menu-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 15px var(--cti-icon-x);
}

.sidebar-footer {
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
    white-space: nowrap;
}

.user-info {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--cti-icon-gap);
    padding: 10px 20px 10px var(--cti-icon-x);
    box-sizing: border-box;
    color: var(--text-muted);
    font-size: 14px;
}

.logout-btn {
    color: var(--danger-red);
}

.logout-btn:hover {
    background-color: rgba(var(--danger-rgb), 0.1);
    color: var(--danger-fg);
}

.menu-text {
    white-space: nowrap;
    min-width: 0;
    max-width: 220px;
    overflow: hidden;
    transition: max-width 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar.cti-collapsed .menu-text { max-width: 0; }

.sidebar.cti-collapsed:not(.cti-anim) .menu-text {
    display: none;
}

.cti-badge {
    width: 100%;
    box-sizing: border-box;
    background: none;
    border: none;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.cti-badge:hover {
    background-color: var(--bg-card-hover);
}

.settings-btn { width: 100%; box-sizing: border-box; background: none; border: none; font: inherit; text-align: left; cursor: pointer; }
.menu-btn { width: 100%; box-sizing: border-box; background: none; border: none; font: inherit; text-align: left; cursor: pointer; }

.cti-dot svg { width: 14px; height: 14px; }
.cti-badge.cti-neutral .cti-dot svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
}
.cti-badge.cti-ok .cti-dot { color: var(--success-green); }
.cti-badge.cti-warn .cti-dot { color: var(--warning-orange); }
.cti-badge.cti-bad .cti-dot { color: var(--danger-red); }
.cti-badge.cti-neutral .cti-dot { color: var(--text-muted); }

.cti-badge.cti-bad .cti-badge-label { color: var(--danger-red); }
.cti-badge.cti-warn .cti-badge-label { color: var(--warning-orange); }

.sidebar.cti-collapsed { width: var(--cti-side-w-min); }

.sidebar { --cti-sc: var(--cti-st-idle); }
.sidebar[data-s="calling"] { --cti-sc: var(--cti-st-calling); }
.sidebar[data-s="talking"] { --cti-sc: var(--cti-st-talking); }
.sidebar[data-s="hold"]    { --cti-sc: var(--cti-st-hold); }
.sidebar[data-s="ring"]    { --cti-sc: var(--cti-st-ring); }

.cti-st-bar { display: none; }
.sidebar.cti-on .cti-st-bar {
    display: flex; align-items: center; justify-content: flex-start;
    gap: var(--cti-icon-gap);
    flex: none; width: 100%; box-sizing: border-box; border: none; cursor: pointer;
    text-align: left; font: inherit; color: var(--text-main);
    padding: 10px 12px 10px var(--cti-icon-x);
    background:
        linear-gradient(90deg,
            color-mix(in srgb, var(--cti-sc) 52%, transparent) 0%,
            color-mix(in srgb, var(--cti-sc) 14%, transparent) 45%,
            color-mix(in srgb, var(--cti-sc) 14%, transparent) 100%),
        var(--bg-card-hover);
    border-bottom: 1px solid color-mix(in srgb, var(--cti-sc) 40%, var(--border-color));
}
.sidebar[data-s="ring"]    .cti-st-bar { animation: ctiPulse 1.1s ease-in-out infinite; }
@keyframes ctiPulse { 50% { opacity: .55; } }
.sidebar.cti-on .cti-st-bar:hover { filter: brightness(1.12); }
.cti-st-bar:focus-visible { outline: 2px solid var(--text-main); outline-offset: -2px; }

.cti-st-dot {
    width: var(--cti-icon-box); height: var(--cti-icon-box); flex: none;
    display: flex; align-items: center; justify-content: center;
    position: relative;
    --cti-ic: color-mix(in srgb, var(--cti-sc) 55%, #fff);
    --cti-ring-c: color-mix(in srgb, var(--cti-ic) 60%, transparent);
    color: var(--cti-ic);
}
.cti-st-dot::before, .cti-st-dot::after {
    content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
}
.cti-st-txt {
    min-width: 0; flex: 1; display: block;
    max-width: 220px; overflow: hidden;
    transition: max-width 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar.cti-collapsed .cti-st-txt { max-width: 0; }
.cti-st-label {
    display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .1em;
    white-space: nowrap;
    color: color-mix(in srgb, var(--cti-sc) 58%, #fff);
}
.cti-st-num {
    display: block; font-family: var(--cti-mono); font-size: 12.5px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cti-st-time { display: block; font-family: var(--cti-mono); font-size: 11.5px;
               white-space: nowrap; color: var(--text-muted); }
.sidebar[data-view="keypad"] .cti-st-txt { height: 30px; display: flex; flex-direction: column; justify-content: center; }
.sidebar[data-view="keypad"] .cti-st-num,
.sidebar[data-view="keypad"] .cti-st-time { display: none; }
.sidebar.cti-collapsed:not(.cti-anim) .cti-st-txt { display: none; }

.sidebar-panes { flex: 1; position: relative; overflow: hidden; }
.cti-pane {
    position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden;
    transition: opacity .22s ease, transform .26s cubic-bezier(.4, 0, .2, 1);
}
.cti-pane[data-hidden="true"] { opacity: 0; pointer-events: none; }
.cti-pane-menu[data-hidden="true"]   { transform: translateX(-14px); }
.cti-pane-keypad[data-hidden="true"] { transform: translateX(14px); }
.cti-pane-keypad:focus { outline: none; }

.cti-pane-menu { display: flex; flex-direction: column; }
.menu-items { flex: none; }
.menu-gap { flex: 1; min-height: 24px; }
.sidebar.cti-collapsed .menu-gap { cursor: e-resize; }
.sidebar.cti-collapsed .menu-gap:hover { background: rgba(255, 255, 255, .035); }

.sidebar.cti-collapsed .cti-pane-keypad { display: none; }

.cti-kp-head { display: flex; align-items: center; padding: 6px 8px 2px; }
.cti-kp-back {
    display: flex; align-items: center; gap: 6px;
    background: transparent; border: none; cursor: pointer;
    color: var(--text-muted); font: inherit; font-size: 12px;
    padding: 5px 8px; border-radius: 7px;
}
.cti-kp-back:hover { background: var(--bg-card-hover); color: var(--text-main); }
.cti-kp-back:focus-visible { outline: 2px solid var(--cti-st-calling); outline-offset: 1px; }
.cti-kp-back svg { width: 14px; height: 14px; fill: currentColor; flex: none; }

.cti-pane-keypad { display: flex; flex-direction: column; }
.cti-kp { padding: 2px 10px 12px; display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }

.cti-card {
    border: 1px solid color-mix(in srgb, var(--cti-sc) 45%, transparent);
    background: linear-gradient(180deg, color-mix(in srgb, var(--cti-sc) 14%, transparent),
                                        color-mix(in srgb, var(--cti-sc) 4%, transparent));
    border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px;
}
.cti-card-h { display: flex; align-items: center; gap: 7px; min-width: 0; }
.cti-card-ico {
    width: 20px; height: 20px; flex: none; display: flex; align-items: center; justify-content: center; position: relative;
    --cti-ic: color-mix(in srgb, var(--cti-sc) 55%, #fff); color: var(--cti-ic);
}
.cti-card-ico .cti-st-ico { width: 17px; height: 17px; animation: none !important; }
.cti-card-ico .cti-st-badge { right: -4px; bottom: -4px; transform: scale(.85); }
.cti-card-ico .cti-st-badge-warn { top: -5px; bottom: auto; }
.cti-card-h .cti-st-label, .cti-card-h .cti-st-alt { font-size: 12px; letter-spacing: .04em; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cti-card-time { margin-left: auto; flex: none; font: 12px/1 var(--cti-mono); color: #cfd3da; }
.cti-card-h { height: 20px; }
.cti-hd-btn {
    flex: none; width: 22px; height: 22px; margin: -1px 0; padding: 0; display: flex; align-items: center; justify-content: center;
    border-radius: 6px; border: 1px solid rgba(255, 255, 255, .14); background: transparent; color: var(--text-muted); cursor: pointer;
}
.cti-hd-btn:hover { background: rgba(255, 255, 255, .07); }
.cti-hd-btn:focus-visible { outline: 2px solid var(--cti-st-calling); outline-offset: 1px; }
.cti-vo-btn .cti-cg-dot { width: 10px; height: 10px; }
.cti-kp-num {
    font: 600 19px/23px var(--cti-mono); letter-spacing: .02em; text-align: left;
    padding: 0; height: 23px; outline: none; color: #f2f2f3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 4px;
}
.cti-kp-num.is-text { font-family: inherit; font-weight: 700; font-size: 15px; line-height: 23px; }
.cti-kp-num[contenteditable="true"] { cursor: text; }
.cti-kp-num[contenteditable="true"]:empty::before { content: attr(data-ph); color: #6b7280; font-weight: 600; }
.cti-kp-num:focus-visible { box-shadow: 0 0 0 2px var(--cti-st-calling); }
.cti-card-sub { display: flex; align-items: center; gap: 6px; height: 16px; margin-top: -4px; min-width: 0; }
.cti-kp-sub {
    flex: 1 1 auto; min-width: 0; font-size: 12px; color: var(--text-muted); line-height: 16px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.cti-card-banner { display: flex; flex-direction: column; gap: 6px; }
.cti-card-banner:empty { display: none; }
.cti-card-banner .cti-as-card { margin: 0; background: #1b1c1f; box-shadow: 0 6px 18px rgba(0, 0, 0, .55); }
.cti-bn {
    border: 1px solid rgba(var(--danger-rgb), .7); background: color-mix(in srgb, var(--danger-red) 14%, #1b1c1f); border-radius: 8px;
    padding: 8px; display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; line-height: 1.45;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .55);
}
.cti-bn-h { font-size: 12px; font-weight: 700; color: var(--danger-fg); }
.cti-bn-t { color: var(--danger-fg); }

.cti-kp-act { display: flex; gap: 6px; align-items: stretch; min-height: 46px; }
.cti-act {
    flex: 1 1 0; min-width: 0; height: 46px; border-radius: 9px; border: 1px solid transparent; cursor: pointer;
    display: none; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: var(--accent-text); font: inherit; padding: 0 2px; position: relative;
    transition: background .2s, opacity .2s;
}
.cti-act svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.cti-act-lbl { font-size: 11px; font-weight: 600; line-height: 1; white-space: nowrap; }
.cti-fkey {
    position: absolute; right: -3px; bottom: -5px;
    padding: 2px 3px; border-radius: 3px;
    font: 700 9px/1 var(--cti-mono); letter-spacing: 0;
    background: #111214; color: var(--text-main); border: 1px solid rgba(255, 255, 255, .25);
    pointer-events: none;
}
.cti-act:disabled { opacity: .4; cursor: not-allowed; }
.cti-act:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.sidebar[data-s="idle"]    .cti-act-call,
.sidebar[data-s="idle"]    .cti-act-back,
.sidebar[data-s="calling"] .cti-act-end,
.sidebar[data-s="talking"] .cti-act-hold,
.sidebar[data-s="talking"] .cti-act-end,
.sidebar[data-s="hold"]    .cti-act-hold,
.sidebar[data-s="hold"]    .cti-act-end,
.sidebar[data-s="ring"]    .cti-act-reject,
.sidebar[data-s="ring"]    .cti-act-answer { display: flex; }

.cti-act-call, .cti-act-answer { background: var(--cti-btn-call); border-color: var(--cti-btn-call); }
.cti-act-call { flex-grow: 3; }
.cti-act-end, .cti-act-reject  { background: var(--cti-btn-end); border-color: var(--cti-btn-end); }
.cti-act-hold { background: var(--bg-card-hover); border-color: rgba(255, 255, 255, .16); color: var(--text-main); }
.cti-act-hold[aria-pressed="true"] { background: var(--cti-st-hold); border-color: var(--cti-st-hold); color: var(--bg-card); }
.cti-lbl-unhold, .cti-act-hold[aria-pressed="true"] .cti-lbl-hold { display: none; }
.cti-act-hold[aria-pressed="true"] .cti-lbl-unhold { display: inline; }
.cti-lbl-cancel, .sidebar[data-s="calling"] .cti-lbl-end { display: none; }
.sidebar[data-s="calling"] .cti-lbl-cancel { display: inline; }
.cti-act-back { flex-grow: 1; background: transparent; border-color: rgba(255, 255, 255, .14); color: var(--text-muted); }
.cti-act-back svg { width: 20px; height: 20px; }
.cti-act-back:hover:not(:disabled) { color: var(--text-main); }

.cti-hint-slot { position: relative; height: 17px; margin: 6px 2px 0; flex: none; }
.cti-float { position: absolute; top: 0; left: 0; right: 0; z-index: 6; display: flex; flex-direction: column; gap: 6px; }
.cti-kp-hint {
    font-size: 11.5px; line-height: 17px; height: 17px; color: var(--text-muted); text-align: center;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cti-kp-hint[data-fail="error"], .cti-kp-hint[data-fail="warn"], .cti-kp-hint[data-fail="info"] {
    height: auto; white-space: normal; overflow-wrap: anywhere; line-height: 1.5; pointer-events: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .55);
    text-align: left; color: var(--danger-fg); padding: 6px 8px; border-radius: 7px;
    border: 1px solid rgba(220, 38, 38, .55); background: color-mix(in srgb, #dc2626 14%, #1b1c1f);
}
.cti-kp-hint[data-fail="info"] { color: #b9cdf0; border-color: rgba(91, 141, 217, .55); background: color-mix(in srgb, #5b8dd9 14%, #1b1c1f); }

.cti-tabs { display: flex; margin-top: 8px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.cti-tab {
    flex: 1 1 0; height: 36px; display: flex; align-items: center; justify-content: center; gap: 5px;
    background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer;
    font: inherit; font-size: 12px; font-weight: 600; color: var(--text-muted); white-space: nowrap;
}
.cti-tab svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.cti-tab:hover { color: var(--text-main); }
.cti-tab:focus-visible { outline: 2px solid var(--cti-st-calling); outline-offset: -2px; }
.sidebar[data-pane="kp"] .cti-tab-kp,
.sidebar[data-pane="hist"] .cti-tab-hist,
.sidebar[data-pane="as"] .cti-tab-as { color: #f2f2f3; border-bottom-color: var(--text-main); }
.cti-tab-badge {
    min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 8px;
    font: 700 10px/16px var(--cti-mono); text-align: center; color: var(--bg-card); background: #5b8dd9;
}
.cti-tab-badge:empty { display: none; }
.cti-tab-badge[data-tone="g"] { background: #57a978; }
.cti-tab-badge[data-tone="o"] { background: var(--warning-orange); }
.cti-tab-badge[data-tone="r"] { background: #dc2626; color: #fff; }
.cti-tab-badge[data-tone="p"] { background: #8e7cc3; }

.cti-tabpanel { padding-top: 10px; flex: 1 1 auto; min-height: 120px; overflow-y: auto; overflow-x: hidden; }
.sidebar.cg-on:not([data-pane="as"]) .cti-tabpanel-as,
.sidebar.cg-on:not([data-pane="hist"]) .cti-tabpanel-hist,
.sidebar.cg-on:is([data-pane="as"], [data-pane="hist"]) .cti-tabpanel-kp { display: none; }

.cti-tabpanel-hist { display: flex; flex-direction: column; overflow: hidden; }
.cti-hist-filters {
    display: flex; flex: none; border: 1px solid rgba(255, 255, 255, .14); border-radius: 7px; overflow: hidden;
}
.cti-hist-filter {
    flex: 1 1 auto; height: 26px; padding: 0 2px; display: flex; align-items: center; justify-content: center; gap: 3px;
    background: transparent; border: none; border-left: 1px solid rgba(255, 255, 255, .1); cursor: pointer;
    font: inherit; font-size: 11.5px; font-weight: 600; color: var(--text-muted); white-space: nowrap;
}
.cti-hist-filter:first-child { border-left: 0; }
.cti-hist-filter:hover { color: var(--text-main); }
.cti-hist-filter.is-on { background: #34353a; color: #f2f2f3; }
.cti-hist-filter .cti-tab-badge { min-width: 14px; height: 14px; line-height: 14px; font-size: 9.5px; padding: 0 3px; }
.cti-hist-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin-top: 4px; }
.cti-hist-day { font-size: 10px; color: var(--text-muted); padding: 4px 0 1px; }
.cti-hist-note { font-size: 11.5px; color: var(--text-muted); text-align: center; padding: 12px 0; }
.cti-hist-row {
    display: flex; align-items: center; gap: 4px; padding: 2px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.cti-hist-main { flex: 1 1 auto; min-width: 0; min-height: 29px; display: flex; flex-direction: column; justify-content: center; margin-left: 2px; }
.cti-hist-l1 { display: flex; align-items: baseline; gap: 4px; min-width: 0; line-height: 1.25; white-space: nowrap; overflow: hidden; }
.cti-hist-name { font-size: 12px; font-weight: 600; color: #f2f2f3; }
.cti-mqbox { display: block; flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; }
.cti-mq { display: inline-block; white-space: nowrap; }
.cti-mqbox.is-mq { -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 10px), transparent);
                   mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 10px), transparent); }
.cti-mqbox.is-mq .cti-mq { animation: ctiMarquee var(--mq-dur, 6s) ease-in-out infinite alternate; will-change: transform; }
.cti-hist-row:hover .cti-mqbox.is-mq .cti-mq { animation-play-state: paused; }
@keyframes ctiMarquee { 0%, 18% { transform: translateX(0); } 82%, 100% { transform: translateX(var(--mq-dx, 0)); } }
@media (prefers-reduced-motion: reduce) { .cti-mqbox.is-mq .cti-mq { animation: none; } }
.cti-hist-row.is-miss .cti-hist-name { color: #f87171; }
.cti-hist-rel { margin-left: 5px; font-size: 10px; font-weight: 500; color: var(--text-muted); }
.cg-hist-body .cti-hist-rel { font-size: 11.5px; }
.cti-hist-l2 { font-size: 10px; line-height: 1.25; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cti-hist-l2 .cti-hist-num { font: 10.5px/1.25 var(--cti-mono); color: #cfd3da; margin-right: 1px; }
.cti-hist-main.is-one .cti-hist-num { font: 600 12px/1.25 var(--cti-mono); color: #f2f2f3; margin-right: 0; }
.cti-hist-nonum { font-size: 12px; font-weight: 600; color: #cfd3da; }
.cti-hist-row.is-miss .cti-hist-main.is-one .cti-hist-num, .cti-hist-row.is-miss .cti-hist-nonum { color: #f87171; }
.cti-hist-row.is-miss .cti-hist-l2 { color: #f87171; }
.cti-hist-dur { flex: none; width: 34px; text-align: right; font: 10px/1 var(--cti-mono); color: #cfd3da; white-space: nowrap; }
.cti-hist-at { flex: none; width: 31px; text-align: right; font: 10px/1 var(--cti-mono); color: var(--text-muted); white-space: nowrap; }
.cti-hist-re-ph { flex: none; width: 26px; height: 26px; }
.cti-hist-tag { display: inline-block; flex: none; margin-left: 4px; padding: 0 4px; border-radius: 4px; font-size: 9.5px; line-height: 1.45;
                border: 1px solid rgba(180, 167, 232, .6); color: #b4a7e8; }
.cti-hist-tag.is-rej { border-color: rgba(248, 113, 113, .6); color: #f87171; }
.cti-hist-re {
    flex: none; width: 26px; height: 26px; padding: 0; display: flex; align-items: center; justify-content: center;
    border-radius: 7px; cursor: pointer; background: transparent; border: 1px solid rgba(22, 163, 74, .55); color: #8fd3a8;
}
.cti-hist-re svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cti-hist-re:hover:not(:disabled) { background: rgba(22, 163, 74, .14); }
.cti-hist-re:disabled { opacity: .35; cursor: not-allowed; }
.cti-hist-more {
    display: block; width: 100%; margin: 4px 0 2px; padding: 7px 0; background: none; border: none; cursor: pointer;
    font: inherit; font-size: 11.5px; font-weight: 600; color: #93b4e6; text-align: center;
}
.cti-hist-more:hover { text-decoration: underline; }
.cti-hist-more:focus-visible { outline: 2px solid var(--cti-st-calling); outline-offset: -2px; border-radius: 6px; }

.cti-hico { position: relative; flex: none; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; }
.cti-hico > svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.cti-hico-out { color: #8fd3a8; }
.cti-hico-out.is-na { color: var(--text-muted); }
.cti-hico-in { color: #7fa6e6; }
.cti-hico-miss { color: #f87171; }
.cti-hico-join { color: #b4a7e8; }
.cti-hico-req { color: var(--warning-orange); }
.cti-hico-swap {
    position: absolute; right: -3px; bottom: -3px; width: 11px; height: 11px; border-radius: 50%;
    background: currentColor; box-shadow: 0 0 0 1.5px var(--bg-card); display: flex;
}
.cti-hico-swap svg { width: 11px; height: 11px; fill: none; stroke: var(--bg-card); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }

.cti-kp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cti-kp-key {
    height: 44px; border-radius: 10px;
    background: var(--bg-card-hover); border: 1px solid rgba(255, 255, 255, .08); color: var(--text-main);
    font: 500 18px/1 var(--cti-mono); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .12s, transform .08s;
}
.cti-kp-key:hover { background: #34363b; }
.cti-kp-key:active, .cti-kp-key.is-pressed { background: rgba(91, 141, 217, .28); transform: scale(.96); }
.cti-kp-key:focus-visible { outline: 2px solid var(--cti-st-calling); outline-offset: 2px; }

.cti-kp-sent {
    margin-top: 8px; padding: 5px 10px; background: #26272a;
    border: 1px solid rgba(255, 255, 255, .1); border-radius: 8px;
    display: flex; align-items: center; gap: 8px;
}
.cti-kp-sent[hidden] { display: none; }
.cti-kp-sent b { flex: none; font-size: 11px; color: var(--text-muted); font-weight: 400; }
.cti-kp-sent span {
    font: 600 14px/1.3 var(--cti-mono); letter-spacing: .1em;
    overflow-wrap: anywhere; color: var(--text-main);
}

.sidebar-fold {
    width: 100%; box-sizing: border-box; background: none; border: none; font: inherit;
    text-align: left; cursor: pointer;
}
.sidebar-fold-ico { transition: transform .26s; }
.sidebar.cti-collapsed .sidebar-fold-ico { transform: rotate(180deg); }

.sidebar.cti-on ~ .main-content .num-cell[data-phone] { cursor: pointer; }
.sidebar.cti-on ~ .main-content .num-cell[data-phone]:hover {
    background-color: rgba(87, 169, 120, 0.18);
}
.sidebar.cti-on ~ .main-content td.cti-dial { cursor: pointer; }
.sidebar.cti-on ~ .main-content td.cti-dial:hover { color: var(--success-green); }

.sidebar[data-s="busy"] .cti-act-call,
.sidebar[data-s="busy"] .cti-act-back { display: flex; }
.sidebar[data-s="busy"] { --cti-sc: var(--cti-st-busy); }

.sidebar.cg-on[data-cap-hold="0"] .cti-act-hold,
.sidebar.cg-on[data-cap-answer="0"] .cti-act-answer { display: none; }

.cti-act-mute { background: var(--bg-card-hover); border-color: rgba(255, 255, 255, .16); color: var(--text-main); }
.cti-act-mute[aria-pressed="true"] { background: rgba(220, 38, 38, .16); color: var(--danger-fg); border-color: var(--cti-btn-end); }
.cti-lbl-micoff, .cti-act-mute[aria-pressed="true"] .cti-lbl-mic { display: none; }
.cti-act-mute[aria-pressed="true"] .cti-lbl-micoff { display: inline; }
.sidebar.cg-on[data-s="talking"]:not([data-cap-mute="0"]) .cti-act-mute { display: flex; }

.cti-st-voice {
    display: block; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    color: var(--warning-orange);
}
.cti-st-voice:empty { display: none; }
.sidebar[data-voice="lost"] .cti-st-voice,
.sidebar[data-voice="error"] .cti-st-voice { color: var(--danger-fg); }

.cti-cg-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--text-muted); }
.sidebar[data-voice="connected"] .cti-cg-dot { background: var(--success-green); }
.sidebar[data-voice="claiming"] .cti-cg-dot,
.sidebar[data-voice="connecting"] .cti-cg-dot { background: var(--cti-st-calling); animation: ctiPulse 1.1s ease-in-out infinite; }
.sidebar[data-voice="lost"] .cti-cg-dot { background: var(--danger-red); animation: ctiPulse .8s ease-in-out infinite; }
.sidebar[data-voice="error"] .cti-cg-dot { background: var(--danger-red); }
.sidebar[data-voice="other_tab"] .cti-cg-dot,
.sidebar[data-voice="other_user"] .cti-cg-dot { background: var(--warning-orange); }
.cti-cg-btns { display: flex; flex: none; gap: 4px; }
.cti-cg-btn {
    display: none; height: 16px; padding: 0 6px; font: inherit; font-size: 10.5px; line-height: 14px; border-radius: 4px; cursor: pointer;
    background: transparent; border: 1px solid var(--border-color); color: var(--text-main); white-space: nowrap;
}
.cti-cg-btn:hover { background: var(--bg-card); }
.cti-cg-btn:focus-visible { outline: 2px solid var(--cti-st-calling); outline-offset: 1px; }
.sidebar[data-audio="blocked"] .cti-cg-play { display: inline-block; border-color: var(--warning-orange); color: var(--warning-orange); }
.sidebar[data-voice="other_tab"] .cti-cg-take { display: inline-block; border-color: var(--warning-orange); color: var(--warning-orange); }

.sidebar.cg-on.cti-on[data-assist="sup"][data-s] .cti-act-end,
.sidebar.cg-on.cti-on[data-assist="sup"][data-s] .cti-act-hold,
.sidebar.cg-on.cti-on[data-assist="sup"][data-s] .cti-act-mute,
.sidebar.cg-on.cti-on[data-assist="op-listen"][data-s] .cti-act-end,
.sidebar.cg-on.cti-on[data-assist="op-listen"][data-s] .cti-act-hold,
.sidebar.cg-on.cti-on[data-assist="op-listen"][data-s] .cti-act-mute { display: none; }

.cti-as { display: flex; flex-direction: column; gap: 6px; }
.cti-as:empty { display: none; }
.cti-as-empty { font-size: 11.5px; color: var(--text-muted); text-align: center; padding: 8px 0; }
.cti-as:not(:empty) + .cti-as-empty { display: none; }

.cti-as-acts { display: contents; }
.cti-act.cti-act-as { display: flex; background: var(--bg-card-hover); border-color: rgba(255, 255, 255, .16); color: var(--text-main); }
.cti-act-as svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cti-act.cti-act-leave { background: transparent; border-color: var(--cti-btn-end); color: #f87171; }
.cti-act.cti-act-rejoin { background: var(--primary-blue); border-color: var(--primary-blue); color: var(--accent-text); flex-grow: 2; }
.cti-act.cti-as-ptt { user-select: none; touch-action: none; }
.cti-act.cti-as-ptt.is-on,
.sidebar[data-ptt="1"] .cti-act.cti-as-ptt { background: var(--cti-btn-call); border-color: var(--cti-btn-call); color: var(--accent-text); }
.cti-as-card {
    padding: 7px 8px; border: 1px solid var(--border-color); border-radius: 8px;
    background: var(--bg-card-hover); font-size: 11.5px; color: var(--text-main);
}
.cti-as-card-req { border-color: rgba(245,158,11,.38); box-shadow: none; background: linear-gradient(180deg, rgba(245,158,11,.12), rgba(245,158,11,.05)); padding: 10px; border-radius: 10px; }
.cti-as-card-join { border-color: var(--cti-st-calling); }
.cti-as-card-h { line-height: 1.45; overflow-wrap: anywhere; }
.cti-as-sub { color: var(--text-muted); font-size: 11px; margin-top: 2px; overflow-wrap: anywhere; }
.cti-as-ops { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.cti-as-btn {
    position: relative; padding: 4px 10px; font: inherit; font-size: 11.5px; border-radius: 6px; cursor: pointer;
    background: transparent; border: 1px solid var(--border-color); color: var(--text-main);
}
.cti-as-btn:hover:not(:disabled) { background: var(--bg-card); }
.cti-as-btn:disabled { opacity: .45; cursor: not-allowed; }
.cti-as-btn:focus-visible { outline: 2px solid var(--cti-st-calling); outline-offset: 1px; }
.cti-as-btn-primary { background: var(--primary-blue); border-color: transparent; color: var(--accent-text); }
.cti-as-btn-danger { border-color: rgba(220, 38, 38, .6); color: var(--danger-fg); }
.cti-as-btn .cti-fkey { right: -6px; bottom: -6px; }
.cti-as-ptt { padding: 6px 12px; user-select: none; touch-action: none; }
.cti-ptt-on, .cti-ptt-hint { display: none; }
.cti-as-ptt.is-on,
.sidebar[data-ptt="1"] .cti-as-ptt { background: var(--cti-btn-call); border-color: transparent; color: var(--accent-text); }
.cti-as-tag {
    display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 4px; font-size: 10px; line-height: 1.5;
    border: 1px solid var(--border-color); color: var(--text-muted); white-space: nowrap;
}
.cti-as-tag-sp { color: #86efac; border-color: rgba(34, 197, 94, .5); }
.cti-as-tag-ghost { color: #c4b5fd; border-color: rgba(139, 92, 246, .5); }
.cti-as-tag-ptt { color: #fde68a; border-color: rgba(var(--warning-rgb), .6); }
.cti-as-tag-warn { color: var(--danger-fg); border-color: rgba(220, 38, 38, .5); }
.cti-as-parts, .cti-as-lines { list-style: none; margin: 4px 0 0; padding: 0; }
.cti-as-parts li { padding: 2px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.cti-as-parts li .cti-as-btn { margin-left: auto; padding: 2px 8px; }
.cti-as-since { font-variant-numeric: tabular-nums; color: var(--text-muted); margin-left: 4px; }
.cti-as-card-lines { padding: 0; border: none; background: transparent; }
.cti-as-lines-h { display: flex; align-items: baseline; justify-content: space-between; padding: 0 2px 4px; }
.cti-as-lines-h b { font-size: 12px; font-weight: 700; }
.cti-as-lines-h span { font-size: 11px; color: var(--text-muted); }
.cti-as-lines { background: var(--bg-base); border-radius: 10px; overflow: hidden; }
.cti-as-line { position: relative; display: flex; align-items: center; gap: 8px; padding: 7px 6px 7px 8px; }
.cti-as-line + .cti-as-line::before { content: ""; position: absolute; top: 0; left: 48px; right: 0; height: 1px; background: var(--border-color); }
.cti-as-line-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cti-as-line-top { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 5px; min-width: 0; }
.cti-as-line-name { font-size: 12.5px; font-weight: 600; }
.cti-as-hosp { font-size: 11.5px; color: var(--text-muted); }
.cti-as-line-meta { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.cti-as-line-meta .cti-as-since { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--success-fg, #6ee7b7); }
.cti-as-calling { font-size: 11px; font-weight: 600; color: var(--text-main); }
.cti-as-line-no { font-size: 10.5px; color: var(--text-muted); }
.cti-as-line-joined { flex: none; font-size: 10.5px; color: var(--text-muted); }
.cti-as-chip { display: inline-block; font-size: 10px; line-height: 1.5; padding: 0 5px; border-radius: 5px;
    background: rgba(255,255,255,.08); color: var(--text-muted); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.cti-as-chip-help { background: rgba(245,158,11,.14); color: #fbbf24; font-weight: 700; }
.cti-as-chip-sp { background: rgba(34,197,94,.14); color: #86efac; }
.cti-as-chip-listen { background: var(--primary-soft); color: var(--primary-fg); }
.cti-as-listen { flex: none; width: 30px; height: 30px; padding: 0; border: none; border-radius: 50%; background: var(--primary-soft);
    color: var(--primary-fg); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.cti-as-listen svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cti-as-listen:hover:not(:disabled) { background: rgba(var(--primary-rgb), .26); }
.cti-as-listen:disabled { opacity: .4; cursor: not-allowed; }
.cti-as-listen:focus-visible { outline: 2px solid var(--cti-st-calling); outline-offset: 1px; }
.cti-as-req-top { display: flex; align-items: center; gap: 10px; }
.cti-as-req-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cti-as-req-kind { font-size: 10.5px; font-weight: 700; color: #fbbf24; }
.cti-as-req-who { font-size: 12px; }
.cti-as-req-who b { font-weight: 600; }
.cti-as-card-req .cti-as-hosp { color: #b6bac0; }
.cti-as-card-req .cti-as-sub { margin-top: 0; }
.cti-as-btn-go { background: #16a34a; border-color: transparent; color: #fff; font-weight: 700; }
.cti-as-btn-go:hover:not(:disabled) { background: #15803d; }
.sfa-av.cti-as-av-ring { border: 2px solid #f59e0b; animation: ctiAvRing 1.6s ease-out infinite; }
@keyframes ctiAvRing { 0% { box-shadow: 0 0 0 0 rgba(245,158,11,.55); } 70% { box-shadow: 0 0 0 9px rgba(245,158,11,0); } 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0); } }
@media (prefers-reduced-motion: reduce) { .sfa-av.cti-as-av-ring { animation: none; } }
.cti-as-confirm { width: 100%; color: #fde68a; font-size: 11px; }
.cti-as-alert { color: var(--danger-fg); font-size: 11px; margin-top: 3px; overflow-wrap: anywhere; }
.cti-as-target { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 11px; color: var(--text-muted); }
.cti-as-target select {
    flex: 1 1 auto; min-width: 0; background: var(--bg-base); color: var(--text-main);
    border: 1px solid var(--border-strong); border-radius: 6px; padding: 3px 6px; font: inherit; font-size: 11.5px;
    color-scheme: dark;
}

.cti-st-ico {
    display: none; width: 20px; height: 20px; position: relative;
    fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.sidebar[data-as-alert="ring"] .cti-st-ico-in { display: block; }
.sidebar:not([data-as-alert="ring"]):is([data-assist="sup"], [data-assist="op-listen"]) .cti-st-ico-head { display: block; }
.sidebar:not([data-as-alert="ring"], [data-assist="sup"], [data-assist="op-listen"])[data-s="calling"] .cti-st-ico-out,
.sidebar:not([data-as-alert="ring"], [data-assist="sup"], [data-assist="op-listen"])[data-s="ring"] .cti-st-ico-in,
.sidebar:not([data-as-alert="ring"], [data-assist="sup"], [data-assist="op-listen"])[data-s="talking"] .cti-st-ico-call,
.sidebar:not([data-as-alert="ring"], [data-assist="sup"], [data-assist="op-listen"])[data-s="hold"] .cti-st-ico-pause,
.sidebar:not([data-as-alert="ring"], [data-assist="sup"], [data-assist="op-listen"]):is([data-s="idle"], [data-s="busy"]) .cti-st-ico-phone { display: block; }

.cti-st-badge {
    display: none; position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 50%;
    background: var(--cti-ic); box-shadow: 0 0 0 1.5px var(--bg-card);
    align-items: center; justify-content: center;
}
.cti-st-badge svg { width: 12px; height: 12px; fill: none; stroke: var(--bg-card); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.cti-st-badge-user svg { fill: var(--bg-card); stroke: none; }
.sidebar:not([data-as-alert="ring"]):is([data-assist="sup-speaker"], [data-assist="op-listen"]) .cti-st-badge-swap,
.sidebar:not([data-as-alert="ring"], [data-assist="sup"], [data-assist="op-listen"])[data-s="busy"] .cti-st-badge-user { display: flex; }
.cti-st-badge-warn { right: -4px; top: -4px; bottom: auto; background: var(--danger-red); }
.cti-st-badge-warn svg { stroke: #fff; stroke-width: 1.6; }
.sidebar[data-as-alert="cut"] .cti-st-badge-warn { display: flex; }
.cti-st-count {
    display: none; position: absolute; right: -8px; top: -6px; min-width: 15px; height: 15px; padding: 0 4px;
    box-sizing: border-box; border-radius: 8px; background: var(--warning-orange); color: var(--bg-card);
    font: 700 10px/15px var(--cti-mono); text-align: center; box-shadow: 0 0 0 2px var(--bg-card);
}
.sidebar[data-as-alert="req"] .cti-st-count:not(:empty) { display: block; }

.sidebar[data-as-left="1"] { --cti-sc: var(--cti-st-idle); }
.sidebar[data-as-alert="ring"],
.sidebar[data-as-alert="cut"] { --cti-sc: var(--cti-st-ring); }
.sidebar[data-as-alert="req"] .cti-st-dot { --cti-ring-c: color-mix(in srgb, var(--warning-orange) 65%, transparent); }

@keyframes ctiRing { 0% { box-shadow: 0 0 0 0 var(--cti-ring-c); } 100% { box-shadow: 0 0 0 12px transparent; } }
@keyframes ctiBlink { 50% { opacity: .3; } }
.sidebar[data-as-alert="req"] .cti-st-dot::before { animation: ctiRing 1.6s ease-out infinite; }
.sidebar:not([data-as-alert="ring"], [data-as-alert="cut"], [data-as-alert="req"], [data-assist="sup"], [data-assist="op-listen"])[data-s="calling"] .cti-st-dot::before {
    animation: ctiRing 2.4s ease-out infinite;
}
.sidebar:not([data-assist="sup"], [data-assist="op-listen"])[data-s="ring"] .cti-st-dot::before,
.sidebar[data-as-alert="ring"] .cti-st-dot::before { animation: ctiRing 1.1s ease-out infinite; }
.sidebar:not([data-assist="sup"], [data-assist="op-listen"])[data-s="ring"] .cti-st-dot::after,
.sidebar[data-as-alert="ring"] .cti-st-dot::after { animation: ctiRing 1.1s ease-out .55s infinite; }
.sidebar[data-s="hold"]:not([data-as-alert="ring"], [data-assist="sup"], [data-assist="op-listen"]) .cti-st-ico-pause { animation: ctiBlink 2.4s ease-in-out infinite; }
.sidebar[data-as-alert="cut"] .cti-st-ico { animation: ctiBlink 1s ease-in-out infinite; }

.cti-st-alt {
    display: none; font-size: 11.5px; font-weight: 700; letter-spacing: .1em;
    white-space: nowrap;
    color: color-mix(in srgb, var(--cti-sc) 58%, #fff);
}
.sidebar[data-as-alert="ring"] .cti-st-alt-ring,
.sidebar[data-as-alert="cut"] .cti-st-alt-cut { display: block; }
.sidebar[data-as-alert="ring"] .cti-st-label,
.sidebar[data-as-alert="cut"] .cti-st-label { display: none; }
.cti-st-req {
    display: none; font-size: 11px; font-weight: 600; color: var(--amber-fg);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar[data-as-alert="req"]:is([data-s="idle"], [data-s="busy"]) .cti-st-req:not(:empty) { display: block; }
.sidebar[data-as-alert="req"]:is([data-s="idle"], [data-s="busy"]) .cti-st-num { display: none; }

@media (max-height: 820px) {
    .sidebar[data-view="keypad"] .sidebar-footer {
        display: flex; flex-direction: row; align-items: stretch; padding: 0; height: 44px;
    }
    .sidebar[data-view="keypad"] .sidebar-footer > .menu-item,
    .sidebar[data-view="keypad"] .sidebar-footer > .user-info {
        flex: 1 1 0; justify-content: center; padding: 0; gap: 0; min-width: 0;
    }
    .sidebar[data-view="keypad"] .sidebar-footer .menu-text { display: none; }
    .sidebar[data-view="keypad"] .cti-kp-head { display: none; }
    .sidebar[data-view="keypad"] .cti-kp { padding-top: 8px; }
    .cti-card { padding: 8px; gap: 6px; }
    .cti-act { height: 42px; }
    .cti-kp-act { min-height: 42px; }
    .cti-hint-slot { margin-top: 4px; }
    .cti-tabs { margin-top: 6px; }
    .cti-tab { height: 32px; }
    .cti-tabpanel { padding-top: 8px; min-height: 90px; }
    .cti-kp-grid { gap: 5px; }
    .cti-kp-key { height: 34px; font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .sidebar, .cti-pane, .cti-kp-key, .sidebar-fold-ico,
    .menu-text, .cti-st-txt { transition: none !important; }
    .sidebar[data-s="ring"] .cti-st-bar { animation: none; }
    .cti-cg-dot { animation: none !important; }
    .cti-st-dot::before, .cti-st-dot::after, .cti-st-ico { animation: none !important; }
    .sidebar:not([data-assist="sup"], [data-assist="op-listen"]):is([data-s="calling"], [data-s="ring"]) .cti-st-dot::before,
    .sidebar:is([data-as-alert="ring"], [data-as-alert="cut"], [data-as-alert="req"]) .cti-st-dot::before {
        inset: -4px; border: 1.5px solid var(--cti-ring-c);
    }
}

.cg-modal-back { position: fixed; inset: 0; z-index: var(--z-cg-modal); display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.62); }
.cg-modal-card { background: var(--bg-card); color: var(--text-main); border: 1px solid var(--border-strong);
    border-radius: 12px; width: 680px; max-width: 94vw; height: 72vh; max-height: 88vh; display: flex;
    flex-direction: column; box-shadow: 0 16px 48px rgba(0,0,0,.55); overflow: hidden; }
.cg-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px;
    border-bottom: 1px solid var(--border-color); flex: 0 0 auto; }
.cg-modal-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.cg-modal-x { border: 0; background: none; color: var(--text-muted); font-size: 22px; line-height: 1;
    cursor: pointer; padding: 2px 8px; border-radius: 6px; }
.cg-modal-x:hover { background: var(--bg-card-hover); color: var(--text-main); }
.cg-modal-body { padding: 16px 20px; overflow-y: auto; flex: 1 1 auto; }
.cg-modal-sec { margin-bottom: 20px; }
.cg-modal-h { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.cg-modal-note { font-size: 12px; color: var(--text-muted); margin: 4px 0 10px; }
.cg-modal-err { color: var(--danger-red); font-size: 13px; margin-top: 8px; }

.cg-btn { border: 1px solid var(--border-strong); background: var(--accent-bg); color: var(--text-main);
    border-radius: 8px; padding: 7px 14px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.cg-btn:hover { background: var(--bg-card-hover); }
.cg-btn-primary { border-color: transparent; background: var(--primary-blue); color: #fff; }
.cg-btn-primary:hover { background: var(--primary-blue); filter: brightness(1.08); }
.cg-sheet-body { display: flex; flex-direction: column; gap: 20px; }
.cg-sheet-body > .cg-modal-sec { margin-bottom: 0; }
.cg-sec { display: flex; flex-direction: column; gap: 7px; }
.cg-sec > .cg-modal-h { margin: 0 4px; font-size: 13px; font-weight: 600; }
.cg-sec[hidden] { display: none; }
.cg-grp { background: rgba(255, 255, 255, .045); border-radius: 14px; overflow: hidden; }
.cg-grp > :not(:first-child) { border-top: 1px solid var(--border-color); }
.cg-grp-row { min-height: 46px; box-sizing: border-box; margin: 0; padding: 10px 16px; display: flex; align-items: center; gap: 12px; font-size: 15px; }
.cg-grp-empty { color: var(--text-muted); }
.cg-grp-btn { width: 100%; min-height: 46px; box-sizing: border-box; padding: 0 16px; border: none; border-radius: 0; background: transparent;
    color: var(--primary-fg); font: inherit; font-size: 15px; text-align: left; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.cg-grp-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .04); }
.cg-grp-btn:disabled { color: var(--text-muted); opacity: .55; cursor: not-allowed; }
.cg-grp-row[hidden], .cg-grp-btn[hidden] { display: none; }
.cg-grp-danger { color: var(--danger-fg); }
.cg-grp-ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cg-grp-nav { color: var(--text-main); }
.cg-grp-label { flex: 1 1 auto; }
.cg-grp-val { color: var(--text-muted); font-size: 14px; text-align: right; }
.cg-grp-chev { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--text-muted); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.cg-grp-note { margin: 0 4px; font-size: 12px; line-height: 1.5; color: var(--text-muted); }
.cg-hero { border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; background: rgba(255, 255, 255, .045); border: 1px solid transparent; }
.cg-hero-top { display: flex; align-items: center; gap: 14px; }
.cg-hero-ico { width: 44px; height: 44px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .08); color: var(--text-muted); }
.cg-hero-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cg-hero-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cg-hero-title { font-size: 17px; font-weight: 700; }
.cg-hero-sub { font-size: 14px; color: #c4c7cc; font-variant-numeric: tabular-nums; }
.cg-hero-lines { margin: 0; font-size: 14px; line-height: 1.6; color: #d6d8dc; }
.cg-hero-retry { align-self: flex-start; }
.cg-hero.is-ok .cg-hero-ico { background: rgba(34, 197, 94, .16); color: #6ee7b7; }
.cg-hero.is-ok .cg-hero-title { color: #6ee7b7; }
.cg-hero.is-warn { background: rgba(245, 158, 11, .1); border-color: rgba(245, 158, 11, .32); }
.cg-hero.is-warn .cg-hero-ico { background: rgba(245, 158, 11, .18); color: #fbbf24; }
.cg-hero.is-warn .cg-hero-title { color: #fcd34d; }
.cg-hero.is-bad { background: rgba(239, 68, 68, .1); border-color: rgba(239, 68, 68, .32); }
.cg-hero.is-bad .cg-hero-ico { background: rgba(239, 68, 68, .18); color: #fca5a5; }
.cg-hero.is-bad .cg-hero-title { color: #fecaca; }
.cg-pill { height: 32px; padding: 0 14px; border: none; border-radius: 999px; background: rgba(255, 255, 255, .1); color: var(--text-main);
    font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.cg-pill:hover { filter: brightness(1.12); }
.cg-pill-primary { background: var(--primary-strong); color: #fff; }
.cg-line-row { min-height: 62px; padding: 9px 12px 9px 14px; }
.cg-line-row.is-down { opacity: .62; }
.cg-line-no { width: 38px; height: 38px; flex: none; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #c4c7cc;
    display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cg-row-mine .cg-line-no { background: var(--primary-strong); color: #fff; }
.cg-line-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cg-line-tel { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cg-line-none { color: var(--text-muted); font-weight: 400; }
.cg-line-who { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cg-line-who.is-mine { color: #93c5fd; }
.cg-line-who.is-free { color: #86efac; }
.cg-line-who.is-down { color: #fbbf24; }
.cg-line-act { flex: none; display: flex; }
.cg-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.cg-status-row b { flex: 1 1 auto; font-weight: 400; color: var(--text-main); }
.cg-status-row > span:last-child { max-width: 62%; color: var(--text-muted); font-size: 14px; line-height: 1.45; text-align: right; overflow-wrap: anywhere; }
.cg-dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: #6b7078; }
.cg-dot.is-ok { background: #22c55e; }
.cg-dot.is-warn { background: #f59e0b; }
.cg-dot.is-bad { background: #ef4444; }
.cg-modal-foot { padding: 12px 20px; border-top: 1px solid var(--border-color); flex: 0 0 auto;
    display: flex; justify-content: space-between; align-items: center; gap: 10px; }

.cg-hist-card { width: 560px; }
.cg-hist-top { padding: 14px 20px 0; flex: 0 0 auto; display: flex; flex-direction: column; gap: 8px; }
.cg-hist-filters .cti-hist-filter { height: 30px; font-size: 12.5px; }
.cg-hist-bar { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-muted); }
.cg-hist-desc { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; }
.cg-hist-date { display: inline-flex; align-items: center; gap: 4px; }
.cg-hist-date input[type="date"] { background: var(--bg-base); color: var(--text-main); border: 1px solid var(--border-strong); border-radius: 6px; padding: 3px 6px; font-size: 12.5px; color-scheme: dark; }
.cg-hist-line { margin-left: 12px; font-size: 12px; font-weight: 400; color: var(--text-muted); }
.cg-hist-body { padding-top: 6px; }
.cg-hist-body .cti-hist-row { gap: 8px; padding: 5px 0; }
.cg-hist-body .cti-hist-main { min-height: 36px; margin-left: 2px; }
.cg-hist-body .cti-hist-day { font-size: 11.5px; padding: 10px 0 2px; }
.cg-hist-body .cti-hist-name { font-size: 13.5px; }
.cg-hist-body .cti-hist-at { width: 44px; font-size: 12px; }
.cg-hist-body .cti-hist-dur { width: 50px; font-size: 12px; }
.cg-hist-body .cti-hist-main.is-one .cti-hist-num { font-size: 14px; }
.cg-hist-body .cti-hist-nonum { font-size: 13.5px; }
.cg-hist-body .cti-hist-re-ph { width: 30px; height: 30px; }
.cg-hist-body .cti-hist-l2 { font-size: 11.5px; }
.cg-hist-body .cti-hist-l2 .cti-hist-num { font-size: 12.5px; }
.cg-hist-body .cti-hico { width: 24px; height: 24px; }
.cg-hist-body .cti-hico > svg { width: 19px; height: 19px; }
.cg-hist-body .cti-hist-re { width: 30px; height: 30px; }
.cg-hist-body .cti-hist-re svg { width: 18px; height: 18px; }
.cg-hist-body .cti-hist-note { font-size: 13px; padding: 24px 0; }

.cti-vm-btn { display: none; }
.sidebar:is([data-vmask="idle"], [data-vmask="idle-na"], [data-vmask="ring"], [data-vmask="on"], [data-vmask="off"], [data-vmask="na"]) .cti-vm-btn { display: flex; }
.cti-vm-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cti-vm-slash { display: none; }
.sidebar:is([data-vmask-tone="off"], [data-vmask-tone="warn"]) .cti-vm-slash { display: inline; }
.sidebar[data-vmask-tone="on"] .cti-vm-btn { background: var(--success-green); border-color: var(--success-green); color: #06210f; }
.sidebar[data-vmask-tone="ready"] .cti-vm-btn { border-color: rgba(34, 197, 94, .75); color: #4ade80; }
.sidebar[data-vmask-tone="warn"] .cti-vm-btn { background: rgba(var(--warning-rgb), .2); border-color: rgba(var(--warning-rgb), .9); color: var(--amber-fg); }
.sidebar[data-vmask-tone="off"] .cti-vm-btn { color: #7c818a; }
.sidebar[data-vmask-busy="1"] .cti-vm-btn { opacity: .5; pointer-events: none; }


.set-card { width: 460px; height: auto; }
.set-av { display: flex; flex-direction: column; gap: var(--space-3); padding: 14px; }
.set-av > :not(:first-child) { border-top: none; }
.set-av-me { display: flex; align-items: center; gap: var(--space-3); }
.set-av-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.set-av-who b { font-size: var(--fs-lg); font-weight: 600; }
.set-av-who span { font-size: var(--fs-sm); color: var(--text-muted); }
.set-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.set-swatch { width: 32px; height: 32px; padding: 0; border: 2px solid transparent; border-radius: 50%; background: var(--av-bg); cursor: pointer; }
.set-swatch[aria-pressed="true"] { border-color: var(--bg-card); box-shadow: 0 0 0 2px var(--text-main); }
.set-marks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-2); }
.set-mark { height: 40px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border-strong); border-radius: var(--radius-md);
    background: transparent; color: var(--text-main); font: inherit; font-size: var(--fs-lg); font-weight: 700; cursor: pointer; }
.set-mark svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.set-mark[aria-pressed="true"] { border-color: var(--primary-blue); background: var(--primary-soft); }
.set-swatch:disabled, .set-mark:disabled { opacity: .55; cursor: wait; }
.set-ring-grp { padding: 8px 8px 0; }
.set-ring-grp > .cg-grp-btn { margin: 4px -8px 0; width: calc(100% + 16px); }
.set-segs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; padding: 2px; border-radius: var(--radius-md); background: rgba(255,255,255,.06); }
.set-seg { height: var(--h-md); border: none; border-radius: 6px; background: transparent; color: var(--text-muted); font: inherit; font-size: var(--fs-md); cursor: pointer; }
.set-seg[aria-pressed="true"] { background: var(--bg-card-hover); color: var(--text-main); font-weight: 600; }
.set-link { align-self: flex-start; min-height: 32px; padding: 0; border: none; background: none; color: var(--primary-fg); font: inherit; font-size: var(--fs-md); cursor: pointer; }
.set-link[hidden] { display: none; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.set-build { font-size: var(--fs-sm); color: var(--text-muted); font-variant-numeric: tabular-nums; }
body.is-phone .set-card { width: 100%; max-width: none; height: auto; border-radius: 18px 18px 0 0; margin-top: auto; }
body.is-phone .cg-modal-back.is-sheet { align-items: flex-end; background: rgba(0, 0, 0, 0); transition: background-color .3s ease; }
body.is-phone .cg-modal-back.is-sheet.is-open { background: rgba(0, 0, 0, .62); transition: background-color .35s ease; }
body.is-phone .cg-modal-back.is-sheet:not(.is-open) { pointer-events: none; }
body.is-phone .cg-modal-back.is-sheet > .cg-modal-card {
    width: 100%; max-width: none; height: auto; margin-top: auto;
    max-height: calc(100% - max(120px, env(safe-area-inset-top, 0px) + 100px));
    border-radius: 18px 18px 0 0; border-bottom: none; padding-bottom: env(safe-area-inset-bottom, 0px); box-sizing: border-box;
    transform: translateY(102%); transition: transform .3s cubic-bezier(.4, 0, .7, .2);
}
body.is-phone .cg-modal-back.is-sheet.is-open > .cg-modal-card { transform: none; transition: transform .42s cubic-bezier(.32, .72, 0, 1); }
body.is-phone .cg-modal-back.is-sheet .cg-modal-head { border-bottom: none; padding: 2px 10px 6px 20px; }
body.is-phone .cg-modal-back.is-sheet .cg-modal-head h2 { font-size: 20px; font-weight: 700; }
body.is-phone .cg-modal-back.is-sheet .cg-modal-x { width: 44px; height: 44px; padding: 0; display: flex; align-items: center; justify-content: center; background: none; }
body.is-phone .cg-modal-back.is-sheet .cg-modal-x svg { box-sizing: border-box; width: 30px; height: 30px; padding: 8px; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #c4c7cc; }
body.is-phone .cg-modal-back.is-sheet .cg-sheet-body { padding: 4px 16px 32px; gap: 22px; }
body.is-phone .cg-modal-back.is-sheet :is(.cg-grp-btn, .cg-grp-row) { font-size: 16px; }
body.is-phone .cg-modal-back.is-sheet > .cg-modal-card::before {
    content: ""; flex: none; align-self: center; width: 36px; height: 5px; margin-top: 7px; border-radius: 3px; background: rgba(255, 255, 255, .24);
}
@media (prefers-reduced-motion: reduce) {
    body.is-phone .cg-modal-back.is-sheet, body.is-phone .cg-modal-back.is-sheet > .cg-modal-card,
    body.is-phone .cg-modal-back.is-sheet.is-open, body.is-phone .cg-modal-back.is-sheet.is-open > .cg-modal-card { transition: none; }
}
body.is-phone .set-modal { align-items: flex-end; }
body.is-phone .set-seg, body.is-phone .set-link { min-height: 44px; font-size: var(--fs-lg); }
body.is-phone .set-swatch { width: 36px; height: 36px; }
body.is-phone .set-mark { height: 44px; }
.set-pk-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.set-pk-item { display: flex; align-items: center; gap: var(--space-3); min-height: 60px; box-sizing: border-box; padding: 8px 8px 8px 16px; }
.set-pk-item + .set-pk-item { border-top: 1px solid var(--border-color); }
.set-pk-empty { min-height: 46px; box-sizing: border-box; padding: 12px 16px; font-size: 15px; color: var(--text-muted); }
.set-pk-ico { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-fg); display: flex; align-items: center; justify-content: center; }
.set-pk-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.set-pk-what { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--space-2); }
.set-pk-what b { font-size: var(--fs-md); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-pk-what small { flex-basis: 100%; font-size: var(--fs-sm); color: var(--text-muted); }
.set-pk-del { flex-shrink: 0; width: 36px; height: 36px; padding: 0; border: none; border-radius: 50%; background: transparent; color: var(--text-muted); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.set-pk-del svg { width: 20px; height: 20px; fill: currentColor; }
.set-pk-del:hover, .set-pk-del:active { background: var(--danger-soft); color: var(--danger-fg); }
.set-pk-del:disabled { opacity: .5; cursor: wait; }
body.is-phone .set-pk-del { width: 44px; height: 44px; }
.sfa-av { flex: none; width: var(--av-size, 40px); height: var(--av-size, 40px); border-radius: 50%; background: var(--av-bg, #475569); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: calc(var(--av-size, 40px) * .42); line-height: 1; overflow: hidden; }
.sfa-av svg { width: 52%; height: 52%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.cg-vm-card { width: 720px; height: 86vh; }
.cg-vm-card .cg-btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.cg-vm-msg { font-size: 13px; margin-bottom: 12px; color: var(--text-main); overflow-wrap: anywhere; }
.cg-vm-msg:empty { margin: 0; }
.cg-vm-msg[data-level="warn"] { color: var(--warning-orange); }
.cg-vm-saved { font-size: 13px; margin-bottom: 8px; overflow-wrap: anywhere; }
.cg-vm-use { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.cg-vm-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.cg-vm-meter { width: 120px; height: 8px; border-radius: 4px; background: var(--bg-base); border: 1px solid var(--border-color); overflow: hidden; }
.cg-vm-meter > span { display: block; height: 100%; width: 0%; background: var(--success-green); }
.cg-vm-time { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.cg-vm-measured { font-size: 12px; color: var(--text-muted); margin-top: 8px; overflow-wrap: anywhere; }
.cg-vm-colors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cg-vm-color { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; text-align: left;
    border: 1px solid var(--border-strong); border-radius: 8px; background: var(--accent-bg); color: var(--text-main);
    cursor: pointer; font: inherit; min-width: 0; }
.cg-vm-color b { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.cg-vm-color span { font-size: 11.5px; color: var(--text-muted); overflow-wrap: anywhere; }
.cg-vm-color:hover { background: var(--bg-card-hover); }
.cg-vm-color:disabled { opacity: .5; cursor: not-allowed; }
.cg-vm-color.cg-vm-color-on { border-color: var(--primary-blue); box-shadow: 0 0 0 1px var(--primary-blue) inset; }
.cg-vm-knobs { display: flex; flex-direction: column; gap: 6px; }
.cg-vm-knob { display: grid; grid-template-columns: 72px minmax(0, 1fr) 84px; align-items: center; gap: 10px; font-size: 13px; }
.cg-vm-knob input[type="range"] { width: 100%; accent-color: var(--primary-blue); }
.cg-vm-knob-v { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-main); }
.cg-vm-zero { align-self: flex-start; margin-top: 4px; padding: 4px 10px; font-size: 12px; }
.cg-vm-judge { font-size: 12.5px; margin-top: 8px; color: var(--text-main); }
.cg-vm-foot { font-size: 13px; flex-wrap: wrap; }
@media (max-width: 760px) { .cg-vm-colors { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

body.is-phone {
    -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
body.is-phone :is(input, textarea, select, [contenteditable="true"]) { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
html:has(> body.is-phone) { overflow: hidden; height: 100%; overscroll-behavior: none; }
body.is-phone { overflow: hidden; overscroll-behavior: none; }
body.is-phone .sidebar :is(.cti-pane-keypad, .cti-tabpanel, #cti-hist-list),
body.is-phone .cg-modal-body { overscroll-behavior: contain; }
body.is-phone .app-container { height: 100dvh; }
body.is-phone .sidebar,
body.is-phone .sidebar.cti-collapsed { width: 100vw; box-shadow: none; transition: none; background: var(--bg-base); }
body.is-phone .main-content { display: none; }
body.is-phone .sidebar .cti-st-bar,
body.is-phone .sidebar.cti-on .cti-st-bar { display: none; }
body.is-phone .sidebar .cti-pane-menu { display: none; }
body.is-phone .sidebar .cti-pane-keypad,
body.is-phone .sidebar.cti-collapsed .cti-pane-keypad { display: flex; }
body.is-phone .sidebar .cti-pane-keypad[data-hidden="true"] { opacity: 1; pointer-events: auto; transform: none; }
body.is-phone .sidebar .cti-kp-head { display: none; }
body.is-phone .sidebar .sidebar-fold { display: none; }
body.is-phone .sidebar .cti-fkey { display: none; }

body.is-phone .sidebar .sidebar-footer {
    order: -1; display: flex; align-items: center; gap: var(--space-2);
    padding: max(12px, env(safe-area-inset-top)) var(--space-3) var(--space-2) var(--space-5);
    border-top: none; white-space: nowrap;
}
body.is-phone .sidebar .sidebar-footer::before {
    content: "上長"; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis;
    font-size: var(--fs-2xl); font-weight: 700; color: var(--text-main);
}
body.is-phone .sidebar[data-pane="kp"] .sidebar-footer::before { content: "キーパッド"; }
body.is-phone .sidebar[data-pane="hist"] .sidebar-footer::before { content: "履歴"; }
body.is-phone .sidebar .sidebar-footer .user-info { display: none; }
body.is-phone .sidebar .cti-badge {
    width: auto; flex: none; height: 32px; padding: 0 var(--space-3); gap: 6px; border-radius: 999px;
    border: 1px solid var(--border-strong); font-size: var(--fs-sm); font-weight: 600;
}
body.is-phone .sidebar .cti-badge .menu-icon { width: 14px; height: 14px; }
body.is-phone .sidebar .logout-btn { flex: none; width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: var(--radius-lg); color: var(--text-muted); }
body.is-phone .sidebar .logout-btn .menu-text { display: none; }
body.is-phone .sidebar .settings-btn { flex: none; width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: var(--radius-lg); color: var(--text-main); }
body.is-phone .sidebar .settings-btn .menu-text { display: none; }

body.is-phone .sidebar .cti-kp {
    gap: var(--space-3);
    padding: var(--space-2) var(--space-4) calc(var(--space-4) + 64px + env(safe-area-inset-bottom, 0px));
}
body.is-phone .sidebar .cti-card { display: contents; }
body.is-phone .sidebar .cti-card-h { order: 1; }
body.is-phone .sidebar .cti-kp-num { order: 2; }
body.is-phone .sidebar .cti-card-sub { order: 3; }
body.is-phone .sidebar .cti-hint-slot { order: 4; }
body.is-phone .sidebar .cti-tabpanel { order: 5; }
body.is-phone .sidebar .cg-out-bar { order: 6; }
body.is-phone .sidebar .cti-kp-act { order: 7; }
body.is-phone .sidebar .cti-tabs { order: 8; }
body.is-phone .sidebar:is([data-s="idle"], [data-s="busy"]):not([data-pane="kp"]) :is(.cti-card-h, .cti-kp-num, .cti-card-sub, .cti-kp-act) { display: none; }

body.is-phone .sidebar .cti-card-h { height: 32px; gap: var(--space-2); }
body.is-phone .sidebar .cti-card-ico { width: 24px; height: 24px; }
body.is-phone .sidebar .cti-card-ico .cti-st-ico { width: 20px; height: 20px; }
body.is-phone .sidebar .cti-card-h :is(.cti-st-label, .cti-st-alt) {
    font-size: var(--fs-lg); font-weight: 700; letter-spacing: 0; color: color-mix(in srgb, var(--cti-sc) 55%, #fff);
}
body.is-phone .sidebar .cti-card-time { font: 600 var(--fs-lg)/1 var(--cti-mono); color: var(--text-main); }
body.is-phone .sidebar .cti-hd-btn { width: 36px; height: 36px; margin: 0; border-radius: var(--radius-lg); }
body.is-phone .sidebar .cti-kp-num { height: auto; font-size: 32px; line-height: 40px; text-align: center; }
body.is-phone .sidebar:not([data-s="idle"]):not([data-s="busy"]) .cti-kp-num { font-size: var(--fs-2xl); line-height: 1.3; text-align: left; }
body.is-phone .sidebar .cti-kp-num.is-text { font-size: var(--fs-2xl); line-height: 1.35; white-space: normal; overflow-wrap: anywhere; }
body.is-phone .sidebar .cti-card-sub { height: auto; min-height: 20px; margin-top: calc(-1 * var(--space-2)); }
body.is-phone .sidebar .cti-kp-sub { font-size: var(--fs-lg); line-height: 20px; white-space: normal; }
body.is-phone .sidebar:is([data-s="idle"], [data-s="busy"]) .cti-kp-sub { text-align: center; }
body.is-phone .sidebar .cti-hint-slot { height: auto; margin: 0; }
body.is-phone .sidebar .cti-float { position: static; }
body.is-phone .sidebar .cti-kp-hint:is(:not([data-fail]), [data-fail=""]) { display: none; }
body.is-phone .sidebar .cti-kp-hint { font-size: var(--fs-md); line-height: 20px; height: 20px; }
body.is-phone .sidebar .cti-kp-hint:is([data-fail="error"], [data-fail="warn"], [data-fail="info"]) { font-size: var(--fs-md); padding: var(--space-2) var(--space-3); border-radius: var(--radius-lg); }
body.is-phone .sidebar .cti-bn { font-size: var(--fs-md); padding: var(--space-3); border-radius: var(--radius-lg); }
body.is-phone .sidebar .cti-bn-h { font-size: var(--fs-lg); }

body.is-phone .sidebar .cti-kp-act { min-height: 0; gap: var(--space-3); }
body.is-phone .sidebar .cti-act { height: 64px; border-radius: var(--radius-xl); gap: 4px; }
body.is-phone .sidebar .cti-act svg { width: 24px; height: 24px; }
body.is-phone .sidebar .cti-act-lbl { font-size: var(--fs-md); }
body.is-phone .sidebar .cti-act-back { flex-grow: 1; }
body.is-phone .sidebar[data-assist="sup"] .cti-kp-act { flex-direction: column; }
body.is-phone .sidebar .cti-act.cti-as-ptt {
    flex: none; height: auto; min-height: 88px; padding: var(--space-3) var(--space-5);
    display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: var(--space-4); row-gap: 4px;
    align-content: center; justify-items: start; text-align: left;
    background: var(--bg-card); border-color: var(--border-strong); color: var(--text-main);
}
body.is-phone .sidebar .cti-as-ptt svg {
    grid-row: 1 / span 2; width: 56px; height: 56px; padding: 15px; box-sizing: border-box; border-radius: 50%;
    background: var(--primary-soft); border: 1px solid var(--primary-line); color: var(--primary-fg);
}
body.is-phone .sidebar .cti-as-ptt .cti-act-lbl { grid-column: 2; font-size: var(--fs-xl); font-weight: 700; line-height: 1.3; }
body.is-phone .sidebar .cti-as-ptt .cti-ptt-hint { display: block; grid-column: 2; font-size: var(--fs-sm); line-height: 1.5; color: var(--text-muted); white-space: normal; }
body.is-phone .sidebar .cti-act.cti-as-ptt.is-on,
body.is-phone .sidebar[data-ptt="1"] .cti-act.cti-as-ptt {
    background: var(--primary-strong); border-color: var(--primary-strong); color: var(--accent-text);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .25);
}
body.is-phone .sidebar .cti-as-ptt.is-on svg { background: rgba(255, 255, 255, .18); border-color: transparent; color: var(--accent-text); }
body.is-phone .sidebar .cti-as-ptt.is-on .cti-ptt-off { display: none; }
body.is-phone .sidebar .cti-as-ptt.is-on .cti-ptt-on { display: inline; }
body.is-phone .sidebar .cti-as-ptt.is-on .cti-ptt-hint { color: rgba(255, 255, 255, .92); }
body.is-phone .sidebar .cti-ptt-since { font-family: var(--cti-mono); font-weight: 600; }
body.is-phone .sidebar[data-assist^="sup"] .cti-kp-num { display: none; }
body.is-phone .sidebar[data-assist^="sup"] #cg-out-bar { display: none; }
body.is-phone .sidebar .cti-as-card.cti-as-jc { padding: var(--space-3) 0 0; border: none; background: transparent; }
body.is-phone .sidebar .cti-as-jc-head { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
body.is-phone .sidebar .cti-as-jc-head .sfa-av { background-image: radial-gradient(circle at 35% 30%, rgba(255,255,255,.18), rgba(255,255,255,0) 70%); }
body.is-phone .sidebar .cti-as-jc-name { margin-top: 6px; font-size: 28px; line-height: 1.15; font-weight: 700; overflow-wrap: anywhere; }
body.is-phone .sidebar .cti-as-jc-head .cti-as-hosp { width: 100%; text-align: center; font-size: 16px; color: #c4c7cc; }
body.is-phone .sidebar .cti-as-jc-head .cti-as-hosp.is-mq { text-align: left; }
body.is-phone .sidebar .cti-as-jc-sub { font-size: var(--fs-md); color: var(--text-muted); }
body.is-phone .sidebar .cti-as-jc-sub .cti-as-since { margin: 0; color: var(--success-fg); font-weight: 600; }
body.is-phone .sidebar .cti-as-jc-tag { margin-top: 2px; padding: 2px 10px; border-radius: 999px; font-size: var(--fs-sm); background: rgba(139, 92, 246, .14); color: #c4b5fd; }
body.is-phone .sidebar .cti-as-jc-tag-sp { background: rgba(34, 197, 94, .14); color: #86efac; }
body.is-phone .sidebar .cti-as-jc .cti-as-alert { margin-top: var(--space-3); }
body.is-phone .sidebar .cti-as-jc-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
body.is-phone .sidebar .cti-as-tile, body.is-phone .sidebar .cti-as-jc-tiles .cti-act.cti-as-ptt {
    min-width: 0; height: 74px; min-height: 0; margin: 0; padding: 6px 2px; border: none; border-radius: 14px; box-shadow: none;
    background: var(--bg-card); color: var(--text-main); display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 5px; font: inherit; font-size: 12px; font-weight: 600; line-height: 1.2; text-align: center; cursor: pointer;
}
body.is-phone .sidebar .cti-as-tile svg, body.is-phone .sidebar .cti-as-jc-tiles .cti-as-ptt svg {
    width: 22px; height: 22px; padding: 0; border: none; border-radius: 0; background: none; color: inherit;
    fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
body.is-phone .sidebar .cti-as-jc-tiles .cti-as-ptt .cti-act-lbl { font-size: 12px; font-weight: 600; line-height: 1.2; white-space: nowrap; }
body.is-phone .sidebar .cti-as-jc-tiles .cti-as-ptt .cti-ptt-since { display: block; font-size: 11px; }
body.is-phone .sidebar .cti-as-jc-tiles .cti-as-ptt :is(.cti-ptt-hint, .cti-fkey) { display: none; }
body.is-phone .sidebar .cti-as-jc-tiles .cti-as-ptt:not(.is-on) { background: var(--primary-strong); color: var(--accent-text); }
body.is-phone .sidebar .cti-as-jc-tiles .cti-act.cti-as-ptt.is-on { background: #1d4ed8; color: var(--accent-text); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .35); }
body.is-phone .sidebar .cti-as-tile.is-on, body.is-phone .sidebar .cti-as-tile[aria-pressed="true"] { background: var(--primary-soft); color: var(--primary-fg); box-shadow: inset 0 0 0 1px var(--primary-line); }
body.is-phone .sidebar .cti-as-tile:disabled, body.is-phone .sidebar .cti-as-jc-tiles .cti-as-ptt:disabled { opacity: .45; cursor: not-allowed; }
body.is-phone .sidebar .cti-as-jc-hint { margin-top: var(--space-2); font-size: var(--fs-sm); color: var(--text-muted); text-align: center; }
body.is-phone .sidebar .cti-as-jc-h { margin: 20px 4px 6px; font-size: 13px; font-weight: 600; color: var(--text-muted); }
body.is-phone .sidebar .cti-as-jc-parts { list-style: none; margin: 0; padding: 0; background: var(--bg-card); border-radius: 14px; overflow: hidden; }
body.is-phone .sidebar .cti-as-jc-parts li { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 16px; }
body.is-phone .sidebar .cti-as-jc-parts li + li::before { content: ""; position: absolute; top: 0; left: 60px; right: 0; height: 1px; background: rgba(255,255,255,.09); }
body.is-phone .sidebar .cti-as-jc-who { flex: 1 1 auto; min-width: 0; font-size: 16px; overflow-wrap: anywhere; }
body.is-phone .sidebar .cti-as-jc-who small { margin-left: 6px; font-size: 13px; color: var(--text-muted); }
body.is-phone .sidebar .cti-as-jc-st { flex: none; font-size: 13px; color: var(--primary-fg); }
body.is-phone .sidebar .cti-as-jc-st.is-sp { color: #6ee7b7; }
body.is-phone .sidebar .cti-as-jc-st.is-ptt { color: #fde68a; }
body.is-phone .sidebar .cti-as-jc-st.is-warn { color: var(--danger-fg); }
body.is-phone .sidebar .cti-as-jc-leave { width: 100%; margin-top: var(--space-4); }
body.is-phone .sidebar .cti-act.cti-act-leave {
    flex: none; flex-direction: row; gap: var(--space-2); height: 52px;
    background: var(--danger-soft); border-color: var(--danger-line); color: var(--danger-text);
}
body.is-phone .sidebar .cti-act.cti-act-leave .cti-act-lbl,
body.is-phone .sidebar .cti-act.cti-act-rejoin .cti-act-lbl { font-size: var(--fs-lg); font-weight: 700; }

body.is-phone .sidebar .cti-tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-float);
    margin: 0; padding: 6px var(--space-2) max(6px, env(safe-area-inset-bottom, 0px));
    background: var(--bg-card); border-top: 1px solid var(--border-color); border-bottom: none;
}
body.is-phone .sidebar .cti-tab {
    position: relative; height: 52px; flex-direction: column; gap: 3px; margin: 0; border-bottom: none;
    font-size: var(--fs-xs); color: var(--text-muted);
}
body.is-phone .sidebar .cti-tab svg { width: 24px; height: 24px; stroke-width: 2; }
body.is-phone .sidebar .cti-tab-kp svg { fill: currentColor; stroke: none; }
body.is-phone .sidebar[data-pane="kp"] .cti-tab-kp,
body.is-phone .sidebar[data-pane="hist"] .cti-tab-hist,
body.is-phone .sidebar[data-pane="as"] .cti-tab-as { color: var(--primary-fg); border-bottom-color: transparent; }
body.is-phone .sidebar .cti-tab-badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; line-height: 18px; font-size: var(--fs-xs); border-radius: 9px; }

body.is-phone .sidebar .cti-tabpanel { padding-top: 0; min-height: 0; }
body.is-phone .sidebar .cti-as { gap: var(--space-3); }
body.is-phone .sidebar .cti-as-card {
    padding: var(--space-4); border-radius: var(--radius-xl); border-color: var(--border-color);
    background: var(--bg-card); font-size: var(--fs-lg);
}
body.is-phone .sidebar .cti-as-card-req {
    border-color: rgba(245,158,11,.38); box-shadow: none; border-radius: 16px;
    background: linear-gradient(180deg, rgba(245,158,11,.13), rgba(245,158,11,.05));
}
body.is-phone .sidebar .cti-as-card-h { font-size: var(--fs-lg); line-height: 1.5; }
body.is-phone .sidebar .cti-as-sub { font-size: var(--fs-md); margin-top: var(--space-1); }
body.is-phone .sidebar .cti-as-ops { gap: var(--space-2); margin-top: var(--space-3); }
body.is-phone .sidebar .cti-as-btn {
    min-height: 44px; padding: 0 var(--space-4); border-radius: var(--radius-lg); border-color: var(--border-strong);
    font-size: var(--fs-lg); font-weight: 600;
}
body.is-phone .sidebar .cti-as-btn-primary { flex: 1 1 auto; background: var(--primary-strong); border-color: var(--primary-strong); color: var(--accent-text); }
body.is-phone .sidebar .cti-as-btn-danger { background: var(--danger-soft); border-color: var(--danger-line); color: var(--danger-text); }
body.is-phone .sidebar .cti-as-tag { margin-left: var(--space-1); padding: 1px var(--space-2); border-radius: 999px; font-size: var(--fs-xs); line-height: 1.5; }
body.is-phone .sidebar .cti-as-parts { margin-top: var(--space-2); }
body.is-phone .sidebar .cti-as-parts li { padding: var(--space-2) 0; gap: var(--space-1); border-top: 1px solid var(--border-color); }
body.is-phone .sidebar .cti-as-parts li:first-child { border-top: 0; }
body.is-phone .sidebar .cti-as-card-lines { padding: 0; border: none; background: transparent; }
body.is-phone .sidebar .cti-as-lines-h { padding: 0 4px 8px; }
body.is-phone .sidebar .cti-as-lines-h b { font-size: 20px; }
body.is-phone .sidebar .cti-as-lines-h span { font-size: var(--fs-md); }
body.is-phone .sidebar .cti-as-lines { margin: 0; background: var(--bg-card); border-radius: 14px; }
body.is-phone .sidebar .cti-as-line { gap: 12px; padding: 10px 12px 10px 14px; }
body.is-phone .sidebar .cti-as-line + .cti-as-line::before { left: 70px; background: rgba(255,255,255,.09); }
body.is-phone .sidebar .cti-as-line-main { gap: 2px; padding: 4px 0; }
body.is-phone .sidebar .cti-as-line-top { gap: 4px 6px; }
body.is-phone .sidebar .cti-as-line-name { font-size: 17px; }
body.is-phone .sidebar .cti-as-hosp { font-size: 14px; }
body.is-phone .sidebar .cti-as-line-meta { gap: 2px; }
body.is-phone .sidebar .cti-as-line-meta .cti-as-since { font-size: 15px; }
body.is-phone .sidebar .cti-as-calling { font-size: 14px; }
body.is-phone .sidebar .cti-as-line-no, body.is-phone .sidebar .cti-as-line-joined { font-size: 12px; }
body.is-phone .sidebar .cti-as-chip { font-size: 11px; padding: 2px 6px; border-radius: 6px; }
body.is-phone .sidebar .cti-as-listen { width: 44px; height: 44px; }
body.is-phone .sidebar .cti-as-listen svg { width: 20px; height: 20px; }
body.is-phone .sidebar .cti-as-req-top { gap: 14px; }
body.is-phone .sidebar .cti-as-req-main { gap: 3px; }
body.is-phone .sidebar .cti-as-req-kind { font-size: 12px; }
body.is-phone .sidebar .cti-as-req-who { font-size: 17px; line-height: 1.35; }
body.is-phone .sidebar .cti-as-card-req .cti-as-hosp { font-size: 13px; }
body.is-phone .sidebar .cti-as-card-req .cti-as-sub { font-size: 13px; }
body.is-phone .sidebar .cti-as-btn-go { background: #16a34a; border-color: transparent; color: #fff; }
body.is-phone .sidebar .cti-as-card-req .cti-as-ops .cti-as-btn:not(.cti-as-btn-go) { flex: 0 0 104px; }
body.is-phone .sidebar .cti-as-confirm, body.is-phone .sidebar .cti-as-alert { font-size: var(--fs-md); }
body.is-phone .sidebar .cti-as-target { font-size: var(--fs-md); }
body.is-phone .sidebar .cti-as-target select { min-height: 44px; font-size: var(--fs-lg); }
body.is-phone .sidebar .cti-as-empty { font-size: var(--fs-md); line-height: 1.6; padding: var(--space-8) var(--space-4); }
.cti-as-empty-phone { display: none; }
body.is-phone .cti-as-empty-pc { display: none; }
body.is-phone .cti-as-empty-phone { display: inline; }
.set-modal .cti-push[hidden] { display: none; }
.set-modal .cti-push-text { font-size: 14px; line-height: 1.6; color: var(--text-muted); }
body.is-phone .sidebar .cti-hist-filters { flex: none; gap: var(--space-2); border: none; border-radius: 0; overflow-x: auto; }
body.is-phone .sidebar .cti-hist-filter,
body.is-phone .sidebar .cti-hist-filter:first-child {
    flex: none; height: 40px; padding: 0 var(--space-3); border: 1px solid var(--border-strong); border-radius: 999px;
    font-size: var(--fs-md);
}
body.is-phone .sidebar .cti-hist-filter.is-on { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary-fg); }
body.is-phone .sidebar .cti-hist-list { margin-top: var(--space-2); }
body.is-phone .sidebar .cti-hist-day { font-size: var(--fs-sm); padding: var(--space-3) 0 var(--space-1); }
body.is-phone .sidebar .cti-hist-row { gap: var(--space-2); padding: var(--space-2) 0; border-bottom-color: var(--border-color); }
body.is-phone .sidebar .cti-hist-main { min-height: 44px; }
body.is-phone .sidebar .cti-hist-name, body.is-phone .sidebar .cti-hist-main.is-one .cti-hist-num, body.is-phone .sidebar .cti-hist-nonum { font-size: var(--fs-lg); }
body.is-phone .sidebar .cti-hist-l2, body.is-phone .sidebar .cti-hist-l2 .cti-hist-num { font-size: var(--fs-sm); }
body.is-phone .sidebar :is(.cti-hist-dur, .cti-hist-at) { width: 44px; font-size: var(--fs-sm); }
body.is-phone .sidebar :is(.cti-hist-re, .cti-hist-re-ph) { width: 44px; height: 44px; border-radius: var(--radius-lg); }
body.is-phone .sidebar .cti-hist-more { font-size: var(--fs-md); padding: var(--space-3) 0; }
body.is-phone .sidebar .cti-kp-grid { grid-template-columns: repeat(3, 76px); justify-content: center; column-gap: var(--space-6); row-gap: 14px; }
body.is-phone .sidebar .cti-kp-key { width: 76px; height: 76px; border-radius: 50%; background: var(--bg-card); font: 400 30px/1 var(--font-sans); }
body.is-phone .sidebar .cti-kp-sent { font-size: var(--fs-md); }

body.is-phone .sidebar:not([data-pane="ledger"]) .cti-tabpanel-ledger { display: none; }
body.is-phone .sidebar[data-pane="ledger"] .cti-tabpanel-ledger { display: flex; flex-direction: column; overflow: hidden; }
body.is-phone .sidebar.cg-on[data-pane="ledger"] .cti-tabpanel-kp { display: none; }
body.is-phone .sidebar[data-pane="ledger"] :is(.cti-card-h, .cti-kp-num, .cti-card-sub, .cti-kp-act, .cti-hint-slot, #cg-out-bar) { display: none; }
body.is-phone .sidebar[data-pane="ledger"] .sidebar-footer::before { content: "台帳"; }
body.is-phone .sidebar[data-pane="ledger"] .cti-tab-ledger { color: var(--primary-fg); border-bottom-color: transparent; }

body.is-phone .lg { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; position: relative; }
body.is-phone .lg-head, body.is-phone .lg-tools { flex: none; }
body.is-phone .lg-tools:empty { display: none; }
body.is-phone .lg-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding-bottom: 16px; }
body.is-phone .lg:is([data-page="yoko"], [data-page="nai"]) .lg-scroll { display: flex; flex-direction: column; padding-bottom: 0; }
body.is-phone .lg:is([data-page="yoko"], [data-page="nai"]) .lg-body { flex: 1 0 auto; display: flex; flex-direction: column; }
body.is-phone .lg-dock { flex: none; }
body.is-phone .lg-dock:empty { display: none; }
body.is-phone :is(.lg, .lg-sheet .cg-modal-body, .lg-sheet-foot) svg {
    width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
body.is-phone :is(.lg, .lg-sheet .cg-modal-body, .lg-sheet-foot) svg.lg-fill { fill: currentColor; stroke: none; }
body.is-phone .lg-num { font-variant-numeric: tabular-nums; }

body.is-phone .lg-call {
    flex: none; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; border-radius: 14px;
    border: 1px solid var(--success-line); background: rgba(22, 163, 74, .16); color: var(--text-main); font: inherit; text-align: left; cursor: pointer;
}
body.is-phone .sidebar:is([data-s="idle"], [data-s="busy"]) .lg-call { display: none; }
body.is-phone .lg-call-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--success-green); }
body.is-phone .lg-call-txt { flex: 1 1 auto; min-width: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.is-phone .lg-call-go { flex: none; font-size: 12px; font-weight: 700; color: var(--success-fg); }

body.is-phone .lg-hcard { display: flex; flex-direction: column; gap: 8px; }
body.is-phone .lg-hrow {
    height: 56px; padding: 0 4px 0 14px; box-sizing: border-box; border-radius: 14px; background: var(--bg-card);
    display: flex; align-items: center; gap: 2px;
}
body.is-phone .lg-hname {
    flex: 1 1 auto; min-width: 0; height: 48px; padding: 0; border: none; background: none; color: inherit; font: inherit;
    display: flex; flex-direction: column; justify-content: center; gap: 1px; text-align: left; cursor: pointer;
}
body.is-phone .lg-hsub { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
body.is-phone .lg-hmain { display: flex; align-items: center; gap: 4px; min-width: 0; }
body.is-phone .lg-hn-v { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 17px; font-weight: 700; line-height: 1.3; }
body.is-phone .lg-hn-v.is-run {
    flex: 1 1 auto; text-overflow: clip;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6px, #000 calc(100% - 10px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 6px, #000 calc(100% - 10px), transparent 100%);
}
body.is-phone .lg-hn-v.is-run .lg-hn-t { display: inline-flex; gap: 24px; vertical-align: top; }
body.is-phone .lg-hmain > svg { width: 16px; height: 16px; color: var(--text-muted); }
body.is-phone .lg-hbtn {
    width: 40px; height: 44px; flex: none; padding: 0; border: none; background: none; color: var(--text-main);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
}
body.is-phone .lg-hbtn-c { width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, .08); display: flex; align-items: center; justify-content: center; }
body.is-phone .lg-hbtn svg { width: 17px; height: 17px; }
body.is-phone .lg-hclear { color: #c4c7cc; }
body.is-phone .lg-hclear svg { width: 16px; height: 16px; stroke-width: 2.4; }
body.is-phone .lg-tels { display: flex; gap: 8px; }
body.is-phone .lg-tel { display: contents; }
body.is-phone .lg-telbtn {
    flex: 1 1 0; min-width: 0; height: 46px; padding: 0 6px 0 10px; border: none; border-radius: 12px;
    background: var(--bg-card); color: var(--text-main); font: inherit; display: flex; align-items: center; gap: 6px; text-align: left; cursor: pointer;
}
body.is-phone .lg-telbtn:disabled { opacity: .55; cursor: default; }
body.is-phone .lg-tel-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
body.is-phone .lg-tel-l { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--text-muted); }
body.is-phone .lg-tel-n { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
body.is-phone .lg-tel-ico {
    width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--success-soft); color: var(--success-fg);
    display: flex; align-items: center; justify-content: center;
}
body.is-phone .lg-tel-ico svg { width: 16px; height: 16px; }
body.is-phone .lg-hinfo {
    width: 46px; height: 46px; flex: none; padding: 0; border: none; border-radius: 12px; background: var(--bg-card); color: var(--primary-fg);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
}
body.is-phone .lg-hinfo svg { width: 20px; height: 20px; }
body.is-phone .lg-iconbtn {
    width: 44px; height: 44px; flex: none; padding: 0; border: none; border-radius: 10px; background: transparent; color: var(--text-main);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
}
body.is-phone .lg-iconbtn svg { width: 21px; height: 21px; }
body.is-phone .lg-iconbtn.is-on { background: var(--primary-soft); color: var(--primary-fg); }
body.is-phone .lg-empty { display: flex; flex-direction: column; gap: 12px; padding: 4px 0; }
body.is-phone .lg-primary {
    height: 48px; border: none; border-radius: 12px; background: var(--primary-strong); color: var(--accent-text); font: inherit; font-size: 16px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
}

body.is-phone .lg-trow { display: flex; align-items: center; gap: 4px; min-height: 44px; }
body.is-phone .lg-sp { flex: 1 1 auto; }
body.is-phone .lg-seg { flex: none; display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: rgba(255, 255, 255, .06); }
body.is-phone .lg-seg-b {
    height: 34px; min-width: 48px; padding: 0 12px; border: none; border-radius: 8px; background: transparent; color: #c4c7cc;
    font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer;
}
body.is-phone .lg-seg-b.is-on { background: var(--primary-soft); color: var(--primary-fg); }
body.is-phone .lg-mrow { display: flex; align-items: center; gap: 6px; height: 40px; }
body.is-phone .lg-mrow > .lg-h2 { padding-left: 2px; }
body.is-phone .lg-mstep {
    width: 32px; height: 40px; flex: none; padding: 0; border: none; border-radius: 10px; background: none; color: var(--text-main);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
}
body.is-phone .lg-mstep:disabled { color: #4b5058; cursor: default; }
body.is-phone .lg-mstep svg { stroke-width: 2.2; }
body.is-phone .lg-mbtn {
    flex: 1 1 auto; min-width: 0; height: 40px; padding: 0 10px 0 12px; box-sizing: border-box; border: 1px solid var(--border-strong); border-radius: 10px;
    background: var(--bg-card); color: var(--text-main); font: inherit; display: flex; align-items: center; gap: 8px; text-align: left; cursor: pointer;
}
body.is-phone .lg-mbtn[aria-expanded="true"] { border-color: var(--primary-fg); }
body.is-phone .lg-mbtn-l { min-width: 0; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.is-phone .lg-mbtn-i { margin-left: auto; flex: none; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
body.is-phone .lg-mbtn > svg { width: 16px; height: 16px; color: var(--text-muted); }
body.is-phone .lg-mhelp {
    width: 36px; height: 40px; flex: none; padding: 0; border: none; border-radius: 10px; background: none; color: var(--text-muted);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
}
body.is-phone .lg-mhelp[aria-expanded="true"] { color: var(--primary-fg); }
body.is-phone .lg-mhelp svg { width: 19px; height: 19px; }
body.is-phone .lg-ptitle { min-height: 48px; }
body.is-phone .lg-ptitle-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; padding-left: 2px; }
body.is-phone .lg-ptitle-row { flex-direction: row; align-items: baseline; gap: 8px; }
body.is-phone .lg-h2 { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.3; }
body.is-phone .lg-psub { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
body.is-phone .lg-chips { display: flex; gap: 6px; overflow-x: auto; }
body.is-phone .lg-chips[hidden] { display: none; }
body.is-phone .lg-chip {
    flex: none; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: transparent;
    color: #c4c7cc; font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer;
}
body.is-phone .lg-chip.is-on { border-color: var(--primary-line); background: var(--primary-soft); color: var(--primary-fg); }
body.is-phone .lg-search {
    display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; box-sizing: border-box; border-radius: 12px;
    background: var(--bg-base); border: 1px solid var(--border-strong); color: var(--text-muted);
}
body.is-phone .lg-search input {
    flex: 1 1 auto; min-width: 0; height: 40px; padding: 0; border: none; outline: none; background: transparent; color: var(--text-main); font: inherit; font-size: 16px;
}
body.is-phone .lg-search-sm { height: 40px; margin-top: 8px; background: var(--bg-card); }

body.is-phone .lg-note { margin: 4px 2px 10px; font-size: 14px; line-height: 1.55; color: var(--text-muted); }
body.is-phone .lg-note-err { color: var(--danger-fg); }
body.is-phone .lg-note-warn { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--warning-line); background: var(--warning-soft); color: #fde68a; font-size: 13px; }
body.is-phone .lg-list { list-style: none; margin: 0; padding: 0; border-radius: 14px; background: var(--bg-card); overflow: hidden; }
body.is-phone .lg-list > li + li { border-top: 1px solid rgba(255, 255, 255, .08); }
body.is-phone .lg-foot { margin: 10px 4px 0; font-size: 12px; line-height: 1.5; color: var(--text-muted); }
body.is-phone .lg-h3 { margin: 16px 4px 6px; font-size: 13px; font-weight: 700; color: var(--text-muted); }
body.is-phone :is(.lg-body, .lg-pick-list, .lg-empty) > .lg-h3:first-child { margin-top: 4px; }
body.is-phone .lg-group { border-radius: 14px; background: var(--bg-base); overflow: hidden; }
body.is-phone .lg .lg-group { background: var(--bg-card); }
body.is-phone .lg-tag { flex: none; padding: 0 5px; border-radius: 6px; font-size: 11px; font-weight: 700; line-height: 18px; white-space: nowrap; }
body.is-phone .lg-tag-sfa { border: 1px solid var(--primary-line); color: var(--primary-fg); }
body.is-phone .lg-tag-warn { background: var(--warning-soft); color: var(--amber-fg); }
body.is-phone .lg-tag-ok { background: var(--success-soft); color: var(--success-fg); }
body.is-phone .lg-tag-ext { display: inline-block; margin-left: 6px; vertical-align: 1px; border: 1px solid rgba(255, 255, 255, .24); color: #c4c7cc; }
body.is-phone .lg-round {
    width: 44px; height: 44px; margin-right: 6px; flex: none; padding: 0; border: none; border-radius: 50%; background: var(--success-soft);
    color: var(--success-fg); display: flex; align-items: center; justify-content: center; cursor: pointer;
}

body.is-phone .lg-dr { display: flex; align-items: center; background-color: transparent; transition: background-color .15s; }
body.is-phone .lg-dr.is-pressing { background-color: rgba(59, 130, 246, .26); transition: background-color var(--lg-press) linear; }
body.is-phone .lg-dr-main {
    flex: 1 1 auto; min-width: 0; min-height: 64px; padding: 9px 4px 9px 8px; border: none; background: transparent; color: inherit;
    font: inherit; text-align: left; display: flex; align-items: center; gap: 8px; cursor: default; -webkit-touch-callout: none;
}
body.is-phone .lg-dr-mark { width: 36px; flex: none; display: flex; justify-content: center; }
body.is-phone .lg-mark {
    max-width: 36px; padding: 2px 4px; box-sizing: border-box; border-radius: 6px; background: rgba(255, 255, 255, .07);
    font-size: 12px; font-weight: 700; color: #dfe1e5; white-space: nowrap; overflow: hidden;
}
body.is-phone .lg-mark-v { display: block; overflow: hidden; }
body.is-phone .lg-mark-t { display: inline-flex; gap: 14px; vertical-align: top; }
body.is-phone .lg-mark.is-run { width: 36px; }
body.is-phone .lg-mark.is-run .lg-mark-v {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 3px, #000 calc(100% - 3px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 3px, #000 calc(100% - 3px), transparent 100%);
}
body.is-phone .lg-dr-b { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
body.is-phone :is(.lg-dr-l1, .lg-dr-l2) { display: flex; align-items: center; gap: 6px; min-width: 0; }
body.is-phone .lg-dr-name { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.is-phone .lg-era {
    flex: none; padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, .07); color: #c4c7cc;
    font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
}
body.is-phone .lg-dr-l2 { font-size: 13px; color: var(--text-muted); }
body.is-phone .lg-dr-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.is-phone .lg-st {
    flex: none; max-width: 50%; padding: 1px 8px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: #c4c7cc;
    font-size: 11px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
body.is-phone .lg-dr-phs { flex: none; min-width: 38px; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; font-size: 14px; font-weight: 600; }
body.is-phone .lg-dr-phs-l { font-size: 11px; font-weight: 400; color: var(--text-muted); }
body.is-phone .lg-dr-gap { width: 50px; flex: none; }
body.is-phone .lg-dr-mk { padding: 6px 14px; font-size: 12px; color: var(--text-muted); background: rgba(255, 255, 255, .02); }

body.is-phone .lg-grid {
    flex: 1 1 auto; min-height: 207px; max-height: 467px; display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr)); grid-template-rows: repeat(10, minmax(0, 1fr)); gap: 3px;
}
body.is-phone .lg-tile {
    min-width: 0; min-height: 0; padding: 0; border: none; border-radius: 6px; font: inherit; font-size: 11px; font-weight: 600;
    font-variant-numeric: tabular-nums; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
body.is-phone .lg-k-dept { background: rgba(59, 130, 246, .34); color: #eff6ff; }
body.is-phone .lg-k-fax { background: rgba(255, 255, 255, .22); color: #fff; }
body.is-phone .lg-k-bad { background: rgba(239, 68, 68, .22); color: #fecaca; }
body.is-phone .lg-k-empty { background: transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .24); color: #8b9098; }
body.is-phone .lg-tile.is-on { box-shadow: inset 0 0 0 2px var(--primary-fg); filter: brightness(1.3); }
body.is-phone .lg-tile.lg-k-empty.is-on { filter: none; background: rgba(147, 197, 253, .14); color: var(--text-main); }
body.is-phone .lg-tile.is-on.is-lock { box-shadow: inset 0 0 0 2px var(--primary-fg), inset 0 0 0 4px #f59e0b; }
body.is-phone .lg-sel {
    height: 64px; padding: 0 8px 0 14px; box-sizing: border-box; border-radius: 14px; background: var(--bg-card);
    display: flex; align-items: center; gap: 6px;
}
body.is-phone .lg-sel-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
body.is-phone .lg-sel-n { font-size: 18px; font-weight: 700; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.is-phone .lg-sel-v { min-width: 0; font-size: 13px; line-height: 1.3; color: #c4c7cc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.is-phone .lg-sel-v.is-empty { color: var(--text-muted); }
body.is-phone .lg-sel-v.is-lock { color: var(--amber-fg); }
body.is-phone .lg-sel-v.is-run {
    text-overflow: clip;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6px, #000 calc(100% - 10px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 6px, #000 calc(100% - 10px), transparent 100%);
}
body.is-phone .lg-sel-v.is-run .lg-sel-vt { display: inline-flex; gap: 24px; vertical-align: top; }
body.is-phone .lg-sel-w {
    width: 44px; height: 44px; flex: none; padding: 0; border: none; border-radius: 12px; background: rgba(255, 255, 255, .06); color: var(--text-main);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
}
body.is-phone .lg-sel-w svg { width: 20px; height: 20px; }
body.is-phone .lg-sel-go {
    height: 46px; flex: none; padding: 0 16px 0 12px; border: none; border-radius: 999px; font: inherit; font-size: 15px; font-weight: 700;
    display: flex; align-items: center; gap: 6px; white-space: nowrap; cursor: pointer;
}
body.is-phone .lg-sel-call { background: #16a34a; color: #fff; }
body.is-phone .lg-sel-send { padding: 0 14px 0 12px; background: var(--primary-strong); color: var(--accent-text); }
body.is-phone .lg-sel-send.is-off { background: rgba(255, 255, 255, .06); color: #6b7079; font-size: 12px; cursor: default; }
body.is-phone .lg-sel-go svg { width: 17px; height: 17px; }
body.is-phone .lg-btn {
    flex: 1 1 0; height: 44px; border: none; border-radius: 10px; font: inherit; font-size: 15px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
}
body.is-phone .lg-btn svg { width: 17px; height: 17px; }
body.is-phone .lg-btn-call { background: #16a34a; color: #fff; }
body.is-phone .lg-btn-primary { background: var(--primary-strong); color: var(--accent-text); }
body.is-phone .lg-btn-off { background: rgba(255, 255, 255, .06); color: #8b9098; cursor: default; }

body.is-phone .lg-memo { display: flex; align-items: center; gap: 6px; padding-right: 8px; background-color: transparent; transition: background-color .15s; }
body.is-phone .lg-memo.is-pressing { background-color: rgba(59, 130, 246, .26); transition: background-color var(--lg-press) linear; }
body.is-phone .lg-memo-main {
    flex: 1 1 auto; min-width: 0; min-height: 56px; padding: 10px 4px 10px 14px; box-sizing: border-box; border: none; background: transparent; color: inherit;
    font: inherit; text-align: left; display: flex; align-items: center; cursor: default; -webkit-touch-callout: none;
}
body.is-phone .lg-memo-b { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
body.is-phone .lg-memo-t { font-size: 15px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
body.is-phone .lg-memo-t.is-text { font-weight: 400; }
body.is-phone .lg-memo-s { font-size: 13px; line-height: 1.45; color: var(--text-muted); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
body.is-phone .lg-memo .lg-round { margin-right: 0; }
body.is-phone .lg-ext {
    flex: none; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--warning-line); background: var(--warning-soft);
    color: var(--amber-fg); font: inherit; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
}
body.is-phone .lg-ext svg { width: 13px; height: 13px; }
body.is-phone .lg-ext.is-off { opacity: .5; cursor: default; }

body.is-phone .lg-menu-wrap { position: absolute; inset: 0; z-index: calc(var(--z-float) + 1); }
body.is-phone .lg-menu-wrap[hidden] { display: none; }
body.is-phone .lg-menu-back { position: fixed; inset: 0; padding: 0; border: none; background: rgba(0, 0, 0, .4); cursor: default; }
body.is-phone .lg-menu {
    position: absolute; right: 0; width: 256px; padding: 6px; box-sizing: border-box; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .12);
    background: var(--bg-raised); box-shadow: 0 14px 34px rgba(0, 0, 0, .6); display: flex; flex-direction: column;
}
body.is-phone .lg-menu-h { padding: 6px 10px 4px; font-size: 12px; font-weight: 700; color: var(--text-muted); }
body.is-phone .lg-mi {
    min-height: 46px; padding: 0 10px; border: none; border-radius: 8px; background: transparent; color: var(--text-main);
    font: inherit; font-size: 15px; display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer;
}
body.is-phone .lg-mi.is-cur { background: var(--primary-soft); }
body.is-phone .lg-mi.is-cur .lg-mi-t { font-weight: 600; }
body.is-phone .lg-mi-i { display: flex; color: #c4c7cc; }
body.is-phone .lg-mi-dr { color: var(--primary-fg); }
body.is-phone .lg-mi-yoko { color: var(--success-fg); }
body.is-phone .lg-mi-nai { color: var(--amber-fg); }
body.is-phone .lg-mi-t { flex: 1 1 auto; }
body.is-phone .lg-mi-n { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
body.is-phone .lg-mi-ck { width: 16px; display: flex; color: var(--primary-fg); }
body.is-phone .lg-mi-ck svg { width: 16px; height: 16px; stroke-width: 2.6; }
body.is-phone .lg-menu-sep { display: block; height: 1px; margin: 6px 4px; background: rgba(255, 255, 255, .1); }
body.is-phone .lg-menu-back.is-clear { background: transparent; }
body.is-phone .lg-pop {
    position: absolute; padding: 6px; box-sizing: border-box; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .12);
    background: var(--bg-raised); box-shadow: 0 14px 34px rgba(0, 0, 0, .6); display: flex; flex-direction: column;
}
body.is-phone .lg-mlist { left: 0; right: 0; overflow-y: auto; overscroll-behavior: contain; }
body.is-phone .lg-mopt {
    flex: none; min-height: 44px; padding: 0 12px; border: none; border-radius: 10px; background: none; color: var(--text-main);
    font: inherit; font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
}
body.is-phone .lg-mopt.is-cur { background: var(--primary-soft); color: var(--primary-fg); }
body.is-phone .lg-mopt-l { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.is-phone .lg-mopt-i { flex: none; font-size: 12px; font-weight: 400; color: var(--text-muted); }
body.is-phone .lg-lgbox { right: 0; width: 210px; padding: 8px 14px 12px; gap: 8px; font-size: 13px; }
body.is-phone .lg-lgbox > .lg-menu-h { padding: 4px 0 0; }
body.is-phone .lg-lg { display: flex; align-items: center; gap: 8px; }
body.is-phone .lg-lg-sw { width: 14px; height: 14px; flex: none; border-radius: 4px; }
body.is-phone .lg-lg-lock { box-shadow: inset 0 0 0 2px #f59e0b; }
body.is-phone .lg-lg-on { box-shadow: inset 0 0 0 2px var(--primary-fg); }

body.is-phone .cg-modal-back.is-sheet > .cg-modal-card.lg-pick-card { height: calc(100% - max(120px, env(safe-area-inset-top, 0px) + 100px)); }
body.is-phone .lg-sheet-body { padding: 4px 16px 32px; display: flex; flex-direction: column; gap: 12px; }
body.is-phone .lg-pick-prefs { flex: none; }
body.is-phone .lg-prow {
    width: 100%; min-height: 52px; padding: 0 12px 0 14px; border: none; background: transparent; color: var(--text-main);
    font: inherit; display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
}
body.is-phone .lg-prow + .lg-prow { border-top: 1px solid rgba(255, 255, 255, .08); }
body.is-phone .lg-prow-c { width: 52px; flex: none; font-size: 13px; color: var(--text-muted); }
body.is-phone .lg-prow-b { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
body.is-phone .lg-prow-n { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.is-phone .lg-prow-n.is-run {
    text-overflow: clip;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6px, #000 calc(100% - 10px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 6px, #000 calc(100% - 10px), transparent 100%);
}
body.is-phone .lg-prow-n.is-run .lg-prow-t { display: inline-flex; gap: 24px; vertical-align: top; }
body.is-phone .lg-prow-s { font-size: 12px; color: var(--text-muted); }
body.is-phone .lg-prow-ck { display: flex; color: var(--primary-fg); }
body.is-phone .lg-info-sub { margin: 0 4px; font-size: 13px; color: var(--text-muted); }
body.is-phone .lg-title-1l { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.is-phone .lg-kv { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 8px 8px 14px; box-sizing: border-box; }
body.is-phone .lg-kv + .lg-kv { border-top: 1px solid rgba(255, 255, 255, .08); }
body.is-phone .lg-kv-l { width: 84px; flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--text-muted); }
body.is-phone .lg-kv-v { flex: 1 1 auto; min-width: 0; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
body.is-phone .lg-kv-v.is-empty { color: var(--text-muted); }
body.is-phone .lg-kv-v small { display: block; font-size: 12px; color: var(--text-muted); }
body.is-phone .lg-kv .lg-round { margin-right: 0; }

body.is-phone .lg-editbar {
    margin-top: 6px; padding: 6px 6px 6px 12px; border-radius: 10px; border: 1px solid var(--primary-line); background: var(--primary-soft);
    display: flex; align-items: center; gap: 8px;
}
body.is-phone .lg-editbar-t { flex: 1 1 auto; min-width: 0; font-size: 13px; line-height: 1.4; color: #bfdbfe; }
body.is-phone .lg-editbar-b {
    flex: none; height: 36px; padding: 0 14px; border: none; border-radius: 8px; background: var(--primary-strong); color: var(--accent-text);
    font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
body.is-phone .lg-dr-ed { width: 44px; height: 44px; margin-right: 6px; flex: none; display: flex; align-items: center; justify-content: center; color: var(--primary-fg); }
body.is-phone .lg-dr-ed.is-ro { color: var(--text-muted); }
body.is-phone .lg-dr-ed svg { width: 20px; height: 20px; }
body.is-phone .lg-tile.is-lock { box-shadow: inset 0 0 0 2px #f59e0b; }
body.is-phone .lg-btn-sub { background: rgba(255, 255, 255, .1); color: var(--text-main); }
body.is-phone .lg-btn-danger { flex: 0 0 auto; padding: 0 14px; background: var(--danger-soft); color: var(--danger-fg); }
body.is-phone .lg-btn:disabled { cursor: default; }
body.is-phone .lg-sheet-foot {
    flex: none; display: flex; gap: 8px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid rgba(255, 255, 255, .08);
    background: var(--bg-card);
}
body.is-phone .lg-sheet-foot[hidden] { display: none; }
body.is-phone .lg-foot-left { flex: 0 0 auto; display: flex; margin-right: auto; }
body.is-phone .lg-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
body.is-phone .lg-fl { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
body.is-phone .lg-fl.is-full { grid-column: 1 / -1; }
body.is-phone .lg-fl-l { font-size: 12px; font-weight: 700; color: var(--text-muted); }
body.is-phone .lg-trow > .lg-fl-l { flex: 1 1 auto; }
body.is-phone .lg-in {
    width: 100%; min-height: 44px; box-sizing: border-box; padding: 9px 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .14);
    background: var(--bg-base); color: var(--text-main); font: inherit; font-size: 16px; line-height: 1.4; outline: none;
}
body.is-phone .lg-ta { resize: none; }
body.is-phone .lg-in:focus { border-color: var(--primary-fg); }
body.is-phone .lg-in.is-changed { border-color: rgba(245, 158, 11, .7); }
body.is-phone .lg-in[readonly] { color: var(--text-muted); background: rgba(255, 255, 255, .03); }
body.is-phone .lg-fl-ro { min-height: 44px; display: flex; align-items: center; font-size: 16px; color: var(--text-muted); }
body.is-phone .lg-in-w { position: relative; display: block; min-width: 0; }
body.is-phone .lg-in-run {
    position: absolute; top: 1px; bottom: 1px; left: 13px; right: 13px; display: flex; align-items: center; overflow: hidden; white-space: nowrap;
    pointer-events: none; font-size: 16px; line-height: 1.4; color: var(--text-main);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6px, #000 calc(100% - 10px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 6px, #000 calc(100% - 10px), transparent 100%);
}
body.is-phone .lg-in-run-t { display: inline-flex; gap: 24px; }
body.is-phone .lg-in-w.is-run > .lg-in { color: transparent; }
body.is-phone .lg-in[readonly] + .lg-in-run { color: var(--text-muted); }
body.is-phone .lg-num-call { display: flex; }
body.is-phone :is(.lg-num-st, .lg-info-st):empty { display: none; }
body.is-phone :is(.lg-num-st, .lg-info-st) .lg-note { margin: 0; }
body.is-phone .lg-num-chips { flex-wrap: wrap; overflow: visible; }
body.is-phone .lg-hist-r { display: flex; gap: 12px; padding: 10px 14px; }
body.is-phone .lg-hist-r + .lg-hist-r { border-top: 1px solid rgba(255, 255, 255, .08); }
body.is-phone .lg-hist-t { flex: none; width: 76px; font-size: 13px; color: var(--text-muted); }
body.is-phone .lg-hist-b { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
body.is-phone .lg-hist-n { font-size: 13px; font-weight: 700; }
body.is-phone .lg-hist-v { font-size: 14px; overflow-wrap: anywhere; }
body.is-phone .lg-hist .lg-note { margin: 10px 14px; }

.cg-out-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-top);
    display: flex; flex-direction: column; gap: 1.5vw;
    padding: 2.5vw 3vw calc(2.5vw + env(safe-area-inset-bottom, 0px));
    background: var(--bg-raised); border-top: 1px solid var(--border-strong); box-shadow: var(--shadow-pop);
    font-family: var(--font-sans); color: var(--text-main);
}
.cg-out-bar[hidden] { display: none; }
.cg-out-label { font-size: 3.6vw; font-weight: 600; }
.cg-out-row { display: flex; flex-wrap: wrap; gap: 2vw; }
.cg-out-bar .cg-out-btn { height: auto; min-height: 11vw; padding: 0 4vw; font-size: 4vw; border-radius: 2vw; }
.cg-out-hint { font-size: 3vw; color: var(--text-muted); line-height: 1.5; }
body.is-phone .cg-out-bar {
    position: static; z-index: auto; gap: 6px; padding: 0; background: transparent; border-top: none; box-shadow: none;
}
body.is-phone .cg-out-label { margin: 0 var(--space-1); font-size: var(--fs-sm); font-weight: 400; color: var(--text-muted); }
body.is-phone .cg-out-row {
    flex-wrap: nowrap; gap: 2px; padding: 2px; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--bg-base);
}
body.is-phone .cg-out-bar .cg-out-btn {
    flex: 1 1 0; min-height: 44px; height: 44px; padding: 0 var(--space-2); border: none; border-radius: var(--radius-md);
    background: transparent; font-size: var(--fs-lg); font-weight: 600;
}
body.is-phone .cg-out-bar .cg-out-btn[aria-pressed="true"] { background: var(--primary-strong); color: var(--accent-text); }
body.is-phone .cg-out-hint { display: none; }
.cg-out-lock {
    position: fixed; inset: 0; z-index: var(--z-lock);
    display: flex; flex-direction: column; align-items: center; box-sizing: border-box;
    padding: 18vh 7vw max(7vh, env(safe-area-inset-bottom, 0px));
    background: #000; color: #767676; font-family: var(--font-sans); text-align: center;
    touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.cg-out-lock[hidden] { display: none; }
.cg-out-lock-title { font-size: 6.2vw; font-weight: 600; color: #6b6b6b; }
.cg-out-lock-note { margin-top: 3vw; font-size: 3.4vw; line-height: 1.6; color: #767676; max-width: 80vw; }
.cg-out-lock-gap { flex: 1 1 auto; }
.cg-out-ptt {
    width: 47vw; height: 47vw; box-sizing: border-box; border-radius: 50%; border: 2px solid #2b2b2b; background: #0a0a0a;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2vw; color: #767676;
}
.cg-out-ptt[hidden], .cg-out-ptt-note[hidden] { display: none; }
.cg-out-ptt svg { width: 10vw; height: 10vw; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cg-out-ptt-lbl { font-size: 4.6vw; font-weight: 600; }
.cg-out-ptt-since { font: 600 3.8vw/1 var(--font-mono); }
.cg-out-ptt-since:empty { display: none; }
.cg-out-ptt[data-on="1"] {
    border-color: rgba(var(--primary-rgb), .6); background: rgba(37, 99, 235, .28); color: var(--primary-fg);
    box-shadow: 0 0 0 2.6vw rgba(37, 99, 235, .12);
}
.cg-out-ptt-note { margin-top: 4vw; font-size: 3.4vw; line-height: 1.6; color: #767676; }
.cg-out-unlock { font-size: 3.8vw; color: #767676; }

.dashboard-container.dash-2col {
    height: 100%;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dash-top {
    flex: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 24px 16px 9px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}
.tb-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; min-height: 24px; }

.fld { display: flex; align-items: center; gap: 6px; min-width: 0; }
.fld-l { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; flex: none; }
.fld-l::after { content: '：'; }
.fld-v {
    font-size: 12.5px;
    flex: 0 1 auto;
    min-width: 44px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-main);
}
.fld-v.mono { font-family: var(--font-mono); font-size: 12px; }
.tb-postal-mark { font-size: 11.5px; color: var(--text-muted); flex: none; margin-right: -2px; }
.fld-v.tb-postal { min-width: 64px; flex: none; }

.fld-v[contenteditable="true"] {
    outline: none;
    cursor: text;
    border-radius: 4px;
    padding: 1px 4px;
    margin: -1px -4px;
}
.fld-v[contenteditable="true"]:hover { background: rgba(255, 255, 255, .05); }
.fld-v[contenteditable="true"]:focus {
    background: rgba(var(--primary-rgb), .2);
    box-shadow: inset 0 0 0 1px var(--primary-blue);
}
.fld-v:empty::before { content: '未登録'; color: var(--text-muted); opacity: .55; }

.fld-v.anim-update-other {
    animation: ctiDiFlash 1.1s ease-out;
}
@keyframes ctiDiFlash {
    0%   { box-shadow: inset 0 0 0 2px var(--warning-orange); background: rgba(var(--warning-rgb), .22); }
    100% { box-shadow: inset 0 0 0 2px transparent; background: transparent; }
}

.tb-hosp { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.tb-hcode { font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); flex: none; }
.tb-hname {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tb-sel {
    background: var(--bg-card-hover);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 6px;
    padding: 3px 8px;
    font: inherit;
    font-size: 12.5px;
}
.tb-sel-pref { width: 132px; }
.tb-sel-hosp { width: 460px; }
.tb-sel:disabled { opacity: .55; }

.tb-status { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: bold; color: var(--text-muted); white-space: nowrap; }
.tb-status::before { content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tb-status[data-state="ok"] { color: var(--success-fg); }
.tb-status[data-state="warn"] { color: var(--amber-fg); }
.tb-status[data-state="err"] { color: var(--danger-fg); }

.callbtn {
    flex: none;
    width: 19px;
    height: 19px;
    padding: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    color: var(--text-muted);
}
.sidebar.cti-on ~ .main-content .callbtn { display: inline-flex; }
.callbtn svg { width: 13px; height: 13px; fill: currentColor; display: block; }
.callbtn:hover:not(:disabled) { background: rgba(22, 163, 74, .22); color: #7fca9c; }
.callbtn:active:not(:disabled) { transform: scale(.9); }
.callbtn:focus-visible { outline: 2px solid var(--primary-blue); outline-offset: 1px; }
.callbtn:disabled { opacity: .22; cursor: default; }

.dash-cols {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: var(--dash-l, 4.5fr) 5px var(--dash-r, 5.5fr);
    border-top: 1px solid var(--border-color);
}

.dash-col {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
}

.dash-col .col-head {
    flex: none;
    display: flex;
    align-items: center;
    gap: 10px;
    height: var(--dash-colhead-h);
    box-sizing: border-box;
    padding: 0 14px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}
.dash-col .col-title {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    color: var(--text-muted);
}
.dash-col .col-count { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-muted); }
.dash-col .col-sp { flex: 1; }

.dash-col .col-body {
    flex: 1;
    overflow: auto;
    min-height: 0;
    overscroll-behavior: contain;
}
.dash-col-phone > .col-body { padding: 0 18px 28px; }
.dash-col-phone > .col-body > div[data-view] { padding-top: 14px; }

.dash-col-doctors > .col-body { padding: 0 18px 20px; }

.dr-stale {
    font-size: 10.5px;
    color: var(--warning-orange);
    background: rgba(var(--warning-rgb), .12);
    border: 1px solid rgba(var(--warning-rgb), .28);
    border-radius: 999px;
    padding: 1px 8px;
    white-space: nowrap;
    cursor: help;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
}

.dr-tabs[hidden] { display: none; }
.dr-tabs { flex: none; }
.dash-col-doctors .col-title { flex: none; }
.dash-col-doctors .col-count { flex: none; }

.dr-lock {
    font-size: 10.5px;
    color: var(--danger-red, var(--danger-red));
    background: rgba(var(--danger-rgb), .12);
    border: 1px solid rgba(var(--danger-rgb), .28);
    border-radius: 999px;
    padding: 1px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex-shrink: 3;
}
.dr-lock[hidden], .dr-stale[hidden] { display: none; }

.dr-collect {
    font-size: 10.5px;
    color: var(--text-muted);
    background: rgba(148, 163, 184, .10);
    border: 1px solid rgba(148, 163, 184, .25);
    border-radius: 999px;
    padding: 1px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex-shrink: 2;
    cursor: help;
}
.dr-collect.run  { color: var(--primary-blue); border-color: rgba(var(--primary-rgb), .35); }
.dr-collect.warn { color: var(--warning-orange); border-color: rgba(var(--warning-rgb), .35); }
.dr-collect[hidden] { display: none; }

.dr-table tbody tr.dr-marker { background: rgba(255,255,255,.03); }
.dr-table tbody tr.dr-marker .dr-v { color: var(--text-muted); font-style: italic; }

.dr-table {
    width: 100%;
    margin-top: 8px;
    min-width: 626px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    font-size: 12px;
}
.dr-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    height: 30px;
    background: var(--bg-card-hover);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: .04em;
    text-align: left;
    padding: 0 7px;
    white-space: nowrap;
    box-sizing: border-box;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-strong);
}
.dr-table tbody td {
    height: 38px;
    padding: 0;
    white-space: nowrap;
    overflow: hidden;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.dr-table tbody tr:nth-child(even) td { background: rgba(255, 255, 255, .018); }
.dr-table tbody tr:hover td { background: rgba(var(--primary-rgb), .13); }
.dr-table tbody tr.dr-sel td { background: rgba(var(--primary-rgb), .18); }

.dr-v {
    display: block;
    width: 100%;
    height: 38px;
    line-height: 38px;
    padding: 0 7px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    outline: none;
    cursor: text;
    color: var(--text-main);
}
.dr-v:focus { background: rgba(var(--primary-rgb), .22); box-shadow: inset 0 0 0 1px var(--primary-blue); }
.dr-ctr .dr-v { text-align: center; }
.dr-mono .dr-v { font-family: var(--font-mono); font-size: 11.5px; }
.dr-c-dept .dr-v, .dr-c-stat .dr-v {
    font-size: 10.5px;
    line-height: 1.25;
    height: 38px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    word-break: break-all;
    overflow: hidden;
    padding-top: 6px;
    padding-bottom: 6px;
    box-sizing: border-box;
}
.dr-c-stat .dr-v { text-align: center; }
.dr-c-sel { padding: 0; border-right: 0; text-align: center; }
.dr-chk { width: 100%; height: 38px; background: transparent; border: 0; color: var(--text-muted); font: inherit; font-size: 13px; cursor: pointer; padding: 0; }
.dr-chk[aria-pressed="true"] { color: var(--success-fg); }
.dr-table tbody tr.dr-selected td { background: rgba(34, 197, 94, .22); }
.dr-table tbody tr.dr-draft td { background: rgba(250, 204, 21, .12); }
.dr-table tbody tr.dr-draft td:first-child { box-shadow: inset 3px 0 0 #facc15; }
.dr-toolbar { flex: none; display: flex; align-items: center; gap: 6px 10px; padding: 8px 18px 0; min-height: 24px; flex-wrap: wrap; }
.dr-select { display: inline-flex; gap: 6px; align-items: center; }
.dr-select-actions { display: inline-flex; gap: 6px; align-items: center; }
.dr-view-toggles { margin-left: auto; display: inline-flex; gap: 10px; align-items: center; }
.dr-select-actions[hidden] { display: none; }
.dr-select-count { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

.dr-c-name .dr-name2 {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 38px;
    padding: 0 7px;
    overflow: hidden;
}
.dr-c-name .dr-name2 .dr-v {
    height: auto;
    line-height: 1.3;
    padding: 0;
    border-radius: 3px;
}
.dr-c-name .dr-v-name { font-size: 12px; font-weight: 600; }
.dr-c-name .dr-v-univ {
    font-size: 10px;
    color: var(--text-muted);
    min-height: 14px;
}
.dr-table tbody tr:hover .dr-v-univ:empty { background: rgba(255, 255, 255, .05); }

.dr-c-dphs .dr-dphs { display: flex; align-items: center; height: 38px; }
.dr-c-dphs .dr-v { flex: 1; min-width: 0; }

.dr-table th.dr-c-mark { width: 54px; }
.dr-table th.dr-c-year { width: 44px; }
.dr-table th.dr-c-name { width: 118px; }
.dr-table th.dr-c-dept { width: 152px; }
.dr-table th.dr-c-phs  { width: 72px; }
.dr-table th.dr-c-dphs { width: 104px; }
.dr-table th.dr-c-sel  { width: 22px; padding: 0; border-right: 0; }

.dr-msg td {
    height: auto;
    padding: 18px 14px;
    color: var(--text-muted);
    font-size: 13px;
    white-space: normal;
    border-right: none;
}

.dash-splitter {
    background: var(--border-color);
    cursor: col-resize;
    position: relative;
    transition: background .15s;
}
.dash-splitter::before {
    content: '';
    position: absolute;
    left: -4px; right: -4px; top: 0; bottom: 0;
}
.dash-splitter::after {
    content: '';
    position: absolute;
    left: 1px; width: 3px; top: 50%; height: 34px;
    transform: translateY(-50%);
    border-radius: 2px;
    background: var(--text-muted);
    opacity: 0;
    transition: opacity .15s;
}
.dash-splitter:hover, .dash-splitter.is-dragging { background: var(--primary-blue); }
.dash-splitter:hover::after, .dash-splitter.is-dragging::after { opacity: .7; }
.dash-splitter:focus-visible { outline: 2px solid var(--primary-blue); outline-offset: -1px; }

.dash-pv-wrap {
    position: fixed;
    inset: 0;
    z-index: var(--z-drag);
    pointer-events: none;
}
.dash-pv {
    position: fixed;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.dash-pv-lbl {
    font: 600 12px/1 var(--font-mono);
    color: var(--accent-text);
    background: var(--primary-blue);
    border-radius: 999px;
    padding: 6px 13px;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .5);
}
.dash-pv-wrap.is-limit .dash-pv-lbl { background: var(--warning-orange); color: #1a1a1a; }

body.dash-resizing { cursor: col-resize; user-select: none; }

body.dash-resizing .phone-group {
    content-visibility: auto;
    contain-intrinsic-size: auto 660px;
}

@media (max-width: 1089px) {
    .dashboard-container.dash-2col {
        height: auto;
        overflow: visible;
        display: block;
    }
    .dash-top { padding: 18px 20px 0; }
    .dash-cols { display: block; border-top: none; }
    .dash-col { display: block; }
    .dash-col .col-body { overflow: visible; }
    .dash-col-phone > .col-body { padding: 14px 20px 28px; }
    .dash-splitter { display: none; }
    .dash-col .col-head { position: sticky; top: 0; z-index: 12; }
    .dash-col-phone .prefix-header-container { top: var(--dash-colhead-h); }
    .dash-col-doctors .dr-table thead th { top: var(--dash-colhead-h); }
    .dash-col-doctors > .col-body { padding: 14px 20px 20px; }
    .dash-col-doctors .dr-table { margin-top: 0; }
}

.phone-group {
    margin-bottom: 40px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    background: var(--bg-card);
}

.prefix-input {
    width: 200px;
    padding: 3px 10px;
    font-size: 14px;
    background-color: var(--bg-base);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-main);
    font-weight: 600;
}

.phone-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 14px;
}

.phone-table th,
.phone-table td {
    border: 1px solid var(--border-color);
    padding: 0;
    text-align: center;
    height: 28px;
    position: relative;
}

.phone-table th:first-child,
.phone-table td:first-child {
    border-left: none;
}

.phone-table th:last-child,
.phone-table td:last-child {
    border-right: none;
}

.phone-table tr:last-child td {
    border-bottom: none;
}

.phone-table tr:last-child td:first-child {
    border-bottom-left-radius: 8px;
}

.phone-table tr:last-child td:last-child {
    border-bottom-right-radius: 8px;
}

.phone-table th {
    background-color: var(--bg-base);
    color: var(--text-muted);
    font-weight: 600;
    height: 32px;
    padding: 0 2px;
    white-space: nowrap;
    box-sizing: border-box;
}

.phone-table th:nth-child(odd)  { width: 4%; }
.phone-table th:nth-child(even) { width: 16%; }

.num-cell {
    background-color: var(--bg-base);
    color: var(--text-muted);
    font-weight: 600;
    width: 4%;
}

.data-cell {
    width: 16%;
    background-color: transparent;
}

.phone-input {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 0 6px;
    border: 1px solid transparent;
    background: transparent;
    font-size: 14px;
    color: var(--text-main);
    text-align: center;
    outline: none;
    cursor: text;
    transition: background-color 0.3s ease;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.phone-input:hover:not(:focus):not(:disabled) {
    background-color: var(--bg-card-hover);
}

.phone-input:hover {
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.phone-input:focus {
    background: var(--bg-base);
    box-shadow: inset 0 0 0 2px var(--border-strong);
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    cursor: text;
    outline: none;
}

.locked-input {
    background-color: #222222 !important;
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: inset 0 0 0 1px var(--border-color);
}

.lock-badge {
    position: absolute;
    right: 2px;
    top: -8px;
    font-size: 10px;
    background-color: var(--danger-red);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.page-indicator {
    color: var(--primary-blue);
    font-weight: 600;
    margin-left: 15px;
    font-size: 15px;
}

@keyframes pulse-self {
    0% {
        box-shadow: inset 0 0 0 0 rgba(255, 255, 255, 0);
        background-color: transparent;
    }

    25% {
        box-shadow: inset 0 0 10px 2px rgba(255, 255, 255, 0.4);
        background-color: rgba(255, 255, 255, 0.1);
    }

    50% {
        box-shadow: inset 0 0 2px 1px rgba(255, 255, 255, 0.2);
        background-color: rgba(255, 255, 255, 0.05);
    }

    75% {
        box-shadow: inset 0 0 10px 2px rgba(255, 255, 255, 0.4);
        background-color: rgba(255, 255, 255, 0.1);
    }

    100% {
        box-shadow: inset 0 0 0 0 rgba(255, 255, 255, 0);
        background-color: transparent;
    }
}

@keyframes pulse-other {
    0% {
        box-shadow: inset 0 0 0 0 rgba(100, 116, 139, 0);
        background-color: transparent;
    }

    25% {
        box-shadow: inset 0 0 10px 2px rgba(100, 116, 139, 0.6);
        background-color: rgba(100, 116, 139, 0.3);
    }

    50% {
        box-shadow: inset 0 0 2px 1px rgba(100, 116, 139, 0.4);
        background-color: rgba(100, 116, 139, 0.15);
    }

    75% {
        box-shadow: inset 0 0 10px 2px rgba(100, 116, 139, 0.6);
        background-color: rgba(100, 116, 139, 0.3);
    }

    100% {
        box-shadow: inset 0 0 0 0 rgba(100, 116, 139, 0);
        background-color: transparent;
    }
}

.anim-update-self {
    animation: pulse-self 1.2s ease-out forwards;
}

.anim-update-other {
    animation: pulse-other 1.2s ease-out forwards;
}

.add-group-btn {
    display: block;
    width: 60px;
    height: 60px;
    margin: 40px auto;
    background-color: var(--primary-blue);
    color: white;
    font-size: 32px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.3);
    transition: all 0.2s ease;
}

.add-group-btn:hover {
    background-color: #2563eb;
    transform: scale(1.1);
}

.delete-group-btn {
    margin-left: auto;
}

.disabled-table {
    opacity: 0.4;
    pointer-events: none;
    filter: grayscale(50%);
    transition: all 0.3s ease;
}

.prefix-part {
    text-align: center;
    background-color: transparent;
    color: var(--text-main);
}

.prefix-part:not([readonly]):focus {
    box-shadow: inset 0 0 0 2px var(--border-strong);
    background-color: var(--bg-base);
}

.history-toggle-btn {
    position: fixed;
    bottom: 30px;
    right: 70px;
    width: 60px;
    height: 60px;
    background-color: var(--bg-card);
    color: var(--text-main);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 26px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: var(--z-float);
    transition: transform 0.2s ease, background-color 0.2s;
    border: 1px solid var(--border-color);
}

.history-toggle-btn:hover {
    transform: scale(1.05);
    background-color: var(--bg-card-hover);
}

.history-panel {
    position: fixed;
    bottom: 100px;
    right: 70px;
    width: 320px;
    max-height: 450px;
    background: var(--bg-card);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: var(--z-float-under);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

#floating-btn-container { position: fixed; bottom: 30px; right: 70px; display: flex; align-items: center; gap: 10px; z-index: var(--z-float); perspective: 1000px; }
#btn-flipper { position: relative; width: 50px; height: 50px; transform-style: preserve-3d; transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
#btn-flipper > .history-toggle-btn { position: absolute; top: 0; left: 0; margin: 0; backface-visibility: hidden; width: 100%; height: 100%;
    border-radius: 50%; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); }
#activeUsersBtn { background-color: var(--bg-card); }
#historyBtn { background-color: var(--bg-card-hover); color: var(--text-main); transform: rotateY(-180deg); }
#btn-flipper > .history-toggle-btn svg { width: 26px; height: 26px; fill: currentColor; }
.view-toggles { display: flex; flex-direction: column; gap: 8px; }
.view-toggle-btn { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #94a3b8; background: transparent; cursor: pointer;
    padding: 0; outline: none; transition: all 0.3s; }
#toggleActiveUsersView { border-color: #3b82f6; background: #3b82f6; }
#activeUsersPanel { right: 145px; }
.history-panel-head { padding: 10px 14px; background: var(--bg-raised); border-bottom: 1px solid var(--border-color); font-weight: 600; color: var(--text-main);
    font-size: var(--fs-md); display: flex; justify-content: space-between; align-items: center; }
#activeUserCount { color: var(--primary-fg); font-family: var(--font-mono); font-size: var(--fs-lg); }
.history-list-note { padding: 15px; text-align: center; color: var(--text-muted); font-size: var(--fs-md); }
.au-name { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-weight: 600; color: var(--text-main); }
.au-name.au-me { color: var(--primary-fg); }
.au-hosp { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--text-muted); }
.au-ico { display: inline-flex; flex: none; }
.au-ico svg { width: 14px; height: 14px; fill: currentColor; }

.history-panel.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.history-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    flex-grow: 1;
}

.history-item {
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
    color: var(--text-main);
}

.history-item:hover {
    background: var(--bg-card-hover);
}

.history-item.current {
    background: var(--accent-bg);
    border-left: 4px solid var(--accent-text);
}

.history-item.future {
    color: var(--text-muted);
    text-decoration: line-through;
    background: transparent;
}

.history-item-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

@media (hover: none),
(max-width: 1024px) {
    .sidebar {
        position: absolute;
        height: 100%;
        z-index: var(--z-float);
    }

    .main-content {
        margin-left: var(--cti-side-w-min) !important;
        width: calc(100vw - var(--cti-side-w-min));
    }
}

.prefix-header-container {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg-card);
    padding: 6px 16px;
    border-bottom: 1px solid var(--border-color);
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 30px;
}

.prefix-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
    flex: 1;
}

.ph-input-area {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 80px;
    flex-shrink: 0;
}

.ph-page {
    white-space: nowrap;
    min-width: 80px;
    text-align: center;
    flex-shrink: 0;
}

.label-text {
    color: var(--text-muted);
    font-weight: bold;
}

.hospital-name-text {
    margin-left: 8px;
    color: var(--text-main);
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

#floating-editor {
    position: fixed;
    z-index: var(--z-editor);
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    padding: 10px;
    display: none;
    width: 280px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

#floating-editor.visible {
    opacity: 1;
}

#floating-textarea {
    width: 100%;
    min-height: 40px;
    max-height: 250px;
    border: none;
    resize: none;
    outline: none;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-y: auto;
    background: transparent;
    color: var(--text-main);
}

.memo-cols { display: flex; gap: 20px; flex-wrap: wrap; }
.memo-col { flex: 1; min-width: 320px; display: flex; flex-direction: column; }
.memo-col-stack { gap: 20px; }
.memo-card { padding: 0; overflow: hidden; }
.memo-card-head { padding: 12px 20px; border-bottom: 1px solid var(--border-color); background: var(--bg-card-hover); }
.memo-card-head h3 { margin: 0; font-size: 14px; color: var(--text-main); }

.memo-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.memo-table thead th {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: bold;
    color: var(--text-muted);
    background: var(--bg-base);
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    text-align: left;
}

.memo-table thead th:last-child {
    border-right: none;
}

.memo-table tbody td {
    padding: 0;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

.memo-table tbody td:last-child {
    border-right: none;
}

.memo-table tbody tr:hover {
    background: rgba(var(--primary-rgb), 0.04);
}

.memo-table tbody tr.memo-row-selected {
    background: rgba(var(--primary-rgb), 0.12) !important;
}

.memo-table tbody tr.memo-row-selected td {
    border-bottom-color: rgba(var(--primary-rgb), 0.3);
}

.memo-ext-row {
    background: rgba(255, 255, 255, 0.03);
}

.memo-ext-row td {
    border-bottom-color: rgba(255, 255, 255, 0.05) !important;
}

.memo-cell-ext {
    color: var(--text-muted) !important;
    opacity: 0.7;
    cursor: default;
}

.memo-cell-ext:focus {
    background: transparent !important;
    box-shadow: none !important;
}

.memo-table tbody td input.memo-cell {
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: var(--text-main);
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
    transition: background 0.2s;
}

.memo-table tbody td input.memo-cell:hover {
    background: rgba(var(--primary-rgb), 0.04);
}

.memo-table tbody td input.memo-cell:focus {
    background: rgba(var(--primary-rgb), 0.1);
    box-shadow: inset 0 0 0 1px rgba(var(--primary-rgb), 0.3);
}

.memo-table tbody td input.memo-cell::placeholder {
    color: var(--text-muted);
    opacity: 0.4;
}

.memo-context-menu {
    display: none;
    position: fixed;
    z-index: var(--z-top);
}

.prefix-invalid {
    border-color: var(--danger-red) !important;
    box-shadow: 0 0 0 1px rgba(var(--danger-rgb), 0.3) !important;
}

.conflict-cell {
    animation: conflict-pulse 2s ease-in-out infinite;
    cursor: pointer !important;
    border: 1px solid rgba(var(--warning-rgb), 0.5) !important;
}

.conflict-cell.conflict-showing-ext {
    color: var(--warning-orange) !important;
    font-style: italic;
}

@keyframes conflict-pulse {
    0%, 100% { background: rgba(var(--warning-rgb), 0.05); }
    50% { background: rgba(var(--warning-rgb), 0.15); }
}

.tb-master-btns { display: inline-flex; gap: 6px; }
.fld-v.tb-locked { cursor: not-allowed; opacity: .7; border-bottom: 1px dashed var(--amber-fg); }
.hosp-target { font-size: 15px; font-weight: bold; color: var(--text-main); margin: 0 0 8px; }
.hosp-summary { margin: 0 0 14px; padding-left: 18px; font-size: 12.5px; color: var(--text-muted); line-height: 1.6; }
.hosp-summary .ui-warn { margin: 2px 0 0; }
.ui-table td.hosp-code { font-family: var(--font-mono); }
.ui-table td.hosp-name { white-space: normal; }

.dr-actions { display: inline-flex; gap: 6px; align-items: center; }
.dr-table tbody tr.dr-sfa td { background: rgba(22, 163, 74, .10); }
.dr-table tbody tr.dr-sfa td:first-child { box-shadow: inset 3px 0 0 #22c55e; }
.dr-table tbody tr.dr-sfa.dr-synced td { background: rgba(22, 163, 74, .045); color: var(--text-muted); }
.dr-table tbody tr.dr-sfa.dr-synced td:first-child { box-shadow: inset 3px 0 0 rgba(34, 197, 94, .45); }
.dr-table tbody tr.dr-sfa.dr-hidden td { opacity: .55; }
.dr-table tbody tr.dr-sfa.dr-hidden td:first-child { box-shadow: inset 3px 0 0 transparent; border-left: 3px dotted #22c55e; }
.dr-table tbody tr.dr-sfa .dr-v[contenteditable="true"] { cursor: text; }
.dr-table tbody tr.dr-sfa .dr-v[contenteditable="true"]:hover { background: rgba(255, 255, 255, .06); }
.dr-table tbody tr.dr-sfa .dr-v[contenteditable="true"]:focus { background: rgba(34, 197, 94, .18); box-shadow: inset 0 0 0 1px #22c55e; }
.sfa-imp-form { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; }
.sfa-imp-form .ui-field { flex: none; }
.sfa-imp-form select.ui-input { width: 150px; }
.sfa-imp-wrap { max-height: 46vh; }
.sfa-imp-table td.sfa-imp-done { color: #7fca9c; }
.sfa-imp-table tr.sfa-imp-imported td { color: var(--text-muted); }
.sfa-imp-table td.sfa-imp-year { font-family: var(--font-mono); white-space: nowrap; }
.sfa-imp-box { max-width: 980px; }
.sfa-imp-table { table-layout: fixed; font-size: 12px; }
.sfa-imp-table th { box-sizing: border-box; font-size: 11px; }
.sfa-imp-table th, .sfa-imp-table td { padding: 6px 8px; }
.sfa-imp-table .col-pick { width: 64px; }
.sfa-imp-table .col-name { width: 104px; }
.sfa-imp-table .col-year { width: 120px; }
.sfa-imp-table .col-title { width: 150px; }
.sfa-imp-table .col-state { width: 56px; }
.sfa-imp-table .fit { display: block; white-space: nowrap; overflow: hidden; min-width: 0; }
.sfa-imp-table td.sfa-imp-name .fit { font-size: 12px; }

.dr-table tbody tr.dr-dup { outline: 2px solid rgba(var(--danger-rgb), .85); outline-offset: -2px; animation: dr-dup-pulse 1.8s ease-in-out infinite; }
.dr-table tbody tr.dr-dup td { background: rgba(var(--danger-rgb), .07); }
@keyframes dr-dup-pulse {
    0%, 100% { outline-color: rgba(var(--danger-rgb), .35); }
    50% { outline-color: rgba(var(--danger-rgb), .95); }
}
.dr-table td.dr-c-gycand { position: relative; }
.dr-gy-cand { position: absolute; inset: 3px 2px; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono);
    font-size: 11px; color: var(--amber-fg); border: 1px dashed rgba(var(--warning-rgb), .6); border-radius: 4px; background: rgba(var(--warning-rgb), .08); cursor: help; animation: conflict-pulse 2s ease-in-out infinite; }
#dr-gy-pop { position: fixed; z-index: var(--z-top-pop); min-width: 200px; max-width: 320px; font-size: 12px; color: var(--text-main); }
#dr-gy-pop[hidden] { display: none; }
.dr-gy-pop-title { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.dr-gy-pop-list { display: flex; flex-wrap: wrap; gap: 6px; }
.dr-gy-pick { font: inherit; font-family: var(--font-mono); font-size: 13px; padding: 4px 10px; border: 1px solid rgba(var(--warning-rgb), .6); border-radius: 6px; background: rgba(var(--warning-rgb), .08); color: var(--amber-fg); cursor: pointer; display: inline-flex; flex-direction: column; align-items: center; line-height: 1.2; }
.dr-gy-pick small { font-size: 10px; color: var(--text-muted); }
.dr-gy-pick:hover:not(:disabled) { background: rgba(var(--warning-rgb), .22); }
.dr-gy-pick:disabled { opacity: .45; cursor: not-allowed; }
.dr-gy-pop-role { margin-top: 8px; font-size: 12px; }
.dr-gy-pop-hint { margin-top: 6px; font-size: 10.5px; color: var(--text-muted); }
.dr-gy-cand.dr-gy-many { font-size: 10px; letter-spacing: -.02em; }
.dr-table td.dr-c-gypage { position: relative; }
.dr-gy-page { position: absolute; top: 1px; right: 1px; font-size: 9px; line-height: 1; padding: 1px 2px; border-radius: 3px;
    background: rgba(56, 189, 248, .15); color: #38bdf8; cursor: help; font-family: inherit; }
.dr-gy-pop-note { margin-top: 8px; font-size: 11px; line-height: 1.5; color: var(--text-main); word-break: break-all; }
.dr-gy-pop-note span { color: var(--text-muted); }
.dr-gy-pop-cands { margin-top: 6px; font-size: 11px; line-height: 1.5; color: var(--text-muted); font-family: var(--font-mono); word-break: break-all; }

.dr-table td.dr-c-fy { position: relative; }
.dr-fy { position: absolute; top: 2px; right: 3px; font-size: 9px; line-height: 1.2; padding: 0 4px; border-radius: 3px; border: 1px solid; pointer-events: auto; }
.dr-fy-now { color: #4ade80; border-color: rgba(74, 222, 128, .5); }
.dr-fy-old { color: var(--text-muted); border-color: rgba(156, 163, 175, .6); background: rgba(156, 163, 175, .12); }

.probe-btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.probe-btn .probe-btn-ico { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.probe-btn .probe-btn-ico circle { fill: currentColor; stroke: none; }
.probe-btn-badge { display: inline-block; min-width: 16px; padding: 0 5px; box-sizing: border-box; border-radius: 8px;
    background: rgba(var(--amber-rgb), .18); color: var(--amber-fg); font-size: 10.5px; font-weight: 700; line-height: 16px; text-align: center; }
.probe-btn-badge[hidden] { display: none; }
.probe-btn-live { border-color: rgba(var(--primary-rgb), .6); background: rgba(var(--primary-rgb), .08); color: var(--text-main); }
.probe-btn-live .probe-btn-ico { color: var(--primary-fg); }
.probe-btn-off { border-style: dashed; border-color: rgba(255, 255, 255, .22); }
@media (max-width: 1600px) {
    .probe-btn { padding-left: 8px; padding-right: 8px; gap: 4px; }
    .probe-btn .probe-btn-label { display: none; }
}

.pb-ico { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.pb-ico .pb-ico-dot { fill: currentColor; stroke: none; }
.pb-ico .pb-ico-dim { opacity: .45; }
.pb-ico .pb-sweep { transform-origin: 12px 12px; animation: pbSweep 1.6s linear infinite; }
.pb-ico-ok { color: var(--success-fg); stroke-width: 2.2; }
@keyframes pbSweep { to { transform: rotate(360deg); } }

.pb-slot { display: inline-flex; align-items: center; gap: 8px; flex: none; margin: 0 8px 0 10px; }
.pb-slot:empty { display: none; }
.pb-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; box-sizing: border-box; padding: 0 11px 0 9px;
    border: 1px solid rgba(255, 255, 255, .24); border-radius: 14px; background: rgba(255, 255, 255, .04); color: var(--text-main);
    font: inherit; font-size: 12px; line-height: 1; white-space: nowrap; }
button.pb-chip { cursor: pointer; }
button.pb-chip:hover { filter: brightness(1.15); }
.pb-chip b { font-weight: 700; }
.pb-chip-run { border-color: rgba(var(--primary-rgb), .55); background: rgba(var(--primary-rgb), .12); color: #dbeafe; }
.pb-chip-run .pb-ico { color: var(--primary-fg); }
.pb-chip-wait .pb-ico { color: var(--text-muted); }
.pb-chip-done { border-color: rgba(var(--success-rgb), .45); background: rgba(var(--success-rgb), .08); color: #d1fae5; }
.pb-chip-cancel { border-style: dashed; border-color: rgba(255, 255, 255, .3); background: transparent; color: var(--text-muted); }
.pb-chip-cancel b { color: var(--text-main); }
.pb-chip-part { border-style: dashed; border-color: rgba(var(--success-rgb), .4); background: transparent; color: #a7f3d0; }
.pb-chip-none, .pb-chip-gone { border-color: rgba(255, 255, 255, .16); background: transparent; color: var(--text-muted); }
.pb-chip-sm { height: 24px; padding: 0 9px 0 7px; font-size: 11.5px; border-radius: 12px; }
.pb-chip-xs { height: 18px; padding: 0 6px; font-size: 10.5px; border-radius: 9px; vertical-align: 1px; }
.pb-chip-sep { width: 1px; height: 12px; background: rgba(255, 255, 255, .2); }
.pb-judge-n { color: var(--amber-fg); }
.pb-ai-n { color: #fde68a; }
.pb-sep-dot { color: var(--text-muted); }
.pb-why { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; }
.prefix-header-left .hospital-name-text { flex: 1 1 0; }
@media (max-width: 1600px) { .pb-why { display: none; } }
.pb-probe.on { color: var(--primary-fg); background: var(--primary-soft); border-color: var(--primary-line); }
.ui-btn .pb-ico { fill: none; }
.pb-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: rgba(var(--primary-rgb), .18); pointer-events: none; }
.pb-progress > span { display: block; height: 2px; width: 0; background: var(--primary-blue); transition: width .4s ease; }

.ui-pop.pb-pop { position: fixed; z-index: var(--z-modal-pop); width: 340px; font-size: 12px; color: var(--text-main); }
.pb-pop[hidden] { display: none; }
.pb-pop-caret { position: absolute; top: -6px; width: 10px; height: 10px; background: var(--bg-raised);
    border-left: 1px solid var(--border-strong); border-top: 1px solid var(--border-strong); transform: rotate(45deg); }
.pb-pop.above .pb-pop-caret { top: auto; bottom: -6px; transform: rotate(225deg); }
.pb-pop-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; min-width: 0; }
.pb-pop-title { margin: 0; font-size: 13px; font-weight: 700; flex: none; color: var(--text-main); }
.pb-pop-head .mono { font-family: var(--font-mono); font-size: 12px; flex: none; }
.pb-pop-head .pb-pop-dim { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-pop-dim { color: var(--text-muted); }
.pb-pop-steps { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pb-pop-steps legend { padding: 0; margin-bottom: 4px; font-size: 11px; color: var(--text-muted); }
.pb-pop-step { display: grid; grid-template-columns: 18px 20px 1fr auto; align-items: center; gap: 6px; padding: 5px 8px;
    border: 1px solid transparent; border-radius: 6px; cursor: pointer; }
.pb-pop-step input { margin: 0; accent-color: var(--primary-blue); }
.pb-pop-step b { font-size: 13px; }
.pb-pop-step.on { border-color: rgba(var(--primary-rgb), .55); background: rgba(var(--primary-rgb), .14); }
.pb-pop-step:hover:not(.on) { background: rgba(255, 255, 255, .04); }
.pb-pop-aux { font-size: 11px; color: var(--text-muted); }
.pb-pop-add { font-size: 11px; color: var(--primary-fg); }
.pb-pop-fin { font-size: 10.5px; padding: 0 6px; border: 1px solid rgba(var(--success-rgb), .45); border-radius: 8px; color: var(--success-fg); }
.pb-pop-skip { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 5px 8px; border-radius: 6px; cursor: pointer; }
.pb-pop-skip input { margin: 0; accent-color: var(--primary-blue); cursor: pointer; }
.pb-pop-skip:hover:not(.off) { background: rgba(255, 255, 255, .04); }
.pb-pop-skip.off, .pb-pop-skip.off input { color: var(--text-muted); cursor: not-allowed; }
.pb-pop-wait { margin-left: auto; padding: 0 6px; border: 1px solid rgba(var(--amber-rgb), .5); border-radius: 8px; color: var(--amber-fg); font-size: 10.5px; white-space: nowrap; }
.pb-pop-warn { display: flex; gap: 8px; margin-top: 8px; padding: 8px 10px; border: 1px solid rgba(var(--amber-rgb), .45); border-radius: 6px;
    background: rgba(var(--amber-rgb), .07); line-height: 1.5; }
.pb-pop-warn .pb-ico { width: 16px; height: 16px; color: var(--amber-fg); margin-top: 1px; }
.pb-pop-warn-t { color: #fde68a; }
.pb-pop-sum { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-color); line-height: 1.6; }
.pb-pop-sum b { font-size: 14px; }
.pb-pop-none { color: var(--amber-fg); }
.pb-pop-ctx { font-size: 11.5px; color: var(--text-muted); }
.pb-pop-err { margin-top: 8px; color: var(--danger-fg); line-height: 1.5; }
.pb-pop-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

.probe-box { max-width: 1040px; height: 88vh; display: flex; flex-direction: column; gap: 10px; }
.probe-box:focus { outline: none; }
.pbm-head { display: flex; align-items: flex-start; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border-color); }
.pbm-h-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pbm-h-main.pbm-h-row { flex-direction: row; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 30px; }
.pbm-h-line { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pbm-title { margin: 0; font-size: 18px; font-weight: 700; color: var(--text-main); }
.pbm-sub { font-size: 13px; color: var(--text-muted); }
.pbm-code { font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); }
.pbm-hname { font-size: 16px; font-weight: 700; color: var(--text-main); }
.pbm-h-sub { display: flex; gap: 22px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-main); }
.pbm-h-sub .mono { font-family: var(--font-mono); }
.pbm-lbl { font-size: 11.5px; color: var(--text-muted); }
.pbm-h-btns { display: flex; align-items: center; gap: 6px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.ui-btn-primary.pb-pop-warnbtn { border-color: #b45309; background: #b45309; }
.ui-btn-primary.pb-pop-warnbtn:hover:not(:disabled) { border-color: #92400e; background: #92400e; }
.pbm-days { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-muted); }
.pbm-days .ui-input { width: auto; }
.pbm-camp { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); min-height: 24px; }
.pbm-camp b { color: var(--text-main); }
.pbm-camp .probe-dot { margin-right: 0; }
.pbm-camp-note { color: var(--amber-fg); }
.pbm-camp-h { white-space: nowrap; }
.pbm-view { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.pbm-empty { padding: 24px 12px; text-align: center; color: var(--text-muted); font-size: 12.5px; line-height: 1.6; }
.pbm-dim { color: var(--text-muted); }
.pbm-now { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border: 1px solid rgba(var(--primary-rgb), .35);
    border-radius: 8px; background: rgba(var(--primary-rgb), .07); font-size: 12.5px; }
.pbm-now .pb-ico { width: 18px; height: 18px; color: var(--primary-fg); }
.pbm-now .mono { font-family: var(--font-mono); font-size: 14px; }
.pbm-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.pbm-tile { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-base); }
.pbm-tile b { font-size: 22px; font-weight: 700; line-height: 1.2; color: var(--text-main); }
.pbm-tile span { font-size: 11.5px; color: var(--text-muted); }
.pbm-tile.judge { border-color: rgba(var(--amber-rgb), .35); background: rgba(var(--amber-rgb), .06); }
.pbm-tile.judge b { color: var(--amber-fg); }
.pbm-tile.ai b { color: #fde68a; }
.pbm-wrap { flex: 1 1 auto; max-height: none; min-height: 0; }
.pbm-table { table-layout: fixed; }
.pbm-table th { box-sizing: border-box; position: sticky; top: 0; background: var(--bg-card); z-index: 1; }
.pbm-table td { overflow: hidden; text-overflow: ellipsis; }
.pbm-qtable col.c-st { width: 116px; }
.pbm-qtable col.c-hosp { width: auto; }
.pbm-qtable col.c-pfx { width: 112px; }
.pbm-qtable col.c-step { width: 48px; }
.pbm-qtable col.c-prog { width: 160px; }
.pbm-qtable col.c-wait { width: 150px; }
.pbm-qtable col.c-who { width: 130px; }
.pbm-table td.pbm-who2 { line-height: 1.3; }
.pbm-who2 > span { display: block; overflow: hidden; text-overflow: ellipsis; }
.pbm-who2 > span + span { font-size: 11px; }
.pbm-row { cursor: pointer; }
.pbm-row:hover td { background: rgba(255, 255, 255, .04); }
.pbm-row.here td { background: rgba(var(--primary-rgb), .06); }
.pbm-sec td { padding: 12px 10px 4px; font-size: 11.5px; font-weight: 700; color: var(--text-muted); letter-spacing: .05em; }
.pbm-link { padding: 0; border: 0; background: none; color: var(--text-main); font: inherit; cursor: pointer; text-align: left; }
.pbm-link:hover { text-decoration: underline; }
.pbm-prog { display: flex; align-items: center; gap: 8px; }
.pbm-prog-bar { flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.pbm-prog-fill { display: block; height: 6px; background: var(--primary-blue); }
.pbm-prog-fill.done { background: var(--success-green); }
.pbm-prog-n { font-size: 12px; white-space: nowrap; }
.pbm-legend { display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-end; font-size: 11px; color: var(--text-muted); }
.pbm-legend span { display: inline-flex; align-items: center; gap: 5px; }
.pbm-list { display: flex; flex-direction: column; gap: 8px; }
.pbm-item { position: relative; border: 1px solid var(--border-color); border-radius: 8px; background: #1b1c1f; }
.pbm-item.open { border-color: rgba(var(--primary-rgb), .4); }
.pbm-item-head { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; }
.pbm-toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 16px; padding: 4px; border: 0; border-radius: 6px;
    background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pbm-toggle:hover { background: rgba(255, 255, 255, .03); }
.pbm-chev { width: 16px; height: 16px; color: var(--text-muted); stroke-width: 2; transition: transform .15s; }
.pbm-toggle[aria-expanded="true"] .pbm-chev { transform: rotate(90deg); }
.pbm-prefix { flex: none; width: 100px; font-family: var(--font-mono); font-size: 15px; font-weight: 700; }
.pbm-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.pbm-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pbm-wait { font-size: 12px; }
.pbm-meta { font-size: 11.5px; color: var(--text-muted); }
.pbm-bar { display: block; width: 280px; max-width: 100%; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.pbm-bar > span { display: block; height: 5px; background: var(--primary-blue); }
.pbm-item-btns { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.pbm-item-body { border-top: 1px solid rgba(255, 255, 255, .08); padding: 10px 12px 12px; }
.pbm-item-body[hidden] { display: none; }
.pbm-note { font-size: 12px; color: var(--text-muted); padding: 2px 2px 8px; }
.pbm-item-body .probe-wrap { max-height: 520px; min-height: 0; }
.pbm-map { flex: none; display: grid; grid-template-columns: repeat(10, 6px); grid-auto-rows: 6px; gap: 1px; padding: 3px;
    border-radius: 4px; background: var(--bg-base); }
.pbm-map i, .pbm-legend i { display: block; border-radius: 1px; background: rgba(255, 255, 255, .08); }
.pbm-legend i { width: 8px; height: 8px; border-radius: 2px; }
.pbm-map i.c-H, .pbm-legend i.c-H { background: #6b7280; }
.pbm-map i.c-P, .pbm-legend i.c-P { background: #60a5fa; }
.pbm-map i.c-L, .pbm-legend i.c-L { background: transparent; box-shadow: inset 0 0 0 1px var(--primary-fg); }
.pbm-map i.c-M { background: #6b7280; box-shadow: inset 0 0 0 1px var(--primary-fg); }
.pbm-map i.c-K, .pbm-legend i.c-K { background: #bfdbfe; animation: pbBlink 1s ease-in-out infinite; }
.pbm-map i.c-J, .pbm-legend i.c-J { background: var(--amber-fg); }
@keyframes pbBlink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.pbm-htable col.c-when { width: 92px; }
.pbm-htable col.c-hosp { width: 180px; }
.pbm-htable col.c-pfx { width: 150px; }
.pbm-htable col.c-step { width: 48px; }
.pbm-htable col.c-st { width: 170px; }
.pbm-htable col.c-res { width: auto; }
.pbm-htable col.c-who { width: 96px; }
.pbm-htable col.c-last { width: 96px; }
.pbm-foot { font-size: 11.5px; color: var(--text-muted); }

.probe-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.probe-dot.on { background: var(--success-green); }
.probe-dot.off { background: transparent; box-shadow: inset 0 0 0 1.5px var(--text-muted); }
.probe-job-bar { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.probe-job-bar[hidden] { display: none; }
.probe-wrap { flex: 1 1 auto; max-height: none; min-height: 120px; }
.probe-table, .probe-qtable { table-layout: fixed; }
.probe-table th, .probe-qtable th { box-sizing: border-box; position: sticky; top: 0; background: var(--bg-card); z-index: 1; }
.probe-table td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.probe-table col.c-suf { width: 48px; }
.probe-table col.c-st { width: 72px; }
.probe-table col.c-mark { width: 160px; }
.probe-table col.c-how { width: 112px; }
.probe-table col.c-conf { width: 56px; }
.probe-table col.c-who { width: auto; }
.probe-table col.c-when { width: 124px; }
.probe-table col.c-play { width: 50px; }
.probe-table col.c-ops { width: 250px; }
.probe-table th, .probe-table td { padding: 5px 8px; }
.probe-table td { height: 30px; }
.probe-ops { display: flex; gap: 4px; align-items: center; }
.probe-ops .probe-edit { width: 96px; height: auto; padding: 3px 6px; font-size: 12px; }
.probe-row.pend { background: rgba(var(--amber-rgb), .06); }
.probe-st { font-size: 11px; padding: 1px 6px; border-radius: 8px; border: 1px solid var(--border-color); }
.probe-st.st-calling, .probe-st.st-analyzing { border-color: var(--primary-blue); color: var(--primary-fg); }
.probe-st.st-done { color: var(--text-muted); }
.probe-st.st-cancelled { opacity: .6; }
.probe-mark { font-weight: bold; }
.probe-mark.prov { font-weight: normal; font-style: italic; color: var(--amber-fg); }
.probe-dim { color: var(--text-muted); }
.probe-ok { color: var(--success-green); }
.probe-warn { color: #f87171; font-weight: bold; }
.probe-auto-tag { color: var(--primary-fg); }
.probe-st.st-judge { font: inherit; font-size: 11px; cursor: pointer; border-color: rgba(var(--amber-rgb), .8); color: var(--amber-fg);
    background: rgba(var(--amber-rgb), .1); }
.probe-st.st-judge:hover { background: rgba(var(--amber-rgb), .24); }
.probe-row.judging td { background: rgba(var(--amber-rgb), .12); }
.probe-row.judge, .probe-row.hrow { cursor: pointer; }
.probe-row.judge:hover td, .probe-row.hrow:hover td { background: rgba(var(--amber-rgb), .1); }
.probe-table td.probe-pv { color: var(--text-main); }
.probe-table td.probe-judge-cell { white-space: normal; overflow: visible; height: auto; padding: 8px 10px 12px;
    background: rgba(var(--amber-rgb), .05); }
.probe-judge { display: flex; flex-direction: column; gap: 8px; }
.probe-judge-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.probe-judge-head b { color: var(--amber-fg); }
.probe-judge-head .probe-judge-close { margin-left: auto; }
.probe-tx { max-height: 240px; overflow-y: auto; border: 1px solid var(--border-color); border-radius: 6px; padding: 4px 0;
    background: rgba(0, 0, 0, .18); }
.probe-tx-msg { padding: 8px 10px; font-size: 12px; color: var(--text-muted); }
.probe-tx-err { color: var(--danger-fg); }
.probe-tx-lines { list-style: none; margin: 0; padding: 0; }
.probe-tx-lines li { display: grid; grid-template-columns: 40px 42px 78px minmax(0, 1fr); gap: 6px; padding: 3px 10px;
    font-size: 12.5px; line-height: 1.5; }
.probe-tx-lines .tx-t, .probe-tx-lines .tx-part { color: var(--text-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.probe-tx-lines .tx-who { font-size: 11px; font-weight: bold; }
.probe-tx-lines .tx-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.probe-tx-lines li.tx-remote .tx-who { color: var(--amber-fg); }
.probe-tx-lines li.tx-remote .tx-text { color: var(--text-main); }
.probe-tx-lines li.tx-relay .tx-who, .probe-tx-lines li.tx-relay .tx-text { color: var(--text-muted); }
.probe-tx-lines li.tx-answered { display: block; padding: 2px 10px; font-size: 11px; color: var(--primary-fg); }
.probe-tx-lines li.tx-answered span { display: block; border-top: 1px dashed rgba(147, 197, 253, .5); padding-top: 1px; }
.probe-judge-marks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.probe-judge-lbl { font-size: 12px; color: var(--text-muted); margin-right: 2px; }
.probe-mk { min-width: 44px; }
.probe-mk small { color: var(--text-muted); margin-left: 2px; }
.probe-dept { display: inline-flex; gap: 4px; align-items: center; }
.probe-dept-in { width: 150px; height: auto; padding: 3px 6px; font-size: 12px; }
.probe-judge-note { font-size: 11px; color: var(--text-muted); }
.data-cell.pb-calling, .data-cell.pb-analyzing { animation: pbPulse 1.2s ease-in-out infinite; }
.data-cell.pb-analyzing { animation-duration: 2.4s; }
@keyframes pbPulse { 0%, 100% { background-color: transparent; } 50% { background-color: rgba(var(--primary-rgb), .28); } }
.data-cell.pb-prov .phone-input::placeholder { color: var(--amber-fg); opacity: .6; font-style: italic; }
.data-cell.pb-auto { position: relative; }
.data-cell.pb-auto::after { content: ''; position: absolute; top: 2px; right: 2px; width: 5px; height: 5px; border-radius: 50%;
    background: var(--primary-fg); pointer-events: none; }
.data-cell.pb-planned { outline: 1px dashed rgba(147, 197, 253, .7); outline-offset: -4px; }
.data-cell.pb-judge { outline: 1px dashed rgba(var(--amber-rgb), .85); outline-offset: -4px; }
.data-cell.pb-judge .phone-input::placeholder { color: var(--amber-fg); opacity: .85; font-style: italic; font-size: 11px; }
.data-cell.pb-preview { outline: 1px dashed rgba(147, 197, 253, .9); outline-offset: -4px; background: rgba(var(--primary-rgb), .08); }
@media (prefers-reduced-motion: reduce) {
    .data-cell.pb-calling, .data-cell.pb-analyzing { animation: none; background-color: rgba(var(--primary-rgb), .2); }
    .pb-ico .pb-sweep, .pbm-map i.c-K, .pbm-legend i.c-K { animation: none; }
}

.hp-page { display: flex; flex-direction: column; height: 100vh; container-type: inline-size; }
.hp-page .ui-page-head { align-items: center; }
.hp-body { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--space-4); }
.hp-prefs { overflow: auto; padding: var(--space-2); }
.hp-region + .hp-region { margin-top: var(--space-2); }
.hp-region-h { font-size: var(--fs-xs); color: var(--text-muted); padding: var(--space-1) var(--space-2); }
.hp-pref {
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); width: 100%;
    padding: 5px var(--space-2); border: 0; border-radius: var(--radius-sm); background: none; color: var(--text-main);
    font: inherit; font-size: var(--fs-sm); text-align: left; cursor: pointer;
}
.hp-pref:hover { background: var(--row-hover); }
.hp-pref.none { color: var(--text-muted); }
.hp-pref.on { background: var(--primary-strong); color: #fff; }
.hp-pref-n { font-family: var(--font-mono); font-size: var(--fs-xs); opacity: .85; }
.hp-main { display: flex; flex-direction: column; min-height: 0; }
.hp-pref-title { margin: 0; font-size: var(--fs-lg); font-weight: 600; color: var(--text-main); }
.hp-search { width: auto; min-width: 200px; flex: 0 1 260px; }
.hp-table-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; border-top: 1px solid var(--border-color); }
.hp-table { table-layout: fixed; }
.hp-table th { box-sizing: border-box; position: sticky; top: 0; z-index: 1; background: var(--bg-card); }
.hp-table .col-code { width: 84px; }
.hp-table .col-tel { width: 132px; }
.hp-table .col-station { width: 120px; }
.hp-table .col-num { width: 84px; }
.hp-table .col-state { width: 128px; }
.hp-table .col-act { width: 252px; }
.hp-table td.hp-name, .hp-table td.hp-addr, .hp-table td.hp-station { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-table td.hp-num { color: var(--text-muted); }
.hp-table td.hp-act { text-align: right; white-space: nowrap; }
.hp-table td.hp-act .ui-btn + .ui-btn { margin-left: 4px; }
.hp-table tr.hp-hidden td { opacity: .6; }
.hp-del-who { margin: 0 0 var(--space-3); font-weight: 600; color: var(--text-main); }
.hp-del-counts { list-style: none; margin: 0 0 var(--space-3); padding: 0; }
.hp-del-counts li { display: flex; justify-content: space-between; gap: var(--space-3); padding: 3px 0; border-bottom: 1px solid var(--border-color); font-size: var(--fs-sm); }
.hp-del-counts b { font-family: var(--font-mono); }
@container (max-width: 780px) { .hp-body { grid-template-columns: minmax(0, 1fr); } }

.top-page {
    min-height: 100%;
    padding: 24px 28px;
    container-type: inline-size;
}
.top-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: minmax(240px, auto);
    gap: 18px;
    height: calc(100vh - 48px);
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
}
.top-cell {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 22px 24px;
    min-width: 0;
    min-height: 0;
    overflow: auto;
    box-sizing: border-box;
    color: var(--text-main);
}
.top-greeting { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-me-saved { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.top-me-split { display: grid; grid-template-columns: 5.5fr 4.5fr; gap: 14px; flex: 1 1 auto; min-height: 0; }
.top-me-memo, .top-me-todo { display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 0; }
.me-memo { flex: 1 1 auto; min-height: 0; width: 100%; resize: none; box-sizing: border-box; font: inherit; font-size: 12.5px; line-height: 1.6;
    padding: 8px 10px; color: var(--text-main); background: rgba(255, 255, 255, .03); border: 1px solid var(--border-color); border-radius: 8px; }
.me-memo:focus { outline: none; border-color: var(--primary-blue); }
.top-me-memo .top-sub, .top-me-todo-head { height: 26px; box-sizing: border-box; display: flex; align-items: flex-end; }
.top-me-todo-head { justify-content: space-between; gap: 8px; }
.top-me-todo-head .ui-tab { height: auto; padding: 0 6px; font-size: 10px; line-height: 16px; white-space: nowrap; }
.top-me-todo-head .ui-tabs { flex: none; margin-bottom: 2px; }
.top-me-todo-head .ui-tab b { font-family: var(--font-mono); font-weight: normal; margin-left: 3px; }
.me-todo-add { display: flex; gap: 6px; align-items: center; }
.me-todo-add[hidden] { display: none; }
.me-todo-input { flex: 1 1 auto; min-width: 0; }
.me-todo-tools { display: inline-flex; gap: 2px; align-items: center; flex: none; }
.me-ico { font: inherit; width: 24px; height: 24px; padding: 0; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--text-muted); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; font-size: 13px; line-height: 1; }
.me-ico svg { width: 15px; height: 15px; }
.me-ico:hover { border-color: var(--border-color); color: var(--text-main); background: var(--bg-card-hover); }
.me-ico.on { color: var(--amber-fg); }
.me-ico-del:hover { color: var(--danger-text); }
.me-todo-pending { font-size: 11px; color: var(--text-muted); }
.me-todo-list { list-style: none; margin: 0; padding: 0; flex: 1 1 auto; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.me-todo { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 6px; padding: 5px 6px; border-radius: 6px; border: 1px solid transparent; font-size: 12.5px; }
.me-todo:hover { background: rgba(255, 255, 255, .03); border-color: var(--border-color); }
.me-todo.me-starred { border-left: 3px solid var(--amber-fg); padding-left: 5px; }
.me-todo.me-done { opacity: .5; }
.me-todo.me-done .me-todo-body { text-decoration: line-through; }
.me-todo-main { display: flex; align-items: center; gap: 8px; min-width: 0; cursor: pointer; }
.me-todo-chk { margin: 0; flex: none; }
.me-todo-body { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-main); }
.me-todo .me-todo-tools { opacity: .55; }
.me-todo:hover .me-todo-tools, .me-todo .me-ico.on { opacity: 1; }
.me-todo-chips { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; padding-left: 24px; }
.me-chip { font: inherit; font-size: 10.5px; padding: 1px 7px; border-radius: 4px; border: 1px solid var(--border-color); color: var(--text-muted); background: transparent; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.me-chip-hosp { cursor: pointer; }
.me-chip-hosp:hover { border-color: var(--primary-blue); color: var(--text-main); }
.me-chip-due { font-family: var(--font-mono); }
.me-chip-due.me-due-today { color: var(--amber-fg); border-color: rgba(var(--warning-rgb), .6); }
.me-chip-due.me-due-over { color: #f87171; border-color: rgba(220, 38, 38, .6); }
.me-todo-empty { font-size: 12px; color: var(--text-muted); text-align: center; padding: 14px 0; }
.me-modal-target { margin: 0 0 var(--space-3); font-size: var(--fs-md); font-weight: 600; color: var(--text-main); word-break: break-word; }
.me-quick { display: flex; gap: 6px; margin-top: 10px; }
.top-me-todo { container-type: inline-size; }
@container (max-width: 260px) {
    .me-todo { grid-template-columns: 1fr; }
    .me-todo .me-todo-tools { grid-row: 2; justify-self: end; opacity: 1; }
    .me-todo-chips { grid-row: 3; padding-left: 0; }
    .me-todo-add { flex-wrap: wrap; justify-content: flex-end; }
    .me-todo-add .me-todo-input { flex-basis: 100%; }
}
.top-gadget { display: flex; flex-direction: column; gap: 16px; text-decoration: none; }
.top-gadget-head { display: flex; align-items: center; gap: 10px; }
.top-gadget-head .menu-icon { color: var(--primary-blue); }
.top-gadget-title { margin: 0; font-size: var(--fs-lg); font-weight: 600; flex: 1; min-width: 0; }
.top-gadget-body { display: flex; gap: 14px; flex-wrap: wrap; }
.top-stat { flex: 1 1 96px; box-sizing: border-box; background: rgba(255, 255, 255, .03); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.top-stat-n { font-family: var(--font-mono); font-size: 22px; font-weight: 700; color: var(--text-main); line-height: 1; }
.top-stat-l { font-size: 11px; color: var(--text-muted); }
.top-gadget-note { margin: auto 0 0; font-size: 11.5px; color: var(--text-muted); line-height: 1.6; }
@container (max-width: 780px) {
    .top-grid { grid-template-columns: 1fr; grid-template-rows: none; height: auto; }
    .top-cell { min-height: 200px; }
    .top-gadget-tall { max-height: 420px; }
}
.top-split { display: block; padding: 0; background: none; border: 0; overflow: visible; container-type: inline-size; }
.top-split-inner { display: grid; grid-template-columns: 3fr 2fr; gap: 14px; height: 100%; min-height: 0; }
.top-gadget-tall { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; padding: 18px 18px 14px; min-width: 0; min-height: 0; overflow: hidden; gap: 10px; }
@container (max-width: 640px) {
    .top-split-inner { grid-template-columns: 1fr; grid-template-rows: minmax(0, 3fr) minmax(0, 2fr); }
}
.top-stat-line { margin: 0; font-size: 12px; color: var(--text-muted); }
.top-stat-line b { color: var(--text-main); font-family: var(--font-mono); font-size: 14px; }

.top-sub { font-size: 11px; color: var(--text-muted); border-bottom: 1px solid var(--border-color); padding-bottom: 4px; margin-top: 4px; }
.top-mini-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; }
.top-mini { table-layout: fixed; }
.top-mini th, .top-mini td { padding: 0 6px 0 0; }
.top-mini th { box-sizing: border-box; }
.top-mini-di .col-date { width: 74px; }
.top-mini-di .col-num { width: 92px; }
.top-mini-di .col-act { width: 48px; }
.top-mini-au .col-user { width: 70px; }
.top-mini .fit { display: block; white-space: nowrap; overflow: hidden; min-width: 0; }
.top-gadget-count { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.top-gadget-count b { font-family: var(--font-mono); font-size: 18px; color: var(--text-main); }
.top-mini td.top-mini-date, .top-mini td.top-mini-pref, .top-mini td.top-mini-act { white-space: nowrap; }
.top-mini td.top-mini-date { color: var(--text-muted); font-family: var(--font-mono); font-size: 11px; }
.top-mini td.top-mini-name { font-size: 10.5px; }
.top-mini td.top-mini-num { font-family: var(--font-mono); white-space: nowrap; font-size: 10.5px; }
.top-mini td.top-mini-act { text-align: right; padding-right: 0; }
.top-mini td.top-mini-empty { color: var(--text-muted); text-align: center; padding: 14px 0; white-space: normal; }
.top-mini td.top-mini-user { font-size: 10.5px; }
.top-mini td.top-mini-hosps { font-size: 10.5px; }

.top-mini-none { color: var(--text-muted); }
.top-aim-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.top-stat-sub { font-size: 10.5px; color: var(--text-muted); }
.top-mini-aim .col-rank { width: 34px; }
.top-mini-aim .col-doc { width: 34px; }
.top-mini-aim .col-di { width: 34px; }
.top-mini-aim .col-tel { width: 58px; }
.top-mini-aim .col-act { width: 48px; }
.top-mini td.top-mini-rank { color: var(--text-muted); font-family: var(--font-mono); font-size: 11px; }
.top-mini td.top-mini-doc { font-family: var(--font-mono); }
.top-mini td.top-mini-di, .top-mini td.top-mini-tel { font-size: 10.5px; white-space: nowrap; font-family: var(--font-mono); }

.di-box { max-width: 960px; }
.di-body { display: flex; flex-direction: column; }
.di-body > * { flex: none; }
.di-title-count { font-size: 12px; font-weight: normal; color: var(--text-muted); margin-left: 8px; }
.di-toolbar { margin-bottom: 12px; }
.di-toolbar .ui-input { width: auto; }
.di-select { min-width: 170px; }
.di-search { min-width: 220px; flex: 1 1 220px; }
.di-add { border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 12px 14px; margin-bottom: 12px; background: rgba(255, 255, 255, .02); }
.di-add-grid { display: grid; grid-template-columns: 1fr 1.6fr 1fr auto; gap: 10px 14px; align-items: end; }
.di-add-vis { justify-content: flex-end; padding-bottom: 8px; }
.di-add-actions { margin-top: 12px; }
.di-body > .di-table-wrap { flex: 1 1 auto; min-height: 120px; max-height: none; }
.di-table td.di-num { font-family: var(--font-mono); }
.di-table td.di-pref { color: var(--text-muted); font-size: 12px; }
.di-table .di-th-vis, .di-table td.di-vis-cell { text-align: center; }
.di-table td.di-ops { text-align: right; }
.di-table td.di-ops .ui-btn + .ui-btn { margin-left: 6px; }
.di-row-hidden td.di-num { color: var(--text-muted); }
.di-row-hidden td.di-vis-cell { color: var(--amber-fg); }
.di-row-editing td { background: rgba(var(--primary-rgb), .08); }
.di-edit-input { width: 190px; }
.di-confirm { font-size: 12px; color: var(--amber-fg); margin-right: 6px; }
.di-badge { margin-left: 6px; vertical-align: middle; }
.di-viewers-btn { margin-left: 8px; padding: 1px 8px; font: inherit; font-size: 11.5px; line-height: 18px; border-radius: 10px;
                  border: 1px solid var(--warning-orange); background: transparent; color: var(--amber-fg); cursor: pointer; white-space: nowrap; }
.di-viewers-btn:hover, .di-viewers-btn.open { background: rgba(var(--warning-rgb), .16); }
.di-row-open td { background: rgba(var(--warning-rgb), .06); border-bottom-color: transparent; }
.di-viewers-row td { background: rgba(var(--warning-rgb), .06); white-space: normal; padding: 4px 14px 12px; }
.di-viewers-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 12px; margin-bottom: 8px; }
.di-viewers-note { color: var(--text-muted); font-size: 11.5px; }
.di-viewers-head .ui-btn { margin-left: auto; }
.di-viewers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px 14px; }
.di-viewer { min-width: 0; }
.di-viewer-name { overflow: hidden; text-overflow: ellipsis; }
.di-viewer-extra .di-viewer-name { color: var(--text-muted); font-style: italic; }
.di-viewers-none { color: var(--text-muted); font-size: 12px; }
@media (max-width: 900px) {
    .di-add-grid { grid-template-columns: 1fr 1fr; }
}
.tb-di-vis { margin-left: 4px; }
.fld-v.tb-ro { cursor: default; }

.seat-band { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px;
             background: rgba(0, 0, 0, .18); border: 1px solid var(--border-color); border-radius: 8px; }
.seat-band-day { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.seat-band-day b { font-size: 16px; white-space: nowrap; }
.seat-band-count { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 0; }
.seat-band-main { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.seat-band-main b { font-family: var(--font-mono); font-size: 20px; color: var(--text-main); }
.seat-band-sub { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.seat-band-sub b { font-family: var(--font-mono); color: var(--text-main); }
.seat-band-sub .seat-warn, .seat-band-sub .seat-warn b { color: var(--amber-fg); }
.top-mini-seat .col-time { width: 92px; }
.top-mini-seat .col-in { width: 46px; }
.seat-who-in { display: flex; align-items: center; gap: 7px; min-width: 0; }
.seat-who-in .fit { flex: 1 1 auto; text-overflow: ellipsis; }
.seat-empty-note { display: block; margin-top: 4px; font-size: 11px; }
.seat-dot { flex: none; display: inline-block; width: 8px; height: 8px; box-sizing: border-box; border-radius: 50%; }
.seat-dot.on { background: var(--success-green); }
.seat-dot.late { border: 2px solid var(--amber-fg); }
.seat-dot.wait { border: 1.5px solid #8b929c; }
.seat-dot.none { border: 1.5px solid #8b929c; opacity: .55; }
.seat-dot.out { background: #8b929c; }
.seat-dot.kari { border: 1.5px dashed var(--amber-fg); }
.seat-in-login { font-size: 10px; color: var(--text-muted); border: 1px solid rgba(255, 255, 255, .2); border-radius: 4px; padding: 0 4px; white-space: nowrap; }
.seat-in-none { color: var(--text-muted); }
.seat-legend { flex: none; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 10.5px; color: var(--text-muted); }
.seat-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.seat-gadget { container: seatg / inline-size; }
.seat-gbody { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.seat-gbody > .top-mini-wrap { min-height: 0; }
.top-mini-seat .col-seat { width: 54px; }
.seat-undef { font-family: inherit; font-size: 10px; color: var(--amber-fg); border: 1px solid rgba(var(--amber-rgb), .5); border-radius: 4px; padding: 0 5px; white-space: nowrap; }
.seat-mini { display: none; min-height: 0; box-sizing: border-box; padding: 4px; overflow: hidden; align-items: center; justify-content: center;
             border: 1.5px solid rgba(255, 255, 255, .16); border-radius: 6px; background: rgba(0, 0, 0, .18); }
.seat-mini-in { position: relative; flex: none; }
.seat-ms { position: absolute; box-sizing: border-box; display: flex; align-items: center; justify-content: center; gap: 2px; border-radius: 3px;
           font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; color: var(--text-muted); white-space: nowrap; overflow: hidden; }
.seat-ms b { font-size: 8.5px; color: var(--amber-fg); }
.seat-ms.empty { border: 1px dashed rgba(255, 255, 255, .24); }
.seat-ms.plan { background: rgba(var(--primary-rgb), .06); border: 1px dashed rgba(var(--primary-rgb), .65); color: var(--text-main); }
.seat-ms.now { background: rgba(var(--primary-rgb), .38); border: 1px solid rgba(var(--primary-rgb), .75); color: #dbeafe; }
.seat-ms.off { border: 1px solid rgba(255, 255, 255, .08); background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .08) 0 4px, transparent 4px 8px); }
.seat-ms.fixed, .seat-ms.vacant, .seat-ms.fixedoff { background: #2b2d33; border: 1px solid rgba(255, 255, 255, .24); color: #cbd5e1; }
.seat-ms.vacant { border-style: dashed; }
.seat-ms.fixedoff { color: var(--text-muted); opacity: .6; }
.seat-ms.kfixed { font-family: inherit; font-weight: 400; }
.seat-legend .seat-legend-wide { display: none; }
@container seatg (min-width: 640px) {
    .seat-gbody { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .seat-mini { display: flex; }
    .seat-legend .seat-legend-wide { display: inline-flex; }
}
.seat-legend-key { display: inline-block; width: 14px; height: 9px; box-sizing: border-box; border-radius: 2px; }
.seat-legend-key.now { background: rgba(var(--primary-rgb), .38); border: 1px solid rgba(var(--primary-rgb), .75); }
.seat-legend-key.plan { background: rgba(var(--primary-rgb), .06); border: 1px dashed rgba(var(--primary-rgb), .65); }
.seat-legend-key.empty { border: 1px dashed rgba(255, 255, 255, .3); }
.seat-box { max-width: 1324px; width: calc(96% + 44px); height: calc(92vh + 30px); max-height: calc(92vh + 30px); }
.seat-box > .ui-box-head { padding: 16px 22px 10px; }
.seat-body { display: flex; flex-direction: column; overflow: hidden; padding: 10px 22px; container-type: inline-size; }
.seat-box > .ui-box-foot { padding: 10px 22px 14px; }
.seat-spacer { flex: 1 1 auto; }
.seat-ib { width: 30px; height: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.seat-pane { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.seat-toolbar { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; }
.seat-tool { display: inline-flex; align-items: center; gap: 6px; }
.seat-range { min-width: 236px; text-align: center; font-size: 15px; font-weight: 700; white-space: nowrap; }
.seat-sep { width: 1px; height: 20px; background: var(--border-strong); }
.seat-chip { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.seat-chip b { font-family: var(--font-mono); font-size: 14px; color: var(--text-main); }
.seat-confirm { font-size: 12px; color: var(--amber-fg); }
.seat-hint { flex: none; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.seat-hint svg { flex: none; }
.seat-muted { color: var(--text-muted); font-size: 12px; }
.seat-week-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; border: 1px solid var(--border-color); border-radius: 8px; background: rgba(0, 0, 0, .15); }
.seat-wrow { display: grid; grid-template-columns: 210px repeat(7, minmax(0, 1fr)) 64px; gap: 4px; align-items: center;
             padding: 2px 10px; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.seat-whead { position: sticky; top: 0; z-index: 2; padding: 7px 10px; background: var(--bg-card); border-bottom: 1px solid var(--border-color); font-size: 12px; }
.seat-wfoot { position: sticky; bottom: 0; z-index: 2; background: var(--bg-card); border-top: 1px solid var(--border-color); padding: 4px 0; }
.seat-wfoot .seat-wrow { border-bottom: 0; font-size: 12px; }
.seat-wname { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.seat-wname b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat-wname span { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-muted); white-space: nowrap; }
.seat-wday { display: flex; align-items: center; justify-content: center; gap: 2px; white-space: nowrap; }
.seat-wday b { font-family: var(--font-mono); font-size: 13px; }
.seat-wday.sat { color: var(--primary-fg); }
.seat-wday.sun { color: var(--danger-fg); }
.seat-todaymark { margin-left: 4px; font-size: 10px; color: var(--accent-text); background: var(--primary-blue); border-radius: 8px; padding: 0 6px; }
.seat-wright { text-align: right; }
.seat-cell { height: 24px; box-sizing: border-box; padding: 0; border-radius: 5px; border: 1px solid rgba(255, 255, 255, .07);
             background: transparent; color: #6b7280; font-family: var(--font-mono); font-size: 11px; cursor: pointer;
             white-space: nowrap; overflow: hidden; }
.seat-cell:hover:not(:disabled) { border-color: rgba(var(--primary-rgb), .7); }
.seat-cell.today { background: rgba(147, 197, 253, .05); }
.seat-cell.on { background: rgba(var(--primary-rgb), .18); border-color: rgba(var(--primary-rgb), .5); color: #dbeafe; }
.seat-cell.sel { box-shadow: 0 0 0 2px var(--primary-fg); }
.seat-cell:disabled { cursor: default; opacity: .55; }
.seat-wtotal { text-align: right; font-family: var(--font-mono); font-size: 12px; }
.seat-wnum { text-align: center; font-family: var(--font-mono); font-size: 13px; font-weight: 700; }
.seat-wpeak { text-align: center; font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.seat-wpeak.over { color: var(--amber-fg); }
.seat-editor { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; min-height: 48px; box-sizing: border-box;
               padding: 8px 12px; border: 1px solid rgba(147, 197, 253, .35); border-radius: 8px; background: rgba(var(--primary-rgb), .06); font-size: 12.5px; }
.seat-time { width: auto; height: auto; padding: 4px 8px; font-family: var(--font-mono); color-scheme: dark; }
.seat-btn-off { border-color: rgba(var(--danger-rgb), .5); background: rgba(var(--danger-rgb), .12); color: var(--danger-fg); }
.seat-btn-off:hover:not(:disabled) { background: rgba(var(--danger-rgb), .22); }
.seat-wrow.kari { box-shadow: inset 3px 0 0 rgba(var(--amber-rgb), .55); }
.seat-kari-nm { min-width: 0; padding: 0; border: 0; background: none; color: var(--amber-fg); font: inherit; cursor: pointer; text-align: left;
                text-decoration: underline dashed rgba(var(--amber-rgb), .6); text-underline-offset: 3px; }
.seat-kari-nm b { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat-kari-nm:hover b, .seat-kari-nm.on b { color: var(--text-main); }
.seat-kari-nm:focus-visible { outline: 2px solid var(--primary-fg); outline-offset: 2px; border-radius: 3px; }
.seat-chip-kari, .seat-chip-kari b { color: var(--amber-fg); }
.seat-kari-ed { border-color: rgba(var(--amber-rgb), .45); background: rgba(var(--amber-rgb), .06); }
.seat-kari-in { width: 180px; height: auto; padding: 4px 8px; }
.seat-kari-to { width: auto; max-width: 220px; height: auto; padding: 4px 8px; }
.seat-kari-note { flex-basis: 100%; font-size: 11.5px; }
.seat-msg { min-width: 0; font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat-msg.ok { color: var(--success-fg); }
.seat-pane[hidden] { display: none; }
.seat-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.seat-chip.warn, .seat-chip.warn b { color: var(--amber-fg); }
.seat-range-day { min-width: 160px; display: inline-flex; align-items: center; justify-content: center; }
.ui-btn.seat-on { background: var(--primary-blue); border-color: var(--primary-blue); color: #fff; }
.seat-day { flex: 1 1 auto; min-height: 0; display: flex; gap: 16px; }
.seat-mapcol { flex: 1 1 auto; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 10px 14px;
               background-color: #17181b; background-image: radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1.2px); background-size: 16px 16px;
               border: 1px solid rgba(255, 255, 255, .08); border-radius: 10px; }
.seat-atbar { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; font-size: 12px; }
.seat-at { width: 200px; accent-color: var(--primary-blue); }
.seat-at-text { min-width: 40px; font-family: var(--font-mono); font-size: 13px; }
.seat-mapwrap { position: relative; flex: 1 1 auto; min-height: 0; overflow: auto; box-sizing: border-box; padding: 14px 16px 12px;
                border: 2px solid rgba(255, 255, 255, .14); border-radius: 6px; }
.seat-map { position: relative; margin: 0 auto; }
.seat-isl { position: absolute; box-sizing: border-box; border-radius: 9px; background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .07); }
.seat-ilbl { position: absolute; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.seat-ilbl span { font-weight: 400; color: var(--text-muted); margin-left: 6px; }
.seat-markitem { position: absolute; box-sizing: border-box; display: flex; align-items: center; justify-content: center; font-size: 10.5px;
                 color: var(--text-muted); border: 1px solid rgba(255, 255, 255, .1); border-radius: 4px; }
.seat-seat { position: absolute; box-sizing: border-box; display: flex; flex-direction: column; gap: 2px; padding: 5px 7px 6px; margin: 0;
             font: inherit; text-align: left; color: var(--text-main); background: #25272c; border: 1px solid rgba(255, 255, 255, .12);
             border-radius: 8px; cursor: pointer; overflow: hidden; }
.seat-seat:hover { border-color: rgba(147, 197, 253, .6); }
.seat-seat:focus-visible { outline: 2px solid var(--primary-fg); outline-offset: 2px; }
.seat-seat.empty { background: rgba(0, 0, 0, .15); border-style: dashed; border-color: rgba(255, 255, 255, .22); }
.seat-seat.fixed { background: #2b2d33; border-color: rgba(255, 255, 255, .24); padding-top: 3px; padding-bottom: 3px; }
.seat-seat.narrow .seat-who .seat-tm { display: none; }
.seat-seat.off { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .05) 0 6px, transparent 6px 12px); border-color: rgba(255, 255, 255, .08); }
.seat-seat.fits { background: rgba(var(--primary-rgb), .12); border: 1px dashed var(--primary-blue); }
.seat-seat.self { background: rgba(var(--primary-rgb), .22); border: 1px solid var(--primary-blue); }
.seat-seat.clash { opacity: .38; cursor: not-allowed; }
.seat-seat.open { border-color: var(--primary-fg); box-shadow: 0 0 0 1px var(--primary-fg); }
.seat-sh { display: flex; align-items: center; gap: 6px; min-height: 13px; }
.seat-sl { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-muted); white-space: nowrap; }
.seat-tag { font-size: 10px; white-space: nowrap; }
.seat-tag.fix { color: #cbd5e1; border: 1px solid rgba(255, 255, 255, .25); border-radius: 4px; padding: 0 5px; }
.seat-tag.fit { color: var(--primary-fg); font-weight: 700; }
.seat-tag.muted { color: var(--text-muted); }
.seat-who { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; line-height: 14px; }
.seat-who.dim { opacity: .35; }
.seat-nm { flex: 1 1 auto; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat-tm { flex: none; font-family: var(--font-mono); font-size: 10.5px; white-space: nowrap; }
.seat-tm.c0 { color: #93c5fd; }
.seat-tm.c1 { color: #fcd34d; }
.seat-tm.c2 { color: #6ee7b7; }
.seat-tm.muted { color: var(--text-muted); }
.seat-more { flex: none; font-size: 10px; color: var(--amber-fg); }
.seat-free { display: block; font-size: 10.5px; line-height: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat-bar { position: relative; display: block; flex: none; height: 4px; margin-top: auto; border-radius: 2px; background: rgba(255, 255, 255, .09); overflow: hidden; }
.seat-seg { position: absolute; top: 0; bottom: 0; border-radius: 2px; }
.seat-seg.c0 { background: #60a5fa; }
.seat-seg.c1 { background: #f59e0b; }
.seat-seg.c2 { background: #34d399; }
.seat-mk { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #f8fafc; }
.seat-maplegend { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; font-size: 11px; color: var(--text-muted); }
.seat-maplegend > span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.seat-legend-bar { display: inline-flex; width: 40px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .09); overflow: hidden; }
.seat-legend-bar i { height: 100%; }
.seat-legend-bar .seg0 { width: 48%; background: #60a5fa; }
.seat-legend-bar .seg1 { width: 52%; background: #f59e0b; }
.seat-pop { position: absolute; z-index: 5; box-sizing: border-box; display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow: auto;
            padding: 10px 12px 12px; font-size: 12px; background: var(--bg-card-hover); border: 1px solid rgba(255, 255, 255, .2); border-radius: 10px;
            box-shadow: 0 12px 28px rgba(0, 0, 0, .55); }
.seat-ph { display: flex; align-items: center; gap: 8px; }
.seat-px { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 4px;
           background: transparent; color: var(--text-muted); cursor: pointer; }
.seat-px:hover { background: var(--bg-card); color: var(--text-main); }
.seat-ptitle { font-size: 13px; }
.seat-po { display: flex; flex-direction: column; gap: 5px; padding: 8px; border-radius: 8px; background: var(--bg-card); border: 1px solid rgba(255, 255, 255, .08); }
.seat-pr { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.seat-pst { font-size: 11px; color: var(--text-muted); line-height: 1.5; }
.seat-pb { display: flex; gap: 6px; }
.seat-psub { font-size: 11.5px; color: var(--text-muted); }
.seat-psearch { height: auto; padding: 5px 9px; font-size: 12px; }
.seat-plist { display: flex; flex-direction: column; gap: 4px; max-height: 200px; overflow: auto; }
.seat-pch { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; box-sizing: border-box; padding: 0 10px; margin: 0; font: inherit;
            font-size: 12.5px; text-align: left; color: var(--text-main); background: var(--bg-card); border: 1px solid rgba(255, 255, 255, .14);
            border-radius: 6px; cursor: pointer; }
.seat-pch:hover:not(:disabled) { background: #25272c; border-color: rgba(147, 197, 253, .5); }
.seat-pch:disabled { opacity: .5; cursor: default; }
.seat-pch .seat-nm { font-weight: 400; }
.seat-allset { font-size: 12px; color: var(--success-fg); }
.seat-side { width: 300px; flex: none; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.seat-side-head { flex: none; display: flex; align-items: baseline; gap: 8px; font-size: 14px; }
.seat-search { flex: none; position: relative; display: flex; align-items: center; }
.seat-search svg { position: absolute; left: 9px; color: var(--text-muted); pointer-events: none; }
.seat-search .ui-input { padding-left: 30px; }
.seat-hint2 { flex: none; display: flex; gap: 8px; padding: 8px 10px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .08);
              font-size: 12px; line-height: 1.6; color: var(--text-muted); }
.seat-hint2 svg { flex: none; margin-top: 2px; }
.seat-hint2.on { background: rgba(var(--primary-rgb), .12); border-color: rgba(var(--primary-rgb), .45); color: #dbeafe; }
.seat-hint2.seat-half-only { display: none; }
.seat-side-lists { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
.seat-side-title { flex: none; font-size: 12px; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.seat-side-title b { font-family: var(--font-mono); font-size: 14px; color: var(--text-main); }
.seat-side-title.warn, .seat-side-title.warn b { color: var(--amber-fg); }
.seat-cards { flex: none; display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow: auto; }
.seat-pc { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; box-sizing: border-box; padding: 6px 10px; margin: 0; font: inherit;
           text-align: left; color: var(--text-main); background: #25272c; border: 1px solid rgba(255, 255, 255, .12); border-radius: 8px; cursor: pointer; }
.seat-pc:hover:not(:disabled) { border-color: rgba(147, 197, 253, .5); }
.seat-pc.on { background: rgba(var(--primary-rgb), .22); border-color: var(--primary-blue); }
.seat-pc:disabled { cursor: default; }
.seat-pc .seat-nm { font-size: 13px; }
.seat-pc.compact { width: auto; min-height: 30px; padding: 3px 9px; }
.seat-pc.compact .seat-nm { flex: none; font-size: 12px; }
.seat-rows { flex: 1 1 auto; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 4px; }
.seat-prow { flex: none; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; box-sizing: border-box; padding: 4px 8px; margin: 0;
             font: inherit; font-size: 12.5px; text-align: left; color: var(--text-main); background: transparent; border: 1px solid rgba(255, 255, 255, .08);
             border-radius: 6px; cursor: pointer; }
.seat-prow:hover { background: #25272c; }
.seat-prow.on { background: rgba(var(--primary-rgb), .22); border-color: var(--primary-blue); }
.seat-prow.fixed { cursor: default; }
.seat-prow.fixed:hover { background: transparent; }
.seat-prow .seat-nm { font-weight: 400; }
.seat-st { flex: none; font-family: var(--font-mono); font-size: 11px; color: var(--primary-fg); background: rgba(var(--primary-rgb), .14);
           border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
.seat-side-add, .seat-halfadd { flex: none; display: flex; flex-direction: column; gap: 6px; }
.seat-add { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 34px; border-style: dashed; }
.seat-addlist { display: flex; flex-direction: column; gap: 4px; max-height: 200px; overflow: auto; padding: 8px;
                border: 1px solid rgba(255, 255, 255, .1); border-radius: 8px; background: rgba(0, 0, 0, .15); }
.seat-halfband { display: none; flex: none; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.seat-halfadd.open { flex: 1 0 100%; }
.seat-halfadd .seat-add { width: auto; height: 30px; align-self: flex-start; padding: 0 12px; }
.seat-lay { flex: 1 1 auto; min-height: 0; display: flex; gap: 16px; }
.seat-lay-wrap { position: relative; flex: 1 1 auto; min-width: 0; min-height: 0; overflow: auto; box-sizing: border-box; padding: 20px;
                 background-color: #17181b; background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1.2px); background-size: 16px 16px;
                 border: 1px solid rgba(255, 255, 255, .08); border-radius: 10px; }
.seat-lay-map { position: relative; touch-action: none; }
.seat-lay-isl { position: absolute; box-sizing: border-box; border-radius: 9px; background: rgba(255, 255, 255, .035);
                border: 1px dashed rgba(255, 255, 255, .16); cursor: move; }
.seat-lay-isl.sel { border: 1px solid var(--primary-blue); background: rgba(var(--primary-rgb), .06); }
.seat-lay-ilbl { position: absolute; padding: 2px 6px; margin: 0; font: inherit; font-size: 11.5px; font-weight: 700; white-space: nowrap; color: var(--text-main);
                 background: transparent; border: 1px solid transparent; border-radius: 4px; cursor: pointer; }
.seat-lay-ilbl:hover, .seat-lay-ilbl.sel { border-color: var(--primary-blue); }
.seat-lay-item { position: absolute; box-sizing: border-box; display: flex; flex-direction: column; justify-content: space-between; gap: 2px; padding: 5px 8px;
                 margin: 0; font: inherit; text-align: left; color: var(--text-main); background: #25272c; border: 1px solid rgba(255, 255, 255, .14);
                 border-radius: 8px; cursor: move; overflow: hidden; touch-action: none; }
.seat-lay-item b { font-family: var(--font-mono); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat-lay-item span { font-size: 10.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat-lay-item.fixed { background: #2b2d33; border-color: rgba(255, 255, 255, .26); }
.seat-lay-item.mark { background: transparent; border-style: dashed; justify-content: center; align-items: center; }
.seat-lay-item.off { color: var(--text-muted); background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .05) 0 6px, transparent 6px 12px); }
.seat-lay-item.sel { border: 2px solid var(--primary-blue); background-color: rgba(var(--primary-rgb), .16); }
.seat-lay-item:focus-visible { outline: 2px solid var(--primary-fg); outline-offset: 2px; }
.seat-lay-aside { width: 300px; flex: none; min-height: 0; overflow: auto; }
.seat-lay-side { display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; }
.seat-lay-side > b { font-size: 14px; }
.seat-lay-fs { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 6px; }
.seat-lay-fs legend { padding: 0; margin-bottom: 4px; }
.seat-lay-rb { display: flex; align-items: center; gap: 8px; font-size: 12.5px; cursor: pointer; }
.seat-lay-rb input { accent-color: var(--primary-blue); }
.seat-lay-size { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.seat-lay-size .ui-input { width: 64px; }
.seat-lay-ask { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding: 8px 12px; font-size: 12.5px; line-height: 1.6;
                color: var(--amber-fg); border: 1px solid rgba(var(--amber-rgb), .45); border-radius: 8px; background: rgba(var(--amber-rgb), .08); }
.seat-lay-ask span { flex: 1 1 320px; }
.seat-lay-ask b { font-family: var(--font-mono); }
.seat-lay-top { flex: none; display: flex; flex-direction: column; gap: 8px; }
@container (max-width: 1000px) {
    .seat-wrow { grid-template-columns: 150px repeat(7, minmax(0, 1fr)) 44px; }
    .seat-wname span { display: none; }
    .seat-range { min-width: 0; }
    .seat-side { display: none; }
    .seat-halfband { display: flex; }
    .seat-hint2.seat-half-only { display: flex; }
    .seat-lay-aside { width: 240px; }
}

.hist-filters { align-items: flex-end; }
.hist-f-date { width: 170px; }
.hist-f-user { width: 150px; }
.hist-f-pref { width: 180px; }
.hist-f-hosp { width: 340px; max-width: 100%; }
.hist-table th.c-at { width: 120px; }
.hist-table th.c-pref { width: 100px; }
.hist-table th.c-user { width: 120px; }
.hist-table th.c-tel { width: 140px; }
.hist-table th.c-ops { width: 48px; }
.hist-table td.hist-at { color: var(--text-muted); }
.hist-arrow { margin: 0 var(--space-2); color: var(--text-muted); }
.cf-top { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: stretch; margin-bottom: var(--space-4); }
.cf-top > .ui-card { margin-top: 0; }
.cf-map-card { flex: 1 1 0%; min-width: 0; height: 600px; display: flex; flex-direction: column; overflow: hidden; }
.cf-map-body { flex: 1 1 auto; min-height: 0; display: flex; }
.cf-map { flex: 1; min-height: 0; display: flex; justify-content: center; align-items: center; position: relative; }
.cf-legend { display: flex; flex-wrap: wrap; gap: var(--space-3); font-size: var(--fs-xs); color: var(--text-muted); }
.cf-legend span { display: inline-flex; align-items: center; gap: var(--space-1); }
.cf-sw { display: inline-block; width: 12px; height: 12px; border-radius: var(--radius-sm); box-sizing: border-box; }
.cf-sw-0 { background: var(--bg-card-hover); border: 1px solid var(--border-strong); }
.cf-sw-1 { background: rgba(245, 158, 11, 0.25); }
.cf-sw-2 { background: rgba(245, 158, 11, 0.55); }
.cf-sw-3 { background: rgba(239, 68, 68, 0.7); }
.cf-tip { position: absolute; display: none; z-index: 100; pointer-events: none; min-width: 140px; padding: 10px 14px; background: var(--bg-raised);
          border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); font-size: var(--fs-sm); color: var(--text-main); }
.cf-tip-name { font-weight: 600; margin-bottom: var(--space-1); }
.cf-tip-count { color: var(--amber-fg); font-size: var(--fs-md); font-weight: 600; }
.cf-tip-list { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border-color); font-size: var(--fs-xs); color: var(--text-muted); }
.cf-tip-list > div + div { margin-top: 2px; }
.cf-tip-none { color: var(--text-muted); }
.cf-pref-card { flex: 0 0 280px; height: 600px; display: flex; flex-direction: column; overflow: hidden; }
.cf-pref-list { flex: 1; overflow-y: auto; padding: var(--space-1) 0; }
.cf-pref { border-bottom: 1px solid var(--border-color); }
.cf-pref-row, .cf-hosp { display: flex; align-items: center; gap: var(--space-2); width: 100%; box-sizing: border-box; border: 0; background: transparent;
                         color: var(--text-main); font: inherit; text-align: left; cursor: pointer; }
.cf-pref-row { padding: 6px var(--space-4); font-size: var(--fs-md); }
.cf-pref-row:hover, .cf-hosp:hover, .cf-pref.open > .cf-pref-row { background: var(--bg-card-hover); }
.cf-pref-row:focus-visible, .cf-hosp:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.cf-chev { width: 14px; height: 14px; flex: none; fill: var(--text-muted); transition: transform .2s; }
.cf-pref.open .cf-chev { transform: rotate(90deg); }
.cf-pref-name { font-weight: 600; }
.cf-pref-sub { font-size: var(--fs-xs); color: var(--text-muted); }
.cf-pref-n { margin-left: auto; font-family: var(--font-mono); font-weight: 600; color: var(--amber-fg); }
.cf-pref-n small { margin-left: 2px; font-family: var(--font-sans); font-weight: 400; font-size: var(--fs-xs); color: var(--text-muted); }
.cf-hosps { background: var(--bg-base); border-top: 1px solid var(--border-color); }
.cf-hosp { padding: 4px var(--space-4) 4px 30px; font-size: var(--fs-sm); }
.cf-hosp.active { background: var(--primary-soft); box-shadow: inset 2px 0 0 var(--primary-blue); }
.cf-hosp-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-filter-label:empty { display: none; }
.cf-table-body { overflow-x: auto; }
.cf-table th.c-pref { width: 100px; }
.cf-table th.c-tel { width: 140px; }
.cf-table th.c-ops { width: 90px; }
.cf-table td.cf-muted { color: var(--text-muted); }
.cf-sfa { color: var(--primary-fg); }
.cf-ext { color: var(--amber-fg); font-weight: 600; }
.cf-arrow { margin: 0 var(--space-2); color: var(--text-muted); }
.cf-empty-val { color: var(--text-muted); font-weight: 400; }
.cf-ctx { position: fixed; z-index: var(--z-top); }
.cf-ctx-sfa { color: var(--primary-fg); }
.cf-ctx-ext { color: var(--amber-fg); }

.aimed-tools { padding-bottom: var(--space-3); }
.aimed-select { width: auto; min-width: 150px; }
.aimed-search { width: auto; min-width: 200px; flex: 1 1 200px; }
.aimed-note { margin: var(--space-2) 0 0; line-height: 1.6; }
.aimed-table-wrap { max-height: calc(100vh - 270px); overflow: auto; border-top: 1px solid var(--border-color); }
.aimed-table { table-layout: fixed; }
.aimed-table th { box-sizing: border-box; }
.aimed-table .col-rank { width: 56px; }
.aimed-table .col-doc { width: 260px; }
.aimed-table .col-di { width: 64px; }
.aimed-table .col-tel { width: 150px; }
.aimed-table .col-act { width: 76px; }
.aimed-table td.aimed-rank { font-family: var(--font-mono); color: var(--text-muted); }
.aimed-table td.hosp-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aimed-table td.aimed-doc b { font-family: var(--font-mono); font-size: var(--fs-lg); }
.aimed-detail { font-size: var(--fs-xs); color: var(--text-muted); margin-left: 6px; }
.aimed-old { color: var(--amber-fg); }
.aimed-no { color: var(--text-muted); }
.aimed-table td.aimed-tel { font-family: var(--font-mono); }
.aimed-table td.aimed-act { text-align: right; }
.aimed-table tr.aimed-dim td { opacity: .6; }

.admin-page { height: 100%; display: flex; flex-direction: column; }
.admin-page > * { flex: none; }
.admin-page > .adm-card { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; }
.adm-card > * { flex: none; }
.adm-card > .adm-table-wrap { flex: 0 1 auto; min-height: 160px; }
.adm-head-right { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.adm-stats { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 var(--space-4); }
.adm-stats .top-stat { flex: 1 1 110px; max-width: 180px; padding: 10px 14px; }
.adm-stat-online .top-stat-n { color: var(--success-fg); }
.adm-stat-retired .top-stat-n { color: var(--text-muted); }
.adm-card { container-type: inline-size; }
.adm-tools { padding-bottom: var(--space-3); }
.adm-tabs { flex: none; }
.adm-tabs .ui-tab b { font-family: var(--font-mono); font-weight: normal; font-size: var(--fs-sm); margin-left: 4px; }
.adm-select { width: auto; min-width: 130px; }
.adm-search { width: auto; flex: 1 1 200px; min-width: 160px; }
.adm-table-wrap { overflow: auto; border-top: 1px solid var(--border-color); }
.adm-table { table-layout: fixed; }
.adm-table th { box-sizing: border-box; }
.adm-table th.c-id { width: 128px; }
.adm-table th.c-rank { width: 104px; }
.adm-table th.c-pos { width: 88px; }
.adm-table th.c-role { width: 124px; }
.adm-table th.c-state { width: 136px; }
.adm-table th.c-login { width: 108px; }
.adm-table th.c-created { width: 96px; }
.adm-table th.c-ops { width: 184px; }
.adm-table td { overflow: hidden; text-overflow: ellipsis; padding-top: 5px; padding-bottom: 5px; }
.adm-table td.c-login, .adm-table td.c-created { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--text-muted); }
.adm-table td.c-ops { text-align: right; white-space: normal; }
.adm-table td.c-ops .ui-btn { margin: 1px 0 1px 5px; }
.adm-name { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; line-height: 1.3; font-weight: 600; color: var(--text-main); }
.adm-name-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-kana { font-size: 10.5px; line-height: 1.3; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-me { flex: none; height: 16px; padding: 0 6px; font-weight: normal; }
.adm-row-me td:first-child { box-shadow: inset 3px 0 0 var(--primary-blue); }
.adm-id { font-family: var(--font-mono); font-size: 12px; }
.adm-muted { color: var(--text-muted); }
.adm-badge-assist { background: rgba(139, 92, 246, .14); border-color: transparent; color: #c4b5fd; }
.adm-sub { margin-top: 3px; line-height: 1; }
.adm-table th.c-att { width: 92px; }
.adm-att-ok { font-size: 12px; color: #6ee7b7; }
.adm-att-not { font-size: 12px; color: #fcd34d; }
.adm-att { position: relative; }
.adm-att-combo { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; cursor: pointer; }
.adm-att-combo:disabled { cursor: default; opacity: .6; }
.adm-att-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-main); }
.adm-att-same { font-size: 10.5px; color: #6ee7b7; border: 1px solid rgba(110, 231, 183, .5); border-radius: 4px; padding: 0 5px; white-space: nowrap; }
.adm-att-list { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; padding: 8px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-card-hover); }
.adm-att-list[hidden] { display: none; }
.adm-att-list > [role="listbox"] { max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.adm-att-grp { font-size: 10.5px; font-weight: 700; color: var(--text-muted); padding: 6px 8px 2px; }
.adm-att-opt { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 30px; box-sizing: border-box; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: var(--text-main); font-size: 12.5px; text-align: left; cursor: pointer; }
.adm-att-opt:hover:not(:disabled) { background: var(--bg-base); }
.adm-att-opt.on { background: rgba(var(--primary-rgb), .24); box-shadow: inset 0 0 0 1px var(--primary-blue); }
.adm-att-opt:disabled { cursor: not-allowed; color: var(--text-muted); }
.adm-att-nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-att-id, .adm-att-taken { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.adm-att-empty { font-size: 12px; color: var(--text-muted); padding: 6px 8px; }
.adm-state { display: inline-flex; align-items: center; gap: 5px; }
.adm-state:not(.ui-tag) { font-size: var(--fs-sm); color: var(--text-muted); }
.adm-state.adm-state-on { color: var(--success-fg); }
.adm-state-on i { width: 7px; height: 7px; border-radius: 50%; background: var(--success-green); box-shadow: 0 0 0 3px rgba(var(--success-rgb), .18); }
.adm-state-sub { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-muted); margin-left: 6px; }
.adm-row-retired td { color: var(--text-muted); }
.adm-row-retired .adm-name { color: var(--text-muted); font-weight: normal; }
.adm-confirm { display: block; font-size: 11.5px; color: var(--amber-fg); white-space: nowrap; margin-bottom: 2px; }
@keyframes adm-flash { 0% { background: rgba(var(--primary-rgb), .32); } 100% { background: transparent; } }
.adm-table tr.adm-flash td { animation: adm-flash 2.4s ease-out; }
.adm-note { margin: 0; padding: var(--space-3) var(--space-4); border-top: 1px solid var(--border-color); line-height: 1.6; }
@container (max-width: 1146px) { .adm-table .c-created, .adm-table .c-att { display: none; } }
@container (max-width: 1026px) { .adm-table .c-pos { display: none; } }
@container (max-width: 906px)  { .adm-table .c-login { display: none; } }
@container (max-width: 746px)  { .adm-table .c-role { display: none; } }
.adm-box { max-width: 640px; }
.adm-radios { padding: 6px 0; flex-wrap: wrap; gap: 6px 18px; }
.adm-pw { display: flex; gap: 6px; align-items: center; }
.adm-pw .ui-input { flex: 1 1 auto; min-width: 0; }
.adm-pw .ui-btn { flex: none; height: var(--h-md); padding: 0 11px; font-size: var(--fs-sm); }
.adm-hint-warn { color: var(--amber-fg); }
.adm-hint-warn:empty { min-height: 0; }
.adm-check { padding: 6px 0 4px; }
.adm-assist { margin-top: 4px; padding: 8px 10px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-base); }
.adm-assist-h { font-size: 12px; color: var(--text-main); margin-bottom: 4px; }
.adm-assist-opts { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.adm-assist-opts label { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; cursor: pointer; }
.adm-assist-opts input:disabled + * { opacity: .7; }
.adm-user-meta { margin-top: 14px; }
.adm-pk { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-2); font-size: var(--fs-sm); color: var(--text-muted); }
.adm-pk[hidden] { display: none; }
.adm-purge { margin-top: 16px; padding: 12px 14px; border: 1px solid var(--danger-line); border-radius: var(--radius-lg); background: rgba(var(--danger-rgb), .06); }
.adm-purge .ui-warn { margin: 0 0 10px; color: var(--danger-fg); }
.adm-purge code { font-family: var(--font-mono); color: var(--text-main); }
.adm-purge-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
@media (max-width: 640px) {
    .adm-box .ui-grid { grid-template-columns: 1fr; }
}
.adm-office-box { max-width: 720px; }
.adm-office-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; margin-bottom: 10px;
    border: 1px solid var(--border-color); border-radius: 8px; background: rgba(255, 255, 255, .02); font-size: 13px; }
.adm-office-state { font-weight: bold; color: var(--text-muted); }
.adm-office-state.adm-office-on { color: var(--success-fg); }
.adm-office-when { font-size: 11px; color: var(--text-muted); }
.adm-office-ops { margin-left: auto; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.adm-confirm.adm-confirm-inline { display: inline; margin: 0; white-space: normal; }
.adm-office-mine { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12.5px; color: var(--text-main); margin-bottom: 10px; }
.adm-office-hint { font-size: 11px; color: var(--text-muted); }
.adm-office-wrap { max-height: 32vh; }
.adm-office-table td.adm-office-op { text-align: right; }
.adm-office-table td.adm-office-op .ui-btn { margin-left: 6px; }
.adm-office-add { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.adm-office-add #admOfficeCidr { flex: 1 1 240px; min-width: 0; width: auto; }
.adm-office-add #admOfficeLabel { flex: 0 1 180px; min-width: 0; width: auto; }
.adm-office-recent:empty { display: none; }
.adm-office-recent { margin-bottom: 10px; padding: 10px 12px; border: 1px solid rgba(var(--warning-rgb), .45); border-radius: 8px; background: rgba(var(--warning-rgb), .06); }
.adm-office-recent-title { font-size: 12px; font-weight: bold; color: #fcd34d; margin-bottom: 6px; }
.adm-office-recent .ui-table th { background: transparent; }
.adm-office-recent-note { margin: 6px 0 0; font-size: 11px; color: var(--text-muted); line-height: 1.5; }
.adm-table th .adm-sort { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
    display: inline-flex; align-items: center; gap: 3px; max-width: 100%; white-space: nowrap; text-align: left; }
.adm-table th .adm-sort:hover, .adm-table th .adm-sort:focus-visible { color: var(--text-main); }
.adm-table th .adm-sort:focus-visible { outline: 1px solid var(--primary-blue); outline-offset: 2px; border-radius: 3px; }
.adm-sort-ind { font-size: 9px; min-width: 9px; color: var(--primary-blue); }
.adm-table th .adm-sort:hover .adm-sort-ind:empty::after { content: '↕'; color: var(--text-muted); }
.adm-table th.adm-sorted { color: var(--text-main); }
.adm-sort-now { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-muted); white-space: nowrap; }

        .sd-em, .ss-em { color:var(--text-main); }
        .sd-muted { color:var(--text-muted); }
        .sd-ok { color:var(--success-fg); }
        .sd-danger { color:var(--danger-fg); }
        .sd-run { color:var(--primary-fg); }
        .sd-push { margin-left:auto; }
        .sd-ops { margin-left:auto; display:flex; gap:var(--space-2); }
        .sd-gap { display:inline-block; width:10px; }
        .sd-sub { color:var(--text-muted); font-size:var(--fs-sm); }
        .sd-jops, .ss-jops { flex:0 0 auto; display:flex; gap:var(--space-2); align-items:center; }
        .sd-mapbody, .sd-searchbody { display:flex; flex-direction:column; gap:var(--space-3); }
        .sd-mapwrap { position:relative; }
        .sd-map { display:flex; justify-content:center; align-items:center; min-height:340px; }
        .sd-legend-note { margin-left:6px; }
        .sd-filters { display:flex; flex-direction:column; gap:var(--space-3); padding-top:var(--space-3); border-top:1px solid var(--border-color); }
        .sd-selected { font-size:var(--fs-sm); color:var(--text-muted); }
        .sd-listcard { margin-top:var(--space-4); overflow:hidden; }
        .sd-listnote { padding:9px 18px; font-size:var(--fs-sm); color:var(--text-muted); border-bottom:1px solid var(--border-color); }
        .sd-addbox { padding:14px 18px; border-top:1px solid var(--border-color); background:var(--bg-base); }
        .sd-addtitle { font-size:var(--fs-sm); font-weight:600; margin-bottom:9px; }
        .sd-adept { flex:0 1 210px; }
        .sd-aurl { flex:1; min-width:180px; }
        .sd-edept { flex:0 1 190px; }
        .sd-eurl { flex:1; min-width:170px; }
        .sd-rv-in { flex:0 1 170px; }
        .sd-hit-none, .sd-hit-none:hover { color:var(--text-muted); cursor:default; background:transparent; }
        .sd-hsum-row:last-child { margin-bottom:0; }
        .sd-tip-name { font-weight:600; margin-bottom:3px; }
        .sd-tip-code { margin-left:8px; color:var(--text-muted); font-weight:400; }
        .sd-tip-sep { border-top:1px solid var(--border-color); margin:6px 0 5px; }
        .sd-tip-row { display:flex; justify-content:space-between; gap:12px; margin-bottom:2px; }
        .ui-modal.sd-modal { z-index:var(--z-page-modal); }
        .sd-m-titles { min-width:0; }
        .sd-mstat { font-size:var(--fs-sm); color:var(--text-muted); }
        .ss-tools { display:flex; flex-direction:column; gap:var(--space-3); border-bottom:1px solid var(--border-color); }
        .ss-matched { font-size:var(--fs-sm); color:var(--text-muted); }
        .ss-expmsg { font-size:var(--fs-sm); }
        .ss-chev { width:14px; height:14px; margin-left:auto; flex:none; fill:var(--text-muted); transition:transform .2s; }
        .ss-chev.open { transform:rotate(90deg); }
        .ss-fix { flex:0 0 auto; }
        .sd-jobbar { margin-bottom:var(--space-4); border:1px solid var(--border-color); border-radius:var(--radius-lg); background:var(--bg-card); overflow:hidden; }
        .sd-jobbar.busy { border-color:rgba(var(--primary-rgb),.45); }
        .sd-jobbar.warn { border-color:rgba(var(--warning-rgb),.5); }
        .sd-jobbar-head { display:flex; align-items:center; gap:9px; padding:6px 14px; font-size:11.5px; }
        .sd-jobbar-more { margin-left:auto; }
        .sd-jrow, .ss-jrow { display:flex; align-items:center; gap:9px; flex-wrap:nowrap; white-space:nowrap;
                   font-size:11px; height:26px; padding:0 14px; overflow:hidden;
                   border-top:1px solid var(--border-color); color:var(--text-muted); }
        .sd-jrow b, .ss-jrow b { color:var(--text-main); }
        .sd-jkind, .ss-jkind { display:inline-flex; align-items:center; height:18px; padding:0 7px; border-radius:999px; font-size:var(--fs-xs); font-weight:600; white-space:nowrap; flex:0 0 auto; }
        .sd-jkind.mhlw, .ss-jkind.mhlw  { background:rgba(var(--primary-rgb),.16); color:var(--primary-fg); }
        .sd-jkind.crawl, .ss-jkind.crawl { background:var(--warning-soft); color:var(--amber-fg); }
        .sd-jname { flex:0 1 190px; min-width:90px; color:var(--text-main); font-weight:700;
                    overflow:hidden; text-overflow:ellipsis; }
        .sd-jmsg, .ss-jmsg { flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; }
        .sd-jbar, .ss-bar { flex:0 0 90px; height:4px; border-radius:3px; background:var(--bg-base); overflow:hidden; }
        .sd-jbar i, .ss-bar i { display:block; height:100%; background:var(--primary-blue); transition:width .4s ease; }
        #sd-jobbar-list { max-height:104px; overflow-y:auto; overscroll-behavior:contain; }
        .sd-top { display:flex; gap:var(--space-4); align-items:stretch; flex-wrap:wrap; }
        .sd-mapcard { flex:1 1 660px; min-width:320px; }
        .sd-searchcard { flex:0 1 340px; min-width:280px; }
        .sd-top > .ui-card { margin-top:0; }
        .sd-legend { display:flex; align-items:center; gap:6px; font-size:10.5px; color:var(--text-muted); margin-top:7px; }
        .sd-legend .sw { display:flex; }
        .sd-legend .sw i { width:11px; height:11px; display:inline-block; border:1px solid rgba(255,255,255,.12); }
        .sd-hits { max-height:190px; overflow-y:auto; border:1px solid var(--border-color);
                   border-radius:7px; margin-top:6px; display:none; }
        .sd-hit { padding:8px 12px; font-size:12.5px; cursor:pointer; border-bottom:1px solid var(--border-color); }
        .sd-hit:hover { background:var(--bg-card-hover); }
        .sd-code { font-family:var(--font-mono); font-size:var(--fs-xs); color:var(--text-muted); margin-right:8px; }
        .sd-hrow { display:flex; align-items:center; gap:10px; padding:10px 18px; font-size:12.5px;
                   border-bottom:1px solid var(--border-color); cursor:pointer; }
        .sd-hrow:hover, .ss-hrow:hover { background:var(--bg-card-hover); }
        .sd-hrow.none { opacity:.7; }
        .sd-hrow.none:hover { opacity:1; }
        .sd-hname { flex:1; min-width:0; }
        .sd-kind, .ss-kind { display:inline-flex; align-items:center; height:18px; padding:0 7px; border-radius:999px; font-size:var(--fs-xs); font-weight:600; white-space:nowrap; }
        .sd-kind.u, .ss-kind.u { background:rgba(139,92,246,.16); color:#c4b5fd; }
        .sd-kind.c, .ss-kind.c { background:var(--bg-base); color:var(--text-muted); }
        .sd-stat, .ss-stat { font-size:11px; color:var(--text-muted); white-space:nowrap; }
        .sd-stat b, .ss-stat b { color:var(--text-main); }
        .sd-warn, .ss-warn { color:var(--warning-orange); }
        .sd-modal-bar { flex:none; display:flex; align-items:center; gap:10px; padding:10px 20px; border-bottom:1px solid var(--border-color); flex-wrap:wrap; }
        .sd-modal-body { padding:0; }
        .sd-dtbl td { white-space:normal; }
        .sd-dtbl th.c-name { min-width:130px; }
        .sd-dtbl th.c-state, .sd-dtbl th.c-year { width:150px; }
        .sd-dtbl tr.todo td { background:rgba(var(--warning-rgb),.07); }
        .sd-badge { display:inline-flex; align-items:center; height:18px; padding:0 8px; border-radius:999px; font-size:var(--fs-xs); font-weight:600; white-space:nowrap; }
        .sd-badge.hit  { background:rgba(var(--success-rgb),.16); color:var(--success-fg); }
        .sd-badge.none { background:var(--bg-base); color:var(--text-muted); }
        .sd-badge.todo { background:var(--warning-soft); color:var(--amber-fg); }
        .sd-badge.amb  { background:rgba(139,92,246,.16); color:#c4b5fd; }
        .sd-badge.rev  { background:rgba(var(--danger-rgb),.14); color:var(--danger-fg); font-weight:700; }
        .sd-revrow td { background:rgba(var(--danger-rgb),.05); padding:9px 12px 11px 12px; }
        .sd-revbox { display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:11.5px; }
        .sd-revbox .lbl { color:var(--text-muted); }
        .sd-cand { color:var(--primary-fg); border-color:var(--primary-line); font-weight:600; }
        .sd-revnote { color:var(--warning-orange); }
        .sd-revmsg { font-size:11.5px; }
        .sd-reason { display:inline-flex; align-items:center; height:20px; padding:0 9px; border-radius:999px; font-size:var(--fs-xs); font-weight:600; white-space:nowrap; }
        .sd-reason.crit { background:rgba(var(--danger-rgb),.16); color:var(--danger-fg); }
        .sd-reason.warn { background:var(--warning-soft); color:var(--amber-fg); }
        .sd-reason.info { background:var(--bg-base); color:var(--text-muted); }
        .sd-reason.ok   { background:rgba(var(--success-rgb),.16); color:var(--success-fg); }
        .sd-snip { flex-basis:100%; margin-top:6px; font-size:11px; line-height:1.65;
                   color:var(--text-muted); background:var(--bg-base); border-radius:6px;
                   padding:7px 10px; word-break:break-all; }
        .sd-snip mark { background:rgba(var(--success-rgb),.2); color:var(--success-fg); font-weight:700;
                        padding:1px 4px; border-radius:3px; }
        .sd-snip.none { color:var(--warning-orange); }
        .sd-hsum { padding:11px 18px; background:rgba(var(--primary-rgb),.07);
                   border-bottom:1px solid rgba(var(--primary-rgb),.25); }
        .sd-hsum-row { display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin-bottom:5px; }
        .sd-hsum .sd-years { margin-top:0; gap:14px; }
        .sd-hsum-note { font-size:10.5px; color:var(--text-muted); margin-top:7px; }
        .sd-robanner { display:flex; align-items:center; gap:10px; padding:10px 18px;
            background:rgba(var(--warning-rgb),.14); border-bottom:1px solid rgba(var(--warning-rgb),.4);
            color:var(--warning-orange); font-size:12.5px; font-weight:700; }
        .sd-robanner b { color:#fcd34d; }
        .sd-lockmark:not(:empty) { font-size:10.5px; color:var(--warning-orange);
            white-space:nowrap; padding:1px 7px; border-radius:20px; background:rgba(var(--warning-rgb),.14); }
        .sd-ro .sd-dedit, .sd-ro .sd-ddel, .sd-ro #sd-addbox { display:none; }
        .sd-crawl { padding:10px 18px; border-bottom:1px solid var(--border-color); background:var(--bg-base); }
        .sd-crawl-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
        .sd-crawl-title { font-size:12px; font-weight:700; color:var(--text-muted); }
        .sd-job { display:flex; align-items:center; gap:10px; flex-wrap:wrap;
                  font-size:11.5px; color:var(--text-muted); margin-top:7px; }
        .sd-job b { color:var(--text-main); }
        .sd-job-msg { flex-basis:100%; margin-top:2px; }
        .sd-bar { flex-basis:100%; height:4px; border-radius:3px; background:var(--bg-card-hover); overflow:hidden; margin-top:4px; }
        .sd-bar i { display:block; height:100%; background:var(--primary-blue); }
        .sd-dept { border-bottom:1px solid var(--border-color); padding:10px 18px; }
        .sd-dept:hover { background:var(--bg-card-hover); }
        .sd-dhead { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
        .sd-dname { font-size:13px; font-weight:700; color:var(--text-main); min-width:130px; }
        .sd-durl { font-family:'SF Mono',Menlo,Consolas,monospace; font-size:11px; margin-top:4px; word-break:break-all; }
        .sd-durl a { color:var(--text-muted); text-decoration:none; }
        .sd-durl a:hover { color:var(--primary-blue); }
        .sd-years { display:flex; gap:10px; flex-wrap:wrap; margin-top:6px; }
        .sd-yr { font-size:11px; color:var(--text-muted); }
        .sd-yr.has b { color:var(--primary-fg); }
        .sd-addrow { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
        .sd-msg { font-size:11.5px; }
        .sd-crumb { padding:12px 18px; border-bottom:1px solid var(--border-color);
                    background:var(--bg-card-hover); font-size:12.5px; }
        .sd-crumb a { color:var(--primary-fg); text-decoration:none; font-weight:700; }
        @keyframes sdPulse { 0%,100% { opacity:1; } 50% { opacity:.45; } }
        .sd-sel { animation: sdPulse 1.4s ease-in-out infinite; }
        #sd-tip { position:absolute; display:none; z-index:60; min-width:190px; padding:10px 13px; background:var(--bg-raised); border:1px solid var(--border-strong);
            border-radius:var(--radius-lg); box-shadow:var(--shadow-pop); font-size:var(--fs-sm); color:var(--text-main); pointer-events:none; }

        .ss-ok { color:var(--success-green); }
        .ss-pref { border-bottom:1px solid var(--border-color); }
        .ss-prefhead { display:flex; align-items:center; gap:10px; padding:9px 16px;
                       background:var(--bg-card-hover); font-size:12.5px; cursor:pointer; }
        .ss-prefname { font-weight:700; color:var(--text-main); }
        .ss-hrow { display:flex; flex-wrap:wrap; align-items:center; gap:4px 10px; padding:8px 16px 8px 40px;
                   font-size:12px; border-top:1px solid var(--border-color); }
        .ss-hname { flex:1 1 160px; min-width:0; color:var(--text-main); }
        .ss-c-url   { flex:0 0 150px; }
        .ss-c-crawl { flex:0 0 214px; }
        .ss-c-doc   { flex:0 0 72px; }
        .ss-c-mhlw  { flex:0 0 300px; }
        .ss-c-mdate { flex:0 0 104px; }
        .ss-c-rev   { flex:0 0 76px; }
        .ss-code { font-family:var(--font-mono); font-size:var(--fs-xs); color:var(--text-muted); }
        .ss-cb { width:15px; height:15px; cursor:pointer; accent-color:var(--primary-blue); flex:0 0 auto; }
        .ss-exportbar { position:sticky; bottom:0; z-index:5; display:flex; align-items:center; gap:12px;
            padding:11px 16px; background:var(--bg-card); border-top:1px solid rgba(var(--primary-rgb),.35);
            flex-wrap:wrap; font-size:12.5px; }
        .ss-jname { flex:0 1 210px; min-width:100px; color:var(--text-main); font-weight:700;
                    overflow:hidden; text-overflow:ellipsis; }
        #ss-jobs, #ss-hist { max-height:260px; overflow-y:auto; overscroll-behavior:contain; }
