:root {
  color-scheme: light;
  --bg: #f5f5f5;
  --surface: #ffffff;
  --surface-subtle: #faf9f8;
  --surface-hover: #f3f2f1;
  --nav-bg: #f3f2f1;
  --border: #e1dfdd;
  --border-strong: #c8c6c4;
  --text: #242424;
  --text-secondary: #605e5c;
  --text-tertiary: #8a8886;
  --accent: #0f6cbd;
  --accent-hover: #115ea3;
  --accent-soft: #e5f1fb;
  --danger: #c50f1f;
  --danger-soft: #fde7e9;
  --warning: #986f0b;
  --success: #107c10;
  --success-soft: #e7f5e7;
  --overlay: rgba(0, 0, 0, 0.32);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  font-family: "Meiryo UI", Meiryo, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1b1a19;
  --surface: #252423;
  --surface-subtle: #201f1e;
  --surface-hover: #323130;
  --nav-bg: #201f1e;
  --border: #3b3a39;
  --border-strong: #605e5c;
  --text: #f3f2f1;
  --text-secondary: #c8c6c4;
  --text-tertiary: #a19f9d;
  --accent: #69afe5;
  --accent-hover: #8cc8f2;
  --accent-soft: #173753;
  --danger: #f1707b;
  --danger-soft: #461f24;
  --warning: #f7c646;
  --success: #6ccb5f;
  --success-soft: #1d3d1c;
  --overlay: rgba(0, 0, 0, 0.6);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5; letter-spacing: 0; }
button, input, select { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
svg { stroke-width: 1.75; }
.hidden { display: none !important; }

.app-shell { min-height: 100dvh; display: grid; grid-template-columns: 224px minmax(0, 1fr); }
.side-nav { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; background: var(--nav-bg); border-right: 1px solid var(--border); z-index: 30; }
.brand { height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--border); text-decoration: none; }
.brand-mark { width: 28px; height: 28px; display: grid; place-items: center; color: var(--accent); }
.brand-mark svg { width: 22px; height: 22px; }
.brand > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.brand strong { font-size: 15px; font-weight: 600; line-height: 20px; }
.brand small { color: var(--text-secondary); font-size: 11px; line-height: 15px; }

.top-nav { display: flex; flex-direction: column; gap: 2px; padding: 12px 8px; }
.top-nav a { position: relative; min-height: 42px; display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 8px; padding: 0 10px; color: var(--text); text-decoration: none; font-size: 14px; }
.top-nav a:hover { background: var(--surface-hover); }
.top-nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.top-nav a.active::before { content: ""; position: absolute; left: -8px; top: 8px; bottom: 8px; width: 3px; background: var(--accent); }
.top-nav a svg { width: 17px; height: 17px; }
.nav-count { min-width: 20px; height: 20px; display: inline-grid; place-items: center; padding: 0 5px; border-radius: 10px; background: var(--border); color: var(--text-secondary); font-size: 10px; font-weight: 600; }
.top-nav a.active .nav-count { background: var(--surface); color: var(--accent); }
.side-status { margin-top: auto; padding: 14px 16px; border-top: 1px solid var(--border); }
.side-status span { display: flex; align-items: center; gap: 7px; color: var(--text-secondary); font-size: 11px; }
.side-status span svg { width: 14px; color: var(--success); }
.side-status small { display: block; margin: 5px 0 0 21px; color: var(--text-tertiary); font-size: 10px; }

