:root {
  color-scheme: light;
  --bg: #f4f6fa;
  --panel: #ffffff;
  --line: #e4e8f0;
  --line-strong: #d5dbe7;
  --text: #172033;
  --muted: #687387;
  --blue: #315bd7;
  --blue-dark: #2449b8;
  --blue-soft: #eef3ff;
  --green: #168765;
  --amber: #a86008;
  --amber-soft: #fff7e8;
  --red: #d33d55;
  --shadow: 0 18px 45px rgba(28, 40, 68, .08);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--text); background: var(--bg); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); line-height: 1.7; }
.eyebrow { margin: 0 0 7px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .14em; }

.brand { display: flex; align-items: center; gap: 7px; font-size: 17px; font-weight: 800; font-style: italic; letter-spacing: .08em; }
.brand-mark { display: grid; width: 33px; height: 27px; place-items: center; border-radius: 9px; color: #fff; background: var(--blue); font-size: 13px; font-style: normal; letter-spacing: -.05em; }

.login-view { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at 20% 10%, #e8efff 0, transparent 36%), radial-gradient(circle at 85% 80%, #e4f8ef 0, transparent 32%), #f7f8fb; }
.login-card { width: min(440px, 100%); padding: 38px; border: 1px solid rgba(213, 219, 231, .8); border-radius: 24px; background: rgba(255, 255, 255, .94); box-shadow: var(--shadow); }
.login-card .brand { margin-bottom: 38px; }
.login-card h1 { margin: 0 0 8px; font-size: 30px; letter-spacing: -.03em; }
.login-tabs { display: flex; gap: 6px; margin: 26px 0 20px; padding: 4px; border-radius: 11px; background: #f0f2f6; }
.tab { flex: 1; padding: 9px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; }
.tab.is-active { color: var(--text); background: #fff; box-shadow: 0 2px 8px rgba(28, 40, 68, .08); font-weight: 700; }
.login-form { display: grid; gap: 16px; }
.login-form label, .field { display: grid; gap: 7px; color: #3c4659; font-size: 13px; font-weight: 700; }
.code-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.form-status { min-height: 20px; margin: 14px 0 0; color: var(--red); font-size: 13px; }

input, textarea, select { width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; outline: 0; color: var(--text); background: #fff; transition: border .16s, box-shadow .16s; }
input, select { height: 42px; padding: 0 12px; }
textarea { resize: vertical; min-height: 88px; padding: 11px 12px; }
input:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(49, 91, 215, .12); }

.primary-button, .secondary-button, .ghost-button, .danger-button, .icon-button { min-height: 38px; border-radius: 9px; padding: 0 14px; border: 1px solid transparent; font-weight: 700; transition: transform .12s, background .15s, opacity .15s; }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { cursor: wait; opacity: .58; }
.primary-button { color: #fff; background: var(--blue); }
.primary-button:hover:not(:disabled) { background: var(--blue-dark); }
.secondary-button, .ghost-button { border-color: var(--line); color: #3e4a60; background: #fff; }
.secondary-button:hover:not(:disabled), .ghost-button:hover:not(:disabled) { background: #f7f8fb; }
.danger-button { border-color: #f2ccd3; color: var(--red); background: #fff8f9; }
.icon-button { width: 36px; padding: 0; color: #fff; background: var(--blue); font-size: 22px; line-height: 1; }
.wide { width: 100%; min-height: 44px; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; }

.workspace { min-height: 100vh; }
.topbar { position: sticky; z-index: 20; top: 0; height: 66px; display: flex; align-items: center; gap: 24px; padding: 0 26px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .94); backdrop-filter: blur(16px); }
.topbar-title { display: flex; align-items: baseline; gap: 9px; padding-left: 24px; border-left: 1px solid var(--line); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.user-pill, .security-pill { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; color: #536078; background: #fafbfc; font-size: 12px; }
.security-pill { border-color: #cfe9df; color: #19765c; background: #effaf6; font-weight: 700; }

.workspace-body { display: grid; grid-template-columns: 92px 310px minmax(0, 1fr); max-width: 1920px; min-height: calc(100vh - 66px); margin: 0 auto; }
.workspace-body.library-mode { grid-template-columns: 92px minmax(0, 1fr); }
.primary-sidebar, .secondary-sidebar { position: sticky; top: 66px; height: calc(100vh - 66px); overflow: auto; border-right: 1px solid var(--line); }
.primary-sidebar { z-index: 3; padding: 20px 10px; background: #f1f4fa; }
.primary-navigation { display: grid; gap: 10px; }
.primary-nav-button { width: 100%; min-height: 74px; display: grid; place-items: center; gap: 7px; padding: 9px 5px; border: 1px solid transparent; border-radius: 13px; color: #647087; background: transparent; font-size: 11px; font-weight: 750; }
.primary-nav-button:hover { color: var(--text); background: #e9edf5; }
.primary-nav-button.is-active { border-color: #c7d4fa; color: var(--blue); background: #fff; box-shadow: 0 7px 22px rgba(49, 91, 215, .09); }
.primary-nav-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: #647087; background: #e2e7f0; font-size: 13px; font-weight: 800; }
.primary-nav-button.is-active .primary-nav-icon { color: #fff; background: var(--blue); }
.secondary-sidebar { z-index: 2; padding: 24px 18px 40px; background: #f8f9fc; }
.secondary-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.secondary-heading h2 { margin: 0; font-size: 19px; }
.add-customer-button { width: 100%; margin: 19px 0 17px; }
.sidebar-search { display: grid; gap: 6px; margin-bottom: 11px; color: #687387; font-size: 11px; font-weight: 700; }
.sidebar-search input, .sidebar-search select { height: 38px; }
.customer-list { display: grid; gap: 8px; }
.customer-item { width: 100%; padding: 13px; border: 1px solid var(--line); border-radius: 12px; text-align: left; color: var(--text); background: #fff; }
.customer-item:hover { border-color: #bcc8e9; }
.customer-item.is-active { border-color: var(--blue); background: var(--blue-soft); box-shadow: 0 0 0 2px rgba(49, 91, 215, .08); }
.customer-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customer-card-badges, .customer-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.customer-card-badges { margin-top: 8px; }
.customer-badges { margin-top: 10px; }
.customer-badge { padding: 4px 7px; border-radius: 999px; color: #58657c; background: #eef1f6; font-size: 10px; font-weight: 700; }
.customer-badge.status { color: #23765f; background: #eaf8f3; }
.customer-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 9px; color: var(--muted); font-size: 11px; }
.sidebar-empty { padding: 40px 12px; color: var(--muted); text-align: center; font-size: 13px; line-height: 1.7; }

.main-content { min-width: 0; padding: 30px clamp(18px, 3vw, 44px) 70px; }
.library-content { grid-column: 2 / -1; }
.workspace-empty { min-height: calc(100vh - 160px); display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--muted); text-align: center; }
.workspace-empty-icon { display: grid; width: 56px; height: 56px; place-items: center; border-radius: 17px; color: var(--blue); background: var(--blue-soft); font-size: 20px; font-weight: 800; }
.workspace-empty h1, .workspace-empty p { margin: 0; }
.workspace-empty h1 { color: var(--text); font-size: 24px; }
.workspace-empty p { margin-bottom: 8px; font-size: 13px; }
.page-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin: 0 auto 22px; max-width: 1220px; }
.page-heading h1 { margin: 0; font-size: 25px; letter-spacing: -.025em; }
.page-heading p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.panel { max-width: 1220px; margin: 0 auto 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--panel); box-shadow: 0 5px 20px rgba(28, 40, 68, .035); }
.panel-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding: 19px 22px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 16px; }
.panel-head p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.panel-body { padding: 22px; }
.field.compact { max-width: 520px; }
.customer-profile-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.customer-profile-form .full, .manual-listing-form .full { grid-column: 1 / -1; }
.inquiry-panel-body { display: grid; gap: 14px; }
.inquiry-panel-body > .muted { margin: 0; font-size: 12px; }
.inquiry-history { display: grid; gap: 9px; }
.inquiry-item { display: grid; gap: 5px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; }
.inquiry-item > strong { font-size: 13px; }
.inquiry-item > small { color: var(--muted); }
.inquiry-answers { margin-top: 4px; color: var(--blue); font-size: 12px; }
.inquiry-answers summary { cursor: pointer; font-weight: 700; }
.inquiry-answer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 17px; margin-top: 11px; }
.inquiry-answer-grid p { display: grid; gap: 2px; margin: 0; padding: 8px; border-radius: 7px; background: #f6f8fc; }
.inquiry-answer-grid span { color: var(--muted); font-size: 11px; }
.inquiry-answer-grid strong { color: var(--text); font-size: 12px; overflow-wrap: anywhere; }
.tertiary-tabs { max-width: 1220px; display: flex; gap: 6px; margin: -7px auto 18px; padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: #edf0f6; }
.tertiary-tab { min-height: 39px; padding: 0 17px; border: 0; border-radius: 9px; color: #667287; background: transparent; font-size: 13px; font-weight: 750; }
.tertiary-tab.is-active { color: var(--blue); background: #fff; box-shadow: 0 3px 10px rgba(28, 40, 68, .08); }
.tertiary-tab span { display: inline-grid; min-width: 20px; height: 19px; margin-left: 4px; place-items: center; border-radius: 999px; color: inherit; background: var(--blue-soft); font-size: 10px; }
.recommendation-history-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 17px 22px 22px; }
.recommendation-history-panel > .empty-state { margin: 0 22px 22px; }
.recommendation-item { width: 100%; padding: 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: #fff; text-align: left; }
.recommendation-item:hover { border-color: #bdc9e8; }
.recommendation-item.is-active { border-color: var(--blue); background: var(--blue-soft); box-shadow: 0 0 0 2px rgba(49, 91, 215, .08); }
.recommendation-item-head { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.recommendation-item h3 { overflow: hidden; margin: 0; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.recommendation-item-meta { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 8px; color: var(--muted); font-size: 11px; }
.recommendation-state { flex: none; padding: 4px 7px; border-radius: 999px; color: #8c650f; background: #fff4d7; font-size: 10px; font-weight: 800; }
.recommendation-state.published { color: var(--green); background: #eaf8f3; }
.link-entry { margin-top: 20px; padding: 17px; border: 1px solid #cfdafb; border-radius: 13px; background: var(--blue-soft); }
.link-entry label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 9px; color: #274da5; font-size: 13px; }
.link-entry label span { color: #6f7fa8; font-size: 11px; }
.inline-form { display: grid; grid-template-columns: 1fr auto; gap: 9px; margin-top: 10px; }
#listing-url::placeholder { color: #aeb7c7; opacity: 1; }
.library-pick-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 20px; padding: 15px 17px; border: 1px solid #d9e0ee; border-radius: 13px; background: #f8f9fc; }
.library-pick-row div { display: grid; gap: 5px; }
.library-pick-row strong { font-size: 13px; }
.library-pick-row span { color: var(--muted); font-size: 11px; }
.quality-banner { margin-top: 16px; padding: 13px 15px; border: 1px solid #f1d39f; border-radius: 11px; color: var(--amber); background: var(--amber-soft); font-size: 12px; line-height: 1.65; }
.listing-list { display: grid; gap: 13px; margin-top: 18px; }
.listing-card { display: grid; grid-template-columns: 150px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 13px; }
.listing-card.has-validation-error { border-color: #e94e65; box-shadow: 0 0 0 3px rgba(233, 78, 101, .1); }
.listing-thumb { position: relative; min-height: 128px; background: #edf0f5; }
.listing-thumb img { width: 100%; height: 100%; min-height: 128px; object-fit: cover; }
.listing-index { position: absolute; top: 9px; left: 9px; padding: 4px 7px; border-radius: 7px; color: #fff; background: rgba(18, 27, 45, .72); font-size: 11px; font-weight: 800; }
.listing-content { min-width: 0; padding: 14px 15px; }
.listing-top { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.listing-title { min-width: 0; }
.listing-title h3 { overflow: hidden; margin: 0; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.listing-title p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.listing-validation-badge { margin: 10px 0 0; padding: 8px 10px; border-radius: 8px; color: #b62f47; background: #fff0f3; font-size: 12px; font-weight: 700; }
.listing-actions { display: flex; gap: 5px; }
.listing-actions button { width: 31px; height: 31px; padding: 0; border: 1px solid var(--line); border-radius: 8px; color: #526077; background: #fff; }
.listing-actions .remove { color: var(--red); }
.reason-field { display: grid; gap: 6px; margin-top: 12px; color: #566176; font-size: 11px; font-weight: 700; }
.reason-field textarea { min-height: 64px; font-size: 13px; }
.empty-state { display: grid; place-items: center; gap: 6px; min-height: 150px; margin-top: 18px; border: 1px dashed var(--line-strong); border-radius: 13px; color: var(--muted); font-size: 12px; }
.empty-state strong { color: #4b566c; font-size: 14px; }

.report-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.report-form .full { grid-column: 1 / -1; }
.check-field { display: flex; align-items: center; gap: 9px; padding: 12px; border-radius: 10px; color: var(--amber); background: var(--amber-soft); font-size: 13px; }
.check-field input { width: 17px; height: 17px; }
.publish-row { display: flex; align-items: center; gap: 13px; }
.publish-row p { margin: 0; color: var(--muted); font-size: 12px; }
.publish-button { min-height: 44px; }

.report-list { display: grid; gap: 10px; padding: 18px 22px 22px; }
.report-card { padding: 15px; border: 1px solid var(--line); border-radius: 12px; }
.report-card-main { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.report-card h3 { margin: 0; font-size: 14px; }
.report-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 7px; color: var(--muted); font-size: 11px; }
.status { padding: 4px 8px; border-radius: 999px; color: var(--green); background: #eaf8f3; font-size: 11px; font-weight: 700; }
.status.revoked, .status.expired { color: #8a6470; background: #f4eef0; }
.report-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.feedback-list { display: grid; gap: 7px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.feedback-item { padding: 10px; border-radius: 9px; color: #4c586e; background: #f7f9fc; font-size: 12px; line-height: 1.6; }

.library-content { width: 100%; }
.library-add-form { margin-top: 0; }
.manual-listing-details { margin-top: 17px; border-top: 1px solid var(--line); padding-top: 14px; }
.manual-listing-details summary { color: var(--blue); cursor: pointer; font-size: 13px; font-weight: 750; }
.manual-listing-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 17px; }
.manual-listing-form input[type="file"] { height: auto; padding: 9px; }
.manual-actions { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.manual-actions span { color: var(--muted); font-size: 12px; }
.library-panel-head { align-items: center; }
.count-badge { display: inline-grid; min-width: 25px; height: 22px; margin-left: 5px; place-items: center; border-radius: 999px; color: var(--blue); background: var(--blue-soft); font-size: 11px; vertical-align: 2px; }
.library-search { display: grid; min-width: min(340px, 100%); gap: 5px; color: #59657a; font-size: 11px; font-weight: 700; }
.library-search input { height: 38px; }
.library-filters { display: flex; align-items: end; flex-wrap: wrap; gap: 9px; }
.library-filters > label:not(.library-search) { display: grid; min-width: 118px; gap: 5px; color: #59657a; font-size: 11px; font-weight: 700; }
.library-filters select { height: 38px; }
.picker-filters { padding: 0 22px 14px; }
.library-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.library-card { display: grid; grid-template-columns: 132px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.library-card-thumb { min-height: 132px; background: #edf0f5; }
.library-card-thumb img { width: 100%; height: 100%; min-height: 132px; object-fit: cover; }
.library-card-body { min-width: 0; display: flex; flex-direction: column; padding: 13px; }
.library-card h3 { overflow: hidden; margin: 0; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.library-card-meta { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.library-card-id { overflow: hidden; margin: 5px 0 0; color: #8993a5; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.library-room-picker { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--muted); font-size: 11px; }
.library-room-picker select { width: auto; min-width: 108px; height: 30px; padding: 0 7px; font-size: 11px; }
.library-card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 11px; }
.library-card-actions button { min-height: 31px; padding: 0 10px; font-size: 11px; }

.modal-backdrop { position: fixed; z-index: 80; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(20, 29, 48, .46); backdrop-filter: blur(4px); }
.modal-card { width: min(780px, 100%); max-height: min(760px, calc(100vh - 48px)); display: flex; flex-direction: column; overflow: hidden; border: 1px solid rgba(255, 255, 255, .7); border-radius: 20px; background: #fff; box-shadow: 0 28px 80px rgba(20, 29, 48, .24); }
.modal-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding: 21px 22px 15px; }
.modal-head h2 { margin: 0; font-size: 20px; }
.modal-close { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 9px; color: #69758a; background: #fff; font-size: 23px; line-height: 1; }
.picker-search { margin: 0 22px 14px; }
.picker-list { min-height: 120px; display: grid; gap: 9px; overflow: auto; padding: 0 22px 18px; }
.picker-item { display: grid; grid-template-columns: auto 76px minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.picker-item:hover { border-color: #bdc9e8; background: #fafbfe; }
.picker-item.is-selected { border-color: var(--blue); background: var(--blue-soft); }
.picker-item input { width: 18px; height: 18px; }
.picker-item img { width: 76px; height: 58px; border-radius: 8px; object-fit: cover; background: #edf0f5; }
.picker-item h3 { overflow: hidden; margin: 0; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.picker-item p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.modal-card > .empty-state { margin: 0 22px 18px; }
.modal-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 22px; border-top: 1px solid var(--line); background: #fafbfc; }
.modal-actions > span { color: var(--muted); font-size: 12px; }

.toast { position: fixed; z-index: 100; top: 78px; left: 50%; max-width: min(520px, calc(100vw - 32px)); transform: translate(-50%, -16px); padding: 11px 15px; border: 1px solid #bdd5ca; border-radius: 11px; color: #17684f; background: #f1fbf7; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .2s; font-size: 13px; }
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
.toast.is-error { border-color: #efc4cc; color: #b62f47; background: #fff5f7; }

@media (max-width: 1100px) {
  .workspace-body { grid-template-columns: 76px 270px minmax(0, 1fr); }
  .workspace-body.library-mode { grid-template-columns: 76px minmax(0, 1fr); }
  .primary-sidebar { padding-inline: 7px; }
}

@media (max-width: 900px) {
  .workspace-body, .workspace-body.library-mode { grid-template-columns: 1fr; }
  .primary-sidebar, .secondary-sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .primary-sidebar { padding: 10px 14px; }
  .primary-navigation { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .primary-nav-button { min-height: 48px; display: flex; justify-content: center; }
  .secondary-sidebar { padding: 16px 18px; }
  .customer-list { grid-auto-flow: column; grid-auto-columns: minmax(180px, 250px); overflow-x: auto; }
  .library-content { grid-column: auto; }
  .main-content { padding-top: 22px; }
  .report-form { grid-template-columns: 1fr 1fr; }
  .topbar-title { display: none; }
  .library-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .login-view { padding: 14px; }
  .login-card { padding: 27px 22px; }
  .topbar { height: 58px; padding: 0 14px; }
  .brand span:last-child { display: none; }
  .user-pill { display: none; }
  .page-heading, .panel-head, .report-card-main { align-items: stretch; flex-direction: column; }
  .security-pill { align-self: flex-start; }
  .panel-body, .panel-head { padding: 16px; }
  .inline-form, .listing-card, .report-form, .customer-profile-form, .manual-listing-form, .recommendation-history-list, .inquiry-answer-grid { grid-template-columns: 1fr; }
  .listing-thumb { max-height: 210px; }
  .report-form .full { grid-column: auto; }
  .publish-row { align-items: stretch; flex-direction: column; }
  .library-pick-row, .library-panel-head, .modal-actions { align-items: stretch; flex-direction: column; }
  .library-card { grid-template-columns: 105px minmax(0, 1fr); }
  .library-filters, .manual-actions { align-items: stretch; flex-direction: column; }
  .library-filters > label { width: 100%; }
  .library-card-thumb, .library-card-thumb img { min-height: 130px; }
  .modal-backdrop { padding: 10px; }
  .picker-item { grid-template-columns: auto 58px minmax(0, 1fr); gap: 8px; }
  .picker-item img { width: 58px; height: 50px; }
}
