/* 빠른 수집함 (ib-) - 상단바 빠른 수집 창 + /mydesk/inbox 화면.
   색은 MyDesk 토큰만 쓴다.  종류 색은 공통 색 이름(gray · blue · emerald · amber)과 같은 값. */

.ib-qc, .ib-page { --ib-radius: 14px; }
.is-k-memo { --ib-kind: #6b7280; }
.is-k-link { --ib-kind: #3b82f6; }
.is-k-todo { --ib-kind: #10b981; }
.is-k-idea { --ib-kind: #f59e0b; }
html[data-theme="dark"] .is-k-memo { --ib-kind: #9ca3af; }
html[data-theme="dark"] .is-k-link { --ib-kind: #60a5fa; }
html[data-theme="dark"] .is-k-todo { --ib-kind: #34d399; }
html[data-theme="dark"] .is-k-idea { --ib-kind: #fbbf24; }
/* 정리할 곳(업무노트 · 일정) 아이콘 색 - 종류 색과 겹치지 않게 */
.is-k-work { --ib-kind: #6366f1; }
.is-k-event { --ib-kind: #8b5cf6; }
html[data-theme="dark"] .is-k-work { --ib-kind: #818cf8; }
html[data-theme="dark"] .is-k-event { --ib-kind: #a78bfa; }

.ib-svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ib-qc kbd, .ib-page kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; padding: 0 6px; border: 1px solid var(--brand-border); border-bottom-width: 2px; border-radius: 6px; background: var(--brand-surface-muted); color: var(--brand-text-secondary); font: inherit; font-size: 11.5px; font-weight: 600; line-height: 1; vertical-align: 1px; }
.ib-qc code, .ib-page code { padding: 1px 5px; border-radius: 5px; background: var(--brand-surface-muted); color: var(--brand-text-primary); font-size: 0.92em; white-space: pre; }

/* ---- 뱃지 (label-badges 모양) ---- */
.ib-badge { display: inline-flex; flex: none; align-items: center; gap: 6px; padding: 2px 10px; border: 1px solid var(--brand-border); border-radius: 999px; background: var(--brand-bg); color: var(--brand-text-primary); font-size: 12px; font-weight: 600; line-height: 18px; white-space: nowrap; }
.ib-badge .ib-svg { width: 12px; height: 12px; }
.ib-badge.is-status { color: var(--brand-text-muted); font-weight: 500; }
.ib-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ib-kind, var(--brand-text-muted)); }

/* ---- 상단바 단추 ---- */
.ib-qc-trigger { width: 40px; height: 40px; padding: 0; color: var(--brand-text-secondary); }
.ib-qc-trigger .ib-svg { width: 18px; height: 18px; }
.ib-qc-trigger:hover, .ib-qc-trigger[aria-expanded="true"] { color: var(--text-accent, var(--brand-accent)); }
.ib-qc-trigger:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 2px; }
@media (max-width: 640px) { .mydesk-nav-actions .ib-qc-trigger { width: 36px; height: 36px; padding: 0; } }

/* ---- 빠른 수집 창 ---- */
.ib-qc { width: min(560px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px); margin: 12vh auto auto; padding: 0; overflow: auto; border: 1px solid var(--brand-border); border-radius: 16px; background: var(--brand-surface); color: var(--brand-text-primary); box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .35); }
.ib-qc:not([open]) { display: none; }
.ib-qc[open] { animation: ib-qc-in .18s cubic-bezier(.16, 1, .3, 1); }
.ib-qc::backdrop { background: rgba(10, 12, 20, .45); }
html[data-theme="dark"] .ib-qc { border-color: var(--brand-border-strong); box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .8); }
html[data-theme="dark"] .ib-qc::backdrop { background: rgba(0, 0, 0, .62); }
@keyframes ib-qc-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.ib-qc-form { display: grid; gap: 12px; padding: 18px 20px 16px; }
.ib-qc-head { display: flex; align-items: flex-start; gap: 12px; }
.ib-qc-mark { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--mydesk-accent); color: var(--text-accent, var(--brand-accent)); }
html[data-theme="dark"] .ib-qc-mark { background: color-mix(in srgb, var(--brand-highlight) 20%, var(--brand-surface)); }
.ib-qc-mark .ib-svg { width: 18px; height: 18px; }
.ib-qc-titles { flex: 1; min-width: 0; }
.ib-qc-titles h2 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.ib-qc-titles p { margin: 2px 0 0; color: var(--brand-text-muted); font-size: 13px; line-height: 1.5; }
.ib-qc-x { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 32px; height: 32px; margin: -2px -6px 0 0; border: 0; border-radius: 999px; background: transparent; color: var(--brand-text-muted); cursor: pointer; }
.ib-qc-x:hover { background: var(--brand-surface-muted); color: var(--brand-text-primary); }
.ib-qc-x:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 1px; }
.ib-input { display: block; width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid var(--brand-border); border-radius: 10px; background: var(--brand-surface); color: var(--brand-text-primary); font: inherit; font-size: 15px; line-height: 1.55; transition: border-color var(--transition-fast), box-shadow var(--transition-fast); }
textarea.ib-input { resize: vertical; min-height: 96px; }
.ib-input::placeholder { color: var(--brand-text-muted); }
.ib-input:focus { border-color: var(--brand-accent); outline: none; box-shadow: var(--focus-ring); }
.ib-qc-row, .ib-capture-row { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.ib-qc-length { color: var(--brand-text-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.ib-qc-length.is-over { color: var(--brand-danger); font-weight: 700; }
.ib-qc-error { margin: 0; padding: 8px 12px; border: 1px solid color-mix(in srgb, var(--brand-danger) 35%, var(--brand-border)); border-radius: 10px; background: color-mix(in srgb, var(--brand-danger) 8%, var(--brand-surface)); color: var(--brand-danger); font-size: 13px; font-weight: 500; }
.ib-qc-error[hidden] { display: none; }
.ib-qc-hint { margin: 0; color: var(--brand-text-muted); font-size: 12.5px; line-height: 1.7; }
.ib-qc-hint b { color: var(--brand-text-secondary); font-weight: 600; }
.ib-qc-foot { display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--brand-border); }
.ib-qc-more { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; color: var(--brand-text-secondary); font-size: 13px; font-weight: 600; text-decoration: none; }
.ib-qc-more:hover { color: var(--text-accent, var(--brand-accent)); text-decoration: none; }
.ib-qc-keys { display: inline-flex; align-items: center; gap: 4px; color: var(--brand-text-muted); font-size: 12px; }
.ib-qc-foot .mydesk-pill { padding: 8px 16px; }
@media (max-width: 520px) {
  .ib-qc { margin-top: 10px; }
  .ib-qc-form { padding: 16px; }
  .ib-qc-keys { display: none; }
  .ib-qc-more { font-size: 12.5px; }
}

/* ---- 종류 칩 ---- */
.ib-kinds { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; border: 0; }
.ib-kind { position: relative; cursor: pointer; }
.ib-kind input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ib-kind > span { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 1px solid var(--brand-border); border-radius: 999px; background: var(--brand-surface); color: var(--brand-text-secondary); font-size: 13px; font-weight: 500; white-space: nowrap; transition: border-color var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast); }
.ib-kind > span .ib-svg { width: 14px; height: 14px; }
.ib-kind:hover > span { border-color: var(--brand-border-strong); color: var(--brand-text-primary); }
.ib-kind input:checked + span { border-color: var(--brand-accent); background: var(--mydesk-accent); color: var(--text-accent, var(--brand-accent)); font-weight: 600; }
html[data-theme="dark"] .ib-kind input:checked + span { background: color-mix(in srgb, var(--brand-highlight) 18%, var(--brand-surface)); }
.ib-kind input:focus-visible + span { outline: 2px solid var(--brand-accent); outline-offset: 2px; }
.ib-kind-auto { font-weight: 600; }
/* '자동' 일 때 고른 종류 칩은 점선 테두리로 알려 준다 */
.ib-kind.is-detected > span { border-style: dashed; border-color: var(--ib-kind); color: var(--brand-text-primary); }

/* ---- 화면 ---- */
.ib-page { padding-bottom: 56px; }
.ib-header { margin-bottom: 18px; }
.ib-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.ib-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }   /* 휴대폰에서 12px 넘쳐 탭 · 찾기가 잘리던 것 */

.ib-capture { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--brand-border); border-radius: 16px; background: var(--brand-surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .03); transition: border-color var(--transition-fast), box-shadow var(--transition-fast); }
.ib-capture:focus-within { border-color: color-mix(in srgb, var(--brand-accent) 55%, var(--brand-border)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-accent) 10%, transparent); }
.ib-capture-box { display: flex; align-items: flex-start; gap: 10px; }
.ib-capture-mark { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 32px; height: 32px; margin-top: 4px; border-radius: 9px; background: var(--mydesk-accent); color: var(--text-accent, var(--brand-accent)); }
html[data-theme="dark"] .ib-capture-mark { background: color-mix(in srgb, var(--brand-highlight) 20%, var(--brand-surface)); }
.ib-capture-input { min-height: 76px; padding: 8px 2px; border: 0; background: transparent; font-size: 16px; box-shadow: none; }
.ib-capture-input:focus { box-shadow: none; }
.ib-capture-files > summary { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-text-secondary); font-size: 13px; font-weight: 600; list-style: none; cursor: pointer; }
.ib-capture-files > summary::-webkit-details-marker { display: none; }
.ib-capture-files > summary:hover { color: var(--text-accent, var(--brand-accent)); }
.ib-capture-files[open] > summary { margin-bottom: 10px; }
.ib-capture-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding-top: 10px; border-top: 1px solid var(--brand-border); }
.ib-capture-foot .ib-qc-keys { margin-right: auto; }