.workspace { min-width: 0; }
.command-header { position: sticky; top: 0; z-index: 20; height: 56px; display: flex; align-items: center; gap: 16px; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--border); }
.mobile-menu { display: none; }
.global-search { width: min(620px, 60vw); height: 34px; display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 8px; padding: 0 10px; background: var(--surface-subtle); border: 1px solid var(--border-strong); border-radius: 2px; }
.global-search:focus-within { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.global-search > svg { width: 16px; color: var(--text-secondary); }
.global-search input { min-width: 0; width: 100%; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 14px; }
.global-search input::placeholder { color: var(--text-tertiary); }
kbd { min-width: 20px; height: 20px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 2px; background: var(--surface); color: var(--text-secondary); font-size: 10px; }
.header-actions { margin-left: auto; display: flex; gap: 4px; }
.icon-button, .mobile-menu { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 2px; background: transparent; color: var(--text); cursor: pointer; }
.icon-button:hover, .mobile-menu:hover { border-color: var(--border); background: var(--surface-hover); }
.icon-button svg, .mobile-menu svg { width: 17px; height: 17px; }
.account-button { position: relative; }
.account-indicator { position: absolute; right: 4px; bottom: 4px; width: 7px; height: 7px; border: 1px solid var(--surface); border-radius: 50%; background: var(--text-tertiary); }
.account-button.authenticated .account-indicator { background: var(--success); }

main { width: 100%; max-width: 1500px; padding: 22px 28px 64px; }
.view-panel { min-height: calc(100dvh - 142px); }
.page-header { min-height: 54px; display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 16px; }
.page-header h1 { margin: 0; font-size: 25px; line-height: 34px; font-weight: 600; }
.page-header p { margin: 3px 0 0; color: var(--text-secondary); font-size: 14px; }
.last-updated { margin-top: 6px; color: var(--text-secondary); font-size: 11px; white-space: nowrap; }
.last-updated strong { margin-left: 6px; color: var(--text); font-weight: 600; }

.summary-strip { min-height: 44px; display: flex; align-items: stretch; margin-bottom: 20px; border: 1px solid var(--border); background: var(--surface); }
.summary-strip > * { min-width: 160px; display: flex; align-items: center; gap: 8px; padding: 0 16px; border: 0; border-right: 1px solid var(--border); background: transparent; color: var(--text-secondary); text-align: left; font-size: 13px; }
.summary-strip > *:last-child { border-right: 0; }
.summary-strip button { cursor: pointer; }
.summary-strip button:hover { background: var(--surface-hover); }
.summary-strip button.active { box-shadow: inset 0 -2px 0 var(--accent); background: var(--accent-soft); color: var(--text); }
.summary-strip button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.summary-strip strong { margin-left: auto; color: var(--text); font-size: 15px; font-weight: 600; }
.summary-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--text-tertiary); }
.summary-dot.expired { background: var(--danger); }
.summary-dot.warning { background: var(--warning); }
.summary-dot.updated { background: var(--accent); }

