.res-page {
  container-type: inline-size;

}
.res-page .page-head .btn.primary {
  color: #fff;
  background: var(--blue-strong);
  border-color: var(--blue-strong);
  border-radius: var(--control-radius);
  min-height: 38px;
  padding-inline: 15px;
}
.res-page .page-head .btn.primary:hover { background: var(--blue-hover); }
.res-page :is(h2,h3,p,dl,dd,ul,ol) { margin: 0; }
.res-page ul, .res-page ol { list-style: none; padding: 0; }
.res-page .badge { padding: 3px 9px; border-radius: var(--radius-pill); font-size: var(--type-caption); font-weight: 620; white-space: nowrap; }
.res-page code, .res-page .mono { overflow-wrap: anywhere; }
.res-page .page-head p { margin-top: 5px; }
.res-toolbar, .res-tabs, .res-search-tools { display: flex; align-items: center; }
.res-toolbar { justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 20px; }
.res-tabs { flex-wrap: wrap; gap: 5px; }
.res-tab { position: relative; cursor: pointer; }
.res-tab input[type=radio] {
  position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; margin: -1px;
  clip-path: inset(50%); overflow: hidden; border: 0;
}
.res-tab > span {
  display: inline-flex; align-items: center; gap: 7px; min-height: 35px; padding: 4px 11px;
  border-radius: var(--radius-pill); font-size: var(--type-ui); font-weight: 600; color: #53607a;
}
.res-tab b, .res-count { font-size: var(--small-label); font-weight: 650; font-variant-numeric: tabular-nums; }
.res-tab b { border-radius: var(--radius-panel); background: #e6e8ef; min-width: 19px; padding-inline: 4px; text-align: center; }
.res-tab:hover input:not(:checked) + span { background: #e9ebf3; }
.res-tab input:checked + span { color: #fff; background: var(--blue-strong); }
.res-tab input:checked + span b { background: #ffffff30; }
.res-tab input:focus-visible + span { outline: 2px solid var(--blue-strong); outline-offset: 3px; }
.res-search-tools { gap: 8px; }
.res-search { display: flex; align-items: center; position: relative; min-width: 0; }
.res-search svg { position: absolute; left: 12px; width: 16px; height: 16px; color: #68748b; pointer-events: none; }

.res-search input[type=search] { width: clamp(215px,20vw,300px); padding-left: 35px; }
.res-search-tools select { width: auto; }
.res-empty {
  background: white; border: 1px solid var(--line); border-radius: var(--radius-panel); min-height: 190px;
  display: grid; place-content: center; justify-items: center; gap: 8px; padding: 20px; text-align: center;
}
.res-empty > svg { width: 24px; height: 24px; color: #76709c; }
.res-empty h2 { font-size: var(--type-subheading); }
.res-device-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(340px,100%),1fr)); gap: 16px; }
.res-device-card { display: flex; flex-direction: column; }
.res-device-card, .res-card, .res-route {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-panel);
  box-shadow: var(--panel-shadow); min-width: 0; overflow: hidden;
}
.res-device-card > header, .res-card > header, .res-route > header,
.res-current-scene, .res-bound-scene, .res-work-list li, .res-device-card footer, .res-view, .res-back {
  display: flex; align-items: center;
}
.res-device-card > header { gap: 12px; padding: 20px; }
.res-device-card > header div { min-width: 0; }
.res-device-card h2 { font-size: 18px; color: var(--ink); }
.res-bound-scene a:hover { color: var(--blue-strong); }
.res-device-card > header p, .res-card > header p, .res-bound-scene small, .res-current-scene small {
  display: block; color: var(--muted); font-size: var(--type-caption);
}
.res-device-card > header .badge, .res-card > header .badge { margin-left: auto; }
.res-device-symbol, .res-section-icon, .res-storage-icon, .res-kind-symbol, .res-route-icon {
  display: grid; place-items: center; flex: none; border-radius: var(--radius-small); background: #eeebfb; color: #6253ad;
}
.res-device-symbol { width: 46px; height: 46px; background: #e8e9fc; color: #594da7; }
.res-device-symbol svg { width: 24px; height: 24px; }
.res-section-icon, .res-storage-icon, .res-route-icon { width: 34px; height: 34px; }
.res-section-icon svg, .res-storage-icon svg, .res-route-icon svg, .res-kind-symbol svg { width: 18px; height: 18px; }
.res-work-line { display: grid; gap: 3px; padding: 0 20px 20px; }
.res-work-line > span { font-size: var(--type-caption); color: var(--muted); }
.res-work-line small { font-size: var(--type-caption); color: var(--muted); }
.res-work-line strong { font-size: 15px; color: var(--ink); font-weight: 590; }
.res-device-card footer { gap: 12px; justify-content: space-between; margin-top: auto; padding: 10px 20px; border-top: 1px solid #e7e9ef; background: #fafafe; }
.res-device-card footer > span, .res-device-card footer a, .res-view, .res-back {
  display: inline-flex; gap: 6px; align-items: center; font-size: var(--type-caption); color: var(--muted);
}
.res-device-card footer svg, .res-view svg, .res-back svg { width: 14px; height: 14px; }
.res-device-card footer a, .res-view { color: var(--blue-strong); font-weight: 620; }
.res-device-card footer a:hover, .res-view:hover, .res-back:hover { text-decoration: underline; }
.res-back { margin-bottom: 10px; }
.res-back svg { transform: rotate(180deg); }
.res-detail-grid, .res-storage-grid { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); gap: 18px; align-items: stretch; }
.res-stack { display: grid; gap: 16px; }
.res-card > header { gap: 11px; padding: 17px 20px; border-bottom: 1px solid #e7e9ef; }
.res-card > header h2, .res-routes > h2 { font-size: 17px; color: var(--ink); }
.res-count { margin-left: auto; padding: 3px 8px; border-radius: var(--radius-pill); color: #5e5288; background: #f0edf9; }
.res-current-scene, .res-bound-scene { gap: 12px; padding: 17px 20px; }
.res-current-scene img, .res-bound-scene img { width: 64px; height: 44px; border-radius: var(--radius-small); flex: none; object-fit: cover; }
.res-current-scene b, .res-bound-scene a { color: var(--ink); font-size: 15px; font-weight: 640; }
.res-kind-symbol { width: 33px; height: 33px; }
.res-current .res-work-list { margin-inline: 20px; }
.res-work-list li { gap: 9px; border-top: 1px solid #eceef3; padding: 12px 0; }
.res-work-list b, .res-work-list small { display: block; }
.res-work-list b { font-size: var(--type-body); }
.res-work-list small { color: var(--muted); font-size: var(--type-caption); }
.res-work-list .res-view { margin-left: auto; }
.res-lease { margin: 0; border: 0; border-top: 1px solid #e9eaf2; background: #fafafe; border-radius: 0; }
.res-lease summary { padding: 10px 20px; cursor: pointer; font-size: var(--type-caption); color: #5a508e; }
.res-lease summary:focus-visible { outline-offset: -3px; }
.res-lease ul { padding: 0 20px 8px; }
.res-lease li, .res-history li { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 16px; padding-block: 7px; font-size: var(--type-caption); color: var(--muted); }
.res-history ul { padding: 6px 20px; }
.res-history li { padding-block: 10px; }
.res-history li + li { border-top: 1px solid #eceef3; }
.res-history strong { color: var(--ink); font-size: var(--type-body); }
.res-history .mono { margin-left: auto; }
.res-inline-empty { padding: 25px 20px; color: var(--muted); font-size: var(--type-ui); }
.res-card .info { padding: 6px 20px 10px; }
.res-card .info > div { grid-template-columns: 85px minmax(0,1fr); align-items: baseline; }
.res-card .info dd { min-width: 0; overflow-wrap: anywhere; }
.res-storage-grid { grid-template-columns: minmax(0,1.18fr) minmax(0,1fr); }
.res-default > header { background: #f8f7fc; }
.res-storage-grid .res-section-icon, .res-storage-icon { width: 42px; height: 42px; }
.res-storage-icon { color: #fff; background: #695fb5; }
.res-config { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 24px; padding: 20px; }
.res-config dt { font-size: var(--type-caption); color: var(--muted); }
.res-config dd { font-size: var(--type-body); color: var(--ink); margin-top: 2px; }
.res-bound-scene { padding-bottom: 8px; }
.res-routes { margin-top: 23px; }
.res-routes > h2 { margin-bottom: 11px; }
.res-routes > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.res-route { padding: 16px 20px; }
.res-route > header { gap: 10px; }
.res-route > header h3 { font-size: var(--type-subheading); }
.res-route:first-child .res-route-icon { color: #39726a; background: #e7f2ef; }
.res-route ol { display: flex; align-items: center; flex-wrap: wrap; margin-block: 13px 9px; }
.res-route li { display: inline-flex; align-items: center; font-size: var(--type-ui); font-weight: 600; color: #424a63; }
.res-route li + li::before { content: "→"; margin-inline: 8px; color: #8a91a2; }
.res-route p { color: var(--muted); font-size: var(--type-ui); }
.res-qualification > header { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 12px 20px; }
.res-qualification + .res-qualification { border-top: 1px solid var(--line); }
.res-qualification h3 { font-size: var(--type-body); overflow-wrap: anywhere; }
.res-qualification .res-view { min-height: 34px; }
.res-qualification table { table-layout: fixed; }
.res-qualification th, .res-qualification td { white-space: normal; overflow-wrap: anywhere; }
.res-qualification tbody th { background: transparent; border-top: 1px solid var(--line); color: var(--ink); font-size: var(--type-ui); }
.res-kind-label { display: none; }
@container (max-width: 760px) {
  .res-detail-grid, .res-storage-grid { grid-template-columns: 1fr; }
  .res-detail-grid { gap: 16px; }
}
@container (max-width: 570px) {
  .res-qualification > header { padding: 8px 15px; background: #f8fafc; }
  .res-qualification thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .res-qualification :is(table, tbody) { display: block; }
  .res-qualification tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px 8px; padding: 10px 15px; border-top: 1px solid var(--line); }
  .res-qualification tbody :is(th, td) { border: 0; padding: 0; }
  .res-qualification tbody th { grid-column: 1 / -1; }
  .res-kind-label { display: block; color: var(--muted); font-size: var(--small-label); }
  .res-device-grid, .res-routes > div { grid-template-columns: minmax(0,1fr); }
  .res-toolbar { align-items: stretch; gap: 11px; }
  .res-search-tools { flex: 1 1 100%; }
  .res-search { flex: 1; }
  .res-search input[type=search] { width: 100%; min-width: 0; }
  .res-page .page-head { flex-wrap: wrap; }
  .res-page .page-head .actions { flex-shrink: 0; }
  .res-card > header, .res-device-card > header { padding: 15px; }
  .res-card .info { padding-inline: 15px; }
  .res-config { padding: 16px; }
  .res-routes { margin-top: 19px; }
}