.ib-tabs { display: flex; gap: 4px; width: max-content; max-width: 100%; padding: 4px; overflow-x: auto; border: 1px solid var(--brand-border); border-radius: 999px; background: var(--brand-surface); scrollbar-width: none; }
.ib-tabs::-webkit-scrollbar { display: none; }
.ib-tabs a { display: inline-flex; flex: none; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; color: var(--brand-text-secondary); font-size: 14px; font-weight: 500; white-space: nowrap; text-decoration: none; transition: background-color var(--transition-fast), color var(--transition-fast); }
.ib-tabs a:hover { color: var(--brand-text-primary); text-decoration: none; }
.ib-tabs a.is-active { background: var(--mydesk-accent); color: var(--text-accent, var(--brand-accent)); font-weight: 600; }
html[data-theme="dark"] .ib-tabs a.is-active { background: color-mix(in srgb, var(--brand-highlight) 18%, var(--brand-surface)); }
.ib-tab-count { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand-surface-muted); color: var(--brand-text-muted); font-size: 11.5px; font-weight: 700; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.ib-tabs a.is-active .ib-tab-count { background: var(--brand-surface); color: var(--text-accent, var(--brand-accent)); }

.ib-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.ib-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.ib-filter a { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 1px solid var(--brand-border); border-radius: 999px; background: var(--brand-surface); color: var(--brand-text-secondary); font-size: 13px; font-weight: 500; text-decoration: none; }
.ib-filter a:hover { border-color: var(--brand-border-strong); color: var(--brand-text-primary); text-decoration: none; }
.ib-filter a.is-active { border-color: var(--brand-text-primary); background: var(--brand-text-primary); color: var(--brand-surface); font-weight: 600; }
.ib-filter a.is-active .ib-dot { box-shadow: 0 0 0 2px var(--brand-surface); }
.ib-search { display: flex; align-items: center; gap: 8px; }
.ib-search-box { position: relative; display: flex; align-items: center; }
.ib-search-box .ib-svg { position: absolute; left: 11px; color: var(--brand-text-muted); pointer-events: none; }
/* site-components.css 의 공용 input 규칙(:not() 다섯 겹)보다 세게 - id 로 고른다 */
#ib-q { width: min(260px, 52vw); height: 36px; min-height: 36px; padding: 0 12px 0 34px; border: 1px solid var(--brand-border); border-radius: 999px; background: var(--brand-surface); color: var(--brand-text-primary); font: inherit; font-size: 14px; box-shadow: none; }
#ib-q:focus { border-color: var(--brand-accent); outline: none; box-shadow: var(--focus-ring); }
.ib-search .mydesk-pill { padding: 7px 14px; }
.ib-reset { color: var(--brand-text-muted); font-size: 13px; }