.content-section, .settings-panel { margin-bottom: 24px; }
.section-toolbar { min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 8px 12px; border: 1px solid var(--border); border-bottom: 0; background: var(--surface); }
.section-toolbar h2 { display: inline; margin: 0; font-size: 16px; font-weight: 600; }
.section-toolbar div > span { margin-left: 10px; color: var(--text-secondary); font-size: 12px; }
.table-count { color: var(--text-secondary); font-size: 12px; }
.attention-tools { display: flex; align-items: center; gap: 7px; }
.section-toolbar .attention-tools > span { margin-left: 3px; white-space: nowrap; }
.watch-search { width: min(260px, 28vw); height: 30px; display: grid; grid-template-columns: 16px 1fr; align-items: center; gap: 6px; padding: 0 8px; border: 1px solid var(--border-strong); border-radius: 2px; background: var(--surface-subtle); }
.watch-search:focus-within { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.watch-search > svg { width: 14px; color: var(--text-secondary); }
.watch-search input { min-width: 0; width: 100%; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12px; }
.watch-search input::placeholder { color: var(--text-tertiary); }
.dashboard-filter-reset { width: 30px; height: 30px; border-color: var(--border-strong); }
.dashboard-filter-reset:disabled { opacity: .4; cursor: default; }
.catalog-controls { min-height: 54px; display: flex; align-items: flex-end; gap: 10px; padding: 8px 12px; border: 1px solid var(--border); border-bottom: 0; background: var(--surface-subtle); }
.catalog-controls label { min-width: 0; display: grid; gap: 3px; }
.catalog-controls label:nth-child(1) { width: 180px; }
.catalog-controls label:nth-child(2) { width: min(240px, 28vw); }
.catalog-controls label:nth-child(3) { width: 170px; }
.catalog-controls label > span { color: var(--text-secondary); font-size: 10px; font-weight: 600; }
.catalog-controls select { width: 100%; height: 30px; padding: 0 28px 0 8px; border: 1px solid var(--border-strong); border-radius: 2px; background: var(--surface); color: var(--text); font: inherit; font-size: 12px; cursor: pointer; }
.catalog-controls select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.filter-reset { flex: 0 0 auto; width: 30px; height: 30px; border-color: var(--border-strong); }
.filter-reset:disabled { opacity: .4; cursor: default; }
.dashboard-mobile-sort { display: none; }
.command-button { min-height: 30px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 2px; background: var(--surface); color: var(--text); font-size: 12px; cursor: pointer; }
.command-button:hover { background: var(--surface-hover); }
.command-button svg { width: 14px; }

.list-column-header, .product-row { display: grid; grid-template-columns: minmax(210px, 1.4fr) minmax(125px, .7fr) minmax(135px, .75fr) minmax(150px, .85fr) minmax(135px, .75fr) 70px; gap: 14px; align-items: center; }
.list-column-header { min-height: 36px; padding: 0 12px; border: 1px solid var(--border); border-bottom: 0; background: var(--surface-subtle); color: var(--text-secondary); font-size: 12px; font-weight: 600; }
.sortable-header button { min-width: 0; height: 35px; display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.sortable-header button:hover, .sortable-header button.active { color: var(--accent); }
.sortable-header button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sortable-header button svg { width: 12px; height: 12px; flex: 0 0 auto; }
.product-list { border: 1px solid var(--border); background: var(--surface); }
.product-list:empty { display: none; }
.product-row { min-height: 60px; padding: 8px 12px; border-bottom: 1px solid var(--border); cursor: pointer; }
.product-row:last-child { border-bottom: 0; }
.product-row:hover { background: var(--surface-hover); }
.product-row.has-update { box-shadow: inset 3px 0 0 var(--accent); background: var(--accent-soft); }
.product-row.has-update:hover { background: color-mix(in srgb, var(--accent-soft) 74%, var(--surface-hover)); }
.product-row:focus-visible, .update-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.product-main { min-width: 0; display: flex; align-items: center; gap: 9px; }
.product-logo { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--logo-color) 18%, transparent); border-radius: 2px; background: var(--logo-bg); color: var(--logo-color); font-size: 10px; font-weight: 600; }
.product-main > div { min-width: 0; }
.product-title { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; }
.product-vendor { display: block; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-secondary); font-size: 11px; }
.version-cell strong, .latest-cell strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.latest-version-line { min-width: 0; display: flex; align-items: center; gap: 7px; }
.latest-version-line strong { min-width: 0; }
.new-update-badge { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 3px; padding: 2px 5px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border)); border-radius: 2px; background: var(--surface); color: var(--accent); font-size: 10px; font-weight: 600; line-height: 1.2; }
.new-update-badge svg { width: 10px; height: 10px; }
.version-cell small, .latest-cell small, .date-value small, .status-cell small { display: block; margin-top: 2px; color: var(--text-secondary); font-size: 11px; }
.date-value { font-size: 13px; }
.status-text { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.status-text::before { content: ""; width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: currentColor; }
.status-text.expired { color: var(--danger); }
.status-text.critical, .status-text.warning { color: var(--warning); }
.status-text.active { color: var(--success); }
.status-text.unknown { color: var(--text-secondary); }
.row-actions { display: flex; justify-content: flex-end; gap: 2px; }
.pin-button, .chevron-button { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 2px; background: transparent; color: var(--text-secondary); cursor: pointer; }
.pin-button:hover, .pin-button.active { border-color: var(--border-strong); background: var(--surface); color: var(--accent); }
.pin-button svg, .chevron-button svg { width: 14px; height: 14px; }
.chevron-button { pointer-events: none; }

.empty-state { min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--border); background: var(--surface); text-align: center; }
.empty-state > svg { width: 22px; margin-bottom: 12px; color: var(--text-tertiary); }
.empty-state strong { font-size: 13px; font-weight: 600; }
.empty-state p { margin: 5px 16px 0; color: var(--text-secondary); font-size: 11px; }
.empty-action { margin-top: 16px; }

.update-column-header, .update-row { display: grid; grid-template-columns: minmax(240px, 1.4fr) minmax(140px, .7fr) minmax(150px, .75fr) minmax(135px, .7fr) 100px; gap: 14px; align-items: center; }
.update-column-header { min-height: 36px; padding: 0 12px; border: 1px solid var(--border); border-bottom: 0; background: var(--surface-subtle); color: var(--text-secondary); font-size: 12px; font-weight: 600; }
.update-list { border: 1px solid var(--border); background: var(--surface); }
.update-row { min-height: 60px; padding: 8px 12px; border-bottom: 1px solid var(--border); cursor: pointer; }
.update-row:last-child { border-bottom: 0; }
.update-row:hover { background: var(--surface-hover); }
.update-series, .latest-date { color: var(--text-secondary); font-size: 13px; }
.latest-version { font-size: 13px; font-weight: 600; }
.update-link { display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; color: var(--accent); font-size: 11px; font-weight: 600; text-decoration: none; }
.update-link:hover { text-decoration: underline; }
.update-link svg { width: 13px; height: 13px; }
.update-link.unavailable { color: var(--text-tertiary); font-weight: 400; }

.settings-panel { max-width: 820px; border: 1px solid var(--border); background: var(--surface); }
.settings-panel > header { min-height: 46px; display: flex; align-items: center; padding: 0 16px; border-bottom: 1px solid var(--border); }
.settings-panel h2 { margin: 0; font-size: 15px; font-weight: 600; }
.settings-list { margin: 0; }
.settings-list > div { min-height: 48px; display: grid; grid-template-columns: 220px 1fr; align-items: center; padding: 0 16px; border-bottom: 1px solid var(--border); }
.settings-list > div:last-child { border-bottom: 0; }
.settings-list dt { color: var(--text-secondary); font-size: 12px; }
.settings-list dd { margin: 0; font-size: 12px; font-weight: 600; }
.info-bar { max-width: 820px; display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--accent-soft); }
.info-bar > svg { width: 17px; color: var(--accent); }
.info-bar p { margin: 0; color: var(--text-secondary); font-size: 11px; line-height: 1.6; }
.info-bar a { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-size: 11px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.info-bar a svg { width: 12px; }

.toast { position: fixed; left: calc(50% + 112px); bottom: 24px; z-index: 70; min-width: 220px; max-width: calc(100% - 32px); padding: 10px 14px; background: var(--text); color: var(--surface); font-size: 12px; text-align: center; box-shadow: var(--shadow); opacity: 0; transform: translate(-50%, 10px); pointer-events: none; transition: .15s ease; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

.auth-dialog { width: min(480px, calc(100% - 32px)); padding: 0; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.auth-dialog::backdrop { background: var(--overlay); }
.auth-dialog form { margin: 0; }
.auth-dialog .dialog-header > div > small { color: var(--accent); font-size: 9px; font-weight: 700; }
.auth-dialog .dialog-header h2 { margin: 2px 0 0; font-size: 17px; }
.auth-dialog-body { padding: 18px 16px; }
.auth-dialog-body > p:first-child { margin: 0 0 18px; color: var(--text-secondary); font-size: 12px; }
.email-field { display: grid; gap: 6px; }
.email-field span { font-size: 11px; font-weight: 600; }
.email-field input { width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 2px; background: var(--surface); color: var(--text); font-size: 13px; outline: none; }
.email-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.email-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.email-help { margin: 10px 0 0; color: var(--text-tertiary); font-size: 10px; line-height: 1.6; }
.email-form-status { min-height: 20px; margin-top: 12px; padding: 7px 9px; font-size: 11px; line-height: 1.5; }
.email-form-status:empty { min-height: 0; margin: 0; padding: 0; }
.email-form-status.pending { background: var(--surface-subtle); color: var(--text-secondary); }
.email-form-status.success { border-left: 3px solid var(--success); background: var(--success-soft); }
.email-form-status.error { border-left: 3px solid var(--danger); background: var(--danger-soft); }
.auth-dialog .dialog-actions { justify-content: space-between; }
.privacy-link { color: var(--text-secondary); font-size: 10px; }
.auth-dialog button:disabled { cursor: wait; opacity: .7; }
.auth-dialog button:disabled svg { animation: email-spin .8s linear infinite; }
.account-summary { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.account-avatar { width: 38px; height: 38px; display: grid; flex: 0 0 auto; place-items: center; border: 1px solid var(--border); background: var(--surface-subtle); color: var(--accent); }
.account-avatar svg { width: 18px; }
.account-summary > div { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.account-summary strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.plan-badge { width: fit-content; padding: 2px 6px; border: 1px solid var(--border); background: var(--surface-subtle); color: var(--text-secondary); font-size: 9px; font-weight: 600; }
.plan-badge.pro { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.account-details { margin: 14px 0 0; border: 1px solid var(--border); }
.account-details > div { min-height: 42px; display: grid; grid-template-columns: 140px 1fr; align-items: center; padding: 0 10px; border-bottom: 1px solid var(--border); }
.account-details > div:last-child { border-bottom: 0; }
.account-details dt { color: var(--text-secondary); font-size: 11px; }
.account-details dd { margin: 0; font-size: 11px; font-weight: 600; text-align: right; }
@keyframes email-spin { to { transform: rotate(360deg); } }

.product-dialog { width: min(500px, 100%); max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; padding: 0; border: 0; border-left: 1px solid var(--border); border-radius: 0; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.product-dialog[open] { display: flex; flex-direction: column; }
.product-dialog::backdrop { background: var(--overlay); }
.dialog-header { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.dialog-product { min-width: 0; display: flex; align-items: center; gap: 10px; }
.dialog-product small { color: var(--text-secondary); font-size: 10px; }
.dialog-product h2 { margin: 2px 0 0; font-size: 17px; font-weight: 600; }
.dialog-body { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 16px; }
.dialog-status { display: flex; justify-content: space-between; gap: 16px; padding: 10px 12px; margin-bottom: 16px; border-left: 3px solid var(--status-color, var(--accent)); background: var(--surface-subtle); }
.dialog-status strong { font-size: 12px; }
.dialog-status span { color: var(--text-secondary); font-size: 11px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 16px; border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.detail-grid div { min-height: 66px; padding: 11px 12px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.detail-grid dt { margin-bottom: 6px; color: var(--text-secondary); font-size: 10px; }
.detail-grid dd { margin: 0; font-size: 12px; font-weight: 600; }
.release-notes-link { display: grid; grid-template-columns: 22px 1fr 16px; align-items: center; gap: 9px; margin-bottom: 16px; padding: 10px 12px; border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.release-notes-link:hover { background: var(--surface-hover); }
.release-notes-link > svg { width: 16px; color: var(--accent); }
.release-notes-link strong, .release-notes-link small { display: block; }
.release-notes-link strong { font-size: 12px; }
.release-notes-link small { margin-top: 2px; color: var(--text-secondary); font-size: 10px; }
.history-section { margin-bottom: 16px; border: 1px solid var(--border); }
.history-section > header { min-height: 42px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; border-bottom: 1px solid var(--border); background: var(--surface-subtle); }
.history-section h3 { margin: 0; font-size: 13px; font-weight: 600; }
.history-section > header span { color: var(--text-secondary); font-size: 11px; }
.history-list { padding: 4px 12px; }
.history-item { display: grid; grid-template-columns: 12px 1fr; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.history-item:last-child { border-bottom: 0; }
.history-marker { width: 7px; height: 7px; margin-top: 6px; border: 2px solid var(--accent); border-radius: 50%; background: var(--surface); }
.history-item header { display: flex; align-items: center; gap: 10px; }
.history-item strong { font-size: 12px; }
.history-item time { color: var(--text-secondary); font-size: 11px; }
.history-item a { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-size: 11px; font-weight: 600; text-decoration: none; }
.history-item a:hover { text-decoration: underline; }
.history-item a svg { width: 12px; }
.history-item p { margin: 4px 0 0; color: var(--text-secondary); font-size: 11px; line-height: 1.6; }
.notification-settings { margin-bottom: 16px; border: 1px solid var(--border); }
.notification-settings > header { display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--surface-subtle); }
.notification-settings > header > svg { width: 18px; color: var(--accent); }
.notification-settings h3 { margin: 0; font-size: 13px; font-weight: 600; }
.notification-settings header p { margin: 2px 0 0; color: var(--text-secondary); font-size: 10px; }
.notification-settings fieldset { margin: 0; padding: 13px 12px 14px; border: 0; border-top: 1px solid var(--border); }
.notification-settings legend { padding: 0; font-size: 12px; font-weight: 600; }
.field-help { margin: 2px 0 10px; color: var(--text-secondary); font-size: 10px; }
.checkbox-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px 14px; }
.checkbox-grid label, .checkbox-list label { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.checkbox-grid label { align-items: center; font-size: 12px; }
.checkbox-grid input, .checkbox-list input { width: 16px; height: 16px; flex: 0 0 auto; margin: 1px 0 0; accent-color: var(--accent); }
.checkbox-list { display: grid; gap: 11px; }
.checkbox-list strong, .checkbox-list small { display: block; }
.checkbox-list strong { font-size: 12px; }
.checkbox-list small { margin-top: 2px; color: var(--text-secondary); font-size: 10px; }
.notification-settings.disabled { opacity: .6; }
.notification-settings.disabled label { cursor: not-allowed; }
.dialog-actions { min-height: 58px; display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--border); background: var(--surface-subtle); }
.primary-button, .secondary-button { min-height: 32px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; border-radius: 2px; font-size: 12px; font-weight: 600; text-decoration: none; cursor: pointer; }
.primary-button { border: 1px solid var(--accent); background: var(--accent); color: #fff; }
.primary-button:hover { background: var(--accent-hover); }
.secondary-button { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); }
.secondary-button:hover { background: var(--surface-hover); }
.primary-button svg, .secondary-button svg { width: 13px; }
.nav-backdrop { display: none; }

@media (max-width: 980px) {
  .app-shell { display: block; }
  .side-nav { position: fixed; left: 0; top: 0; width: 250px; transform: translateX(-100%); box-shadow: var(--shadow); transition: transform .16s ease; }
  .side-nav.open { transform: translateX(0); }
  .nav-backdrop { position: fixed; inset: 0; z-index: 25; background: var(--overlay); }
  .nav-backdrop.visible { display: block; }
  .mobile-menu { display: grid; flex: 0 0 auto; }
  .command-header { padding: 0 14px; }
  .global-search { width: min(620px, calc(100vw - 150px)); }
  main { padding: 20px 20px 56px; }
  .toast { left: 50%; }
}

@media (max-width: 760px) {
  .command-header { gap: 8px; }
  .global-search { width: auto; flex: 1; }
  .global-search kbd { display: none; }
  main { padding: 16px 12px 48px; }
  .page-header { min-height: auto; align-items: flex-start; }
  .page-header h1 { font-size: 21px; line-height: 28px; }
  .page-header p { font-size: 11px; line-height: 1.6; }
  .last-updated { margin-top: 3px; }
  .summary-strip { display: grid; grid-template-columns: 1fr 1fr; }
  .summary-strip > * { min-width: 0; min-height: 42px; border-bottom: 1px solid var(--border); }
  .summary-strip > *:nth-child(2) { border-right: 0; }
  .summary-strip > *:nth-child(n+3) { border-bottom: 0; }
  .section-toolbar { align-items: flex-start; }
  .section-toolbar div > span { display: block; margin: 2px 0 0; }
  #attention-section .section-toolbar { flex-direction: column; align-items: stretch; gap: 8px; }
  .attention-tools { width: 100%; }
  .watch-search { width: auto; flex: 1; }
  .section-toolbar .attention-tools > span { display: inline; margin-left: auto; }
  .catalog-controls { display: grid; grid-template-columns: 1fr 1fr 34px; align-items: end; }
  .catalog-controls label:nth-child(1), .catalog-controls label:nth-child(2), .catalog-controls label:nth-child(3) { width: auto; }
  .catalog-controls label:nth-child(3) { grid-column: 1 / 3; }
  .dashboard-mobile-sort { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border: 1px solid var(--border); border-bottom: 0; background: var(--surface-subtle); }
  .dashboard-mobile-sort label { color: var(--text-secondary); font-size: 11px; font-weight: 600; }
  .dashboard-mobile-sort select { width: min(230px, 65vw); height: 30px; padding: 0 28px 0 8px; border: 1px solid var(--border-strong); border-radius: 2px; background: var(--surface); color: var(--text); font: inherit; font-size: 11px; }
  .list-column-header, .update-column-header { display: none; }
  .product-row { grid-template-columns: 1fr auto; gap: 7px 12px; min-height: 0; padding: 11px 12px; }
  .product-main { grid-column: 1; }
  .row-actions { grid-column: 2; grid-row: 1; }
  .version-cell, .date-value, .status-cell, .latest-cell { grid-column: 1 / -1; display: grid; grid-template-columns: 116px 1fr; align-items: center; padding-left: 39px; font-size: 11px; }
  .version-cell::before { content: "バージョン"; color: var(--text-secondary); }
  .date-value::before { content: "サポート終了"; color: var(--text-secondary); }
  .status-cell::before { content: "状態"; color: var(--text-secondary); }
  .latest-cell::before { content: "最新バージョン"; color: var(--text-secondary); }
  .version-cell small, .date-value small, .status-cell small, .latest-cell small { grid-column: 2; margin-top: 1px; }
  .chevron-button { display: none; }
  .update-row { grid-template-columns: 1fr auto; gap: 7px 12px; padding: 11px 12px; }
  .update-row .product-main { grid-column: 1; }
  .update-series, .latest-version, .latest-date { grid-column: 1; padding-left: 39px; font-size: 11px; }
  .update-link { grid-column: 2; grid-row: 1 / span 4; align-self: center; }
  .settings-list > div { grid-template-columns: 140px 1fr; }
  .info-bar { grid-template-columns: 18px 1fr; }
  .info-bar a { grid-column: 2; }
}

@media (max-width: 480px) {
  .command-header { padding: 0 8px; }
  .header-actions { gap: 0; }
  .global-search { height: 32px; }
  .global-search input { font-size: 12px; }
  .catalog-controls { grid-template-columns: 1fr 30px; gap: 8px; }
  .catalog-controls label:nth-child(1), .catalog-controls label:nth-child(2), .catalog-controls label:nth-child(3) { grid-column: 1 / -1; }
  .catalog-controls .filter-reset { grid-column: 2; grid-row: 4; justify-self: end; }
  .page-header { gap: 10px; }
  .last-updated { max-width: 90px; white-space: normal; text-align: right; }
  .summary-strip > * { padding: 0 10px; font-size: 11px; }
  .summary-strip strong { font-size: 13px; }
  .settings-list > div { grid-template-columns: 1fr; gap: 4px; padding: 10px 12px; }
  .detail-grid { grid-template-columns: 1fr; }
  .checkbox-grid { grid-template-columns: 1fr 1fr; }
  .dialog-actions { flex-direction: column-reverse; align-items: stretch; }
  .primary-button, .secondary-button { width: 100%; }
  .product-dialog { width: 100%; }
}