/* 한꺼번에 */
.ib-bulk { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; min-height: 44px; padding: 6px 8px 6px 14px; border: 1px solid var(--brand-border); border-radius: 12px; background: var(--brand-surface-muted); transition: border-color var(--transition-fast), background-color var(--transition-fast); }
.ib-bulk[hidden] { display: none; }
.ib-bulk.has-picked { border-color: color-mix(in srgb, var(--brand-accent) 55%, var(--brand-border)); background: color-mix(in srgb, var(--brand-accent) 6%, var(--brand-surface)); }
.ib-bulk-all { display: inline-flex; align-items: center; gap: 8px; color: var(--brand-text-secondary); font-size: 13px; font-weight: 600; cursor: pointer; }
.ib-bulk-count { color: var(--brand-text-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.ib-bulk.has-picked .ib-bulk-count { color: var(--text-accent, var(--brand-accent)); font-weight: 700; }
.ib-bulk-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.ib-page input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--brand-accent); cursor: pointer; }

/* 카드 */
.ib-list { display: grid; gap: 10px; }
.ib-list[hidden] { display: none; }
.ib-card { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 14px 16px 10px 14px; border: 1px solid var(--brand-border); border-radius: var(--ib-radius); background: var(--brand-surface); transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color .6s ease; }
.ib-card:hover { border-color: var(--brand-border-strong); box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.ib-card.is-pinned { border-color: color-mix(in srgb, var(--brand-accent) 45%, var(--brand-border)); box-shadow: inset 3px 0 0 var(--brand-accent); }
.ib-card.is-picked { border-color: var(--brand-accent); background: color-mix(in srgb, var(--brand-accent) 4%, var(--brand-surface)); }
/* 새로고침 뒤 #ib-item-<id> 로 돌아올 때 상단바에 가리지 않게 */
.ib-card { scroll-margin-top: 128px; }
.ib-card.is-fresh { animation: ib-fresh 1.6s ease; }
@keyframes ib-fresh { 0% { background: color-mix(in srgb, var(--brand-accent) 14%, var(--brand-surface)); transform: translateY(-4px); } 25% { transform: none; } }
.ib-card-check { display: flex; padding-top: 3px; cursor: pointer; }
.ib-card-main { display: grid; gap: 8px; min-width: 0; }
/* 한 줄에 둔다 - 좁으면 도메인 글자만 줄어든다(시각 · 고정 단추가 다음 줄로 밀리지 않게) */
.ib-card-meta { display: flex; align-items: center; gap: 6px 8px; flex-wrap: nowrap; min-width: 0; }
.ib-detail .ib-card-meta { flex-wrap: wrap; }
.ib-domain, .ib-files { display: inline-flex; flex: none; align-items: center; gap: 4px; min-width: 0; max-width: 100%; color: var(--brand-text-secondary); font-size: 12.5px; font-weight: 500; text-decoration: none; }
.ib-domain { flex: 0 1 auto; }
.ib-domain-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-domain .ib-svg, .ib-files .ib-svg { width: 13px; height: 13px; }
.ib-domain:hover, .ib-files:hover { color: var(--text-accent, var(--brand-accent)); text-decoration: none; }
.ib-time { margin-left: auto; color: var(--brand-text-muted); font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ib-pin-form { display: inline-flex; margin: 0; }
.ib-pin { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin: -4px -6px -4px 0; border: 0; border-radius: 8px; background: transparent; color: var(--brand-text-muted); cursor: pointer; opacity: .55; transition: opacity var(--transition-fast), color var(--transition-fast), background-color var(--transition-fast); }
.ib-pin .ib-svg { width: 15px; height: 15px; }
.ib-card:hover .ib-pin, .ib-pin:focus-visible { opacity: 1; }
.ib-pin:hover { background: var(--brand-surface-muted); color: var(--brand-text-primary); }
.ib-pin.is-on { color: var(--text-accent, var(--brand-accent)); opacity: 1; }
.ib-pin.is-on .ib-svg { fill: currentColor; fill-opacity: .2; }
.ib-pin:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 1px; }
.ib-card-body { display: -webkit-box; overflow: hidden; color: var(--brand-text-primary); font-size: 14.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; word-break: keep-all; -webkit-box-orient: vertical; -webkit-line-clamp: 6; line-clamp: 6; }
.ib-card-body a, .ib-detail-body a { color: var(--text-accent, var(--brand-accent)); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--brand-accent) 35%, transparent); text-underline-offset: 2px; overflow-wrap: anywhere; word-break: break-all; }
.ib-card-body a:hover, .ib-detail-body a:hover { text-decoration-color: currentColor; }
.ib-card.is-processed .ib-card-body, .ib-card.is-archived .ib-card-body { color: var(--brand-text-secondary); }
.ib-dest { display: inline-flex; align-items: center; gap: 6px; justify-self: start; padding: 4px 12px; border-radius: 999px; background: var(--mydesk-accent); color: var(--text-accent, var(--brand-accent)); font-size: 13px; font-weight: 600; text-decoration: none; }
html[data-theme="dark"] .ib-dest { background: color-mix(in srgb, var(--brand-highlight) 18%, var(--brand-surface)); }
.ib-dest:hover { text-decoration: none; filter: brightness(.97); }
.ib-dest .ib-svg { width: 14px; height: 14px; transition: transform var(--transition-fast); }
.ib-dest:hover .ib-svg { transform: translateX(2px); }
.ib-card-actions { display: flex; align-items: center; gap: 2px 4px; flex-wrap: wrap; margin: 0 0 0 -8px; padding-top: 6px; border-top: 1px dashed var(--brand-border); }
.ib-actions-label { padding: 0 6px 0 8px; color: var(--brand-text-muted); font-size: 12px; font-weight: 600; }
.ib-act { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 9px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--brand-text-secondary); font: inherit; font-size: 13px; font-weight: 500; white-space: nowrap; text-decoration: none; cursor: pointer; transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast); }
.ib-act .ib-svg { width: 15px; height: 15px; }
.ib-act:hover { background: var(--brand-surface); border-color: var(--brand-border); color: var(--brand-text-primary); text-decoration: none; }
.ib-card .ib-act:hover { background: var(--brand-surface-muted); border-color: transparent; }
.ib-act:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 1px; }
.ib-act:disabled { opacity: .45; cursor: default; pointer-events: none; }
.ib-act.is-danger { color: var(--brand-danger); }
.ib-act.is-danger:hover { background: color-mix(in srgb, var(--brand-danger) 10%, var(--brand-surface)); }
.ib-card-actions .ib-act.is-danger { margin-left: auto; }
.ib-act-sep { width: 1px; height: 16px; margin: 0 4px; background: var(--brand-border); }

.ib-empty { display: grid; justify-items: center; gap: 4px; padding: 52px 20px; border: 1px dashed var(--brand-border-strong); border-radius: 16px; text-align: center; }
.ib-empty[hidden] { display: none; }
.ib-empty-mark { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-bottom: 8px; border-radius: 14px; background: var(--brand-surface-muted); color: var(--brand-text-muted); }
.ib-empty-mark .ib-svg { width: 22px; height: 22px; }
.ib-empty h2 { margin: 0; font-size: 17px; }
.ib-empty p { margin: 0; color: var(--brand-text-muted); font-size: 14px; }
/* 쪽 번호는 page_window 가 줄여 주지만, 세 자리 번호가 겹치면 넘치지 않고 다음 줄로 */
.ib-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; max-width: 100%; margin-top: 8px; }
.ib-pager a, .ib-pager-step, .ib-pager-gap { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 10px; border-radius: 999px; color: var(--brand-text-secondary); font-variant-numeric: tabular-nums; text-decoration: none; }
.ib-pager a:hover { background: var(--brand-surface-muted); color: var(--brand-text-primary); text-decoration: none; }
.ib-pager a:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 1px; }
.ib-pager a.is-active { background: var(--mydesk-accent); color: var(--text-accent, var(--brand-accent)); font-weight: 700; }
.ib-pager-step { padding: 0; }
.ib-pager-step .ib-svg { width: 16px; height: 16px; }
.ib-pager-step.is-off { opacity: .35; }
.ib-pager-gap { min-width: 20px; padding: 0; color: var(--brand-text-muted); }

/* 오른쪽 안내 */
.ib-side, .ib-detail-side { position: sticky; top: 112px; display: grid; gap: 14px; min-width: 0; }
.ib-side-card { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--brand-border); border-radius: var(--ib-radius); background: var(--brand-surface); }
.ib-side-card h2 { margin: 0; font-size: 15px; font-weight: 700; }
.ib-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.ib-stats div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--brand-bg); }
.ib-stats dt { color: var(--brand-text-muted); font-size: 12px; font-weight: 600; }
.ib-stats dd { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.ib-rules, .ib-keys { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ib-rules li { display: grid; justify-items: start; gap: 4px; color: var(--brand-text-secondary); font-size: 13px; line-height: 1.5; }
.ib-keys li { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--brand-text-secondary); font-size: 13px; }
.ib-keys li > span { display: inline-flex; align-items: center; gap: 3px; color: var(--brand-text-muted); }
.ib-side-note { margin: 0; color: var(--brand-text-muted); font-size: 12.5px; line-height: 1.6; }
.ib-side-note a { color: var(--text-accent, var(--brand-accent)); font-weight: 600; }
.ib-side-card h2 .ib-svg { width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; }
.ib-mail-form { display: grid; gap: 10px; }
.ib-mail-levels { display: grid; gap: 6px; }
.ib-mail-levels label { position: relative; cursor: pointer; }
.ib-mail-levels input { position: absolute; opacity: 0; pointer-events: none; }
.ib-mail-levels span { display: block; padding: 8px 12px; border: 1px solid var(--brand-border); border-radius: 10px; font-size: 13px; font-weight: 600; transition: border-color var(--transition-fast), background-color var(--transition-fast); }
.ib-mail-levels label:hover span { border-color: var(--brand-border-strong, var(--brand-border)); }
.ib-mail-levels input:checked + span { border-color: var(--brand-accent); background: color-mix(in srgb, var(--brand-accent) 10%, var(--brand-surface)); color: var(--brand-text-primary); box-shadow: 0 0 0 1px var(--brand-accent) inset; }
.ib-mail-levels input:focus-visible + span { outline: 2px solid var(--brand-accent); outline-offset: 2px; }
.ib-mail-sub { margin: 4px 0 -2px; color: var(--brand-text-secondary); font-size: 12.5px; font-weight: 700; }
.ib-side-note.is-warn { color: var(--brand-danger); }
.ib-mail-form .mydesk-pill { justify-self: start; }

/* ---- 하나 보기 ---- */
.ib-crumbs { margin: 8px 0 16px; color: var(--brand-text-muted); font-size: 13px; }
.ib-crumbs a { color: var(--brand-text-secondary); }
.ib-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.ib-detail { display: grid; gap: 16px; min-width: 0; padding: 22px 24px; border: 1px solid var(--brand-border); border-top: 4px solid var(--ib-kind); border-radius: 16px; background: var(--brand-surface); }
.ib-detail-head { display: grid; gap: 8px; }
.ib-detail-time { margin: 0; color: var(--brand-text-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.ib-detail-body { padding: 14px 16px; border-radius: 12px; background: var(--brand-bg); font-size: 15.5px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; word-break: keep-all; }
.ib-edit { border: 1px solid var(--brand-border); border-radius: 12px; }
.ib-edit > summary { display: flex; align-items: center; gap: 8px; padding: 12px 14px; color: var(--brand-text-secondary); font-size: 14px; font-weight: 600; list-style: none; cursor: pointer; }
.ib-edit > summary::-webkit-details-marker { display: none; }
.ib-edit > summary:hover { color: var(--brand-text-primary); }
.ib-edit[open] > summary { border-bottom: 1px solid var(--brand-border); }
.ib-edit-form { display: grid; gap: 14px; padding: 14px; }
.ib-field { display: grid; gap: 6px; margin: 0; }
.ib-field > span { font-size: 14px; font-weight: 600; }
.ib-field em { color: var(--brand-text-muted); font-size: 12px; font-style: normal; font-weight: 400; }
.ib-field input.ib-input { height: 40px; padding: 0 12px; font-size: 14px; }
.ib-edit-actions { display: flex; justify-content: flex-end; }
.ib-process { display: grid; gap: 8px; margin: 0; }
.ib-process-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid var(--brand-border); border-radius: 12px; background: var(--brand-surface); color: var(--brand-text-primary); font: inherit; text-align: left; cursor: pointer; transition: border-color var(--transition-fast), background-color var(--transition-fast), transform var(--transition-fast); }
a.ib-process-btn, a.ib-process-btn:hover { text-decoration: none; }
.ib-process-btn:hover { border-color: var(--brand-accent); background: color-mix(in srgb, var(--brand-accent) 4%, var(--brand-surface)); }
.ib-process-btn:active { transform: scale(.99); }
.ib-process-btn:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 2px; }
.ib-process-btn:disabled { opacity: .5; cursor: not-allowed; }
.ib-process-btn:disabled:hover { border-color: var(--brand-border); background: var(--brand-surface); }
.ib-process-btn strong { display: block; font-size: 14px; font-weight: 600; }
.ib-process-btn small { display: block; margin-top: 1px; color: var(--brand-text-muted); font-size: 12px; line-height: 1.45; }
.ib-process-icon { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; background: color-mix(in srgb, var(--ib-kind) 14%, var(--brand-surface)); color: var(--ib-kind); }
.ib-move-files { display: flex; align-items: center; gap: 8px; padding: 4px 2px 0; color: var(--brand-text-secondary); font-size: 13px; cursor: pointer; }
.ib-side-actions { grid-template-columns: 1fr; gap: 8px; }
.ib-side-actions form { margin: 0; }
.ib-side-actions .mydesk-pill { width: 100%; }
.ib-back { justify-self: start; }

@media (max-width: 1100px) {
  .ib-layout, .ib-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .ib-side, .ib-detail-side { position: static; }
  .ib-side { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media (max-width: 640px) {
  .ib-capture { padding: 12px; }
  .ib-capture-mark { display: none; }
  .ib-capture-foot .ib-qc-keys { display: none; }
  .ib-tabs a { padding: 6px 11px; font-size: 13.5px; }
  .ib-toolbar { align-items: stretch; flex-direction: column; }
  .ib-search { width: 100%; }
  .ib-search-box { flex: 1; }
  #ib-q { width: 100%; }
  .ib-card { gap: 10px; padding: 12px 12px 8px 12px; }
  .ib-actions-label, .ib-act-sep { display: none; }
  .ib-card-actions { margin-left: -6px; }
  .ib-act { padding: 0 7px; }
  .ib-pager a, .ib-pager-step { min-width: 32px; height: 32px; padding: 0 8px; }
  .ib-pager-step { padding: 0; }
  .ib-bulk-actions { width: 100%; margin-left: -6px; }
  .ib-side-card.is-keys { display: none; }
  .ib-detail { padding: 16px; }
  .ib-detail-body { padding: 12px; font-size: 15px; }
}
