.device-tabs-compact {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px;
  scrollbar-width: none;
}

.device-tabs-compact::-webkit-scrollbar {
  display: none;
}

.device-tabs-compact .device-button {
  flex: 0 0 auto;
}

.device-profile-screen {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.device-hero,
.device-panel {
  border: 1px solid rgba(110, 112, 153, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 34px rgba(38, 37, 63, 0.08);
}

.device-hero {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.device-hero-main {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.device-hero-icon .device-button {
  width: 68px;
  height: 68px;
  border-radius: 18px;
}

.device-hero-icon .device-button img {
  width: 44px;
  height: 44px;
}

.device-hero-copy {
  min-width: 0;
}

.device-hero-copy h2 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  line-height: 1.1;
  font-weight: 900;
}

.device-hero-copy p {
  margin: 6px 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.device-hero-tags,
.device-filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.device-summary-groups {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.device-summary-groups > div {
  display: grid;
  gap: 6px;
}

.device-summary-groups > div > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 880;
}

.device-edit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.device-edit-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.device-edit-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.device-edit-grid input,
.device-edit-grid textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(110, 112, 153, 0.18);
  border-radius: 14px;
  padding: 10px 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  font-weight: 760;
}

.device-edit-grid textarea {
  min-height: 72px;
  resize: vertical;
}

.device-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.device-panel {
  min-width: 0;
  padding: 14px;
}

.device-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.device-panel-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
}

.device-panel-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
}

.compact-todo {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.compact-todo li {
  position: relative;
  padding-left: 14px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 760;
}

.compact-todo li::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--indigo);
}

.manual-row {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  gap: 8px;
  align-items: center;
}

.manual-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.manual-row strong {
  min-height: 30px;
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--text);
  background: rgba(245, 246, 252, 0.92);
  font-size: 12px;
  font-weight: 850;
}

.device-link-list,
.setting-review-list {
  display: grid;
  gap: 8px;
}

.device-link-chip {
  display: grid;
  gap: 2px;
  min-height: 42px;
  border: 1px solid rgba(110, 112, 153, 0.16);
  border-radius: 12px;
  padding: 8px 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.62);
  text-decoration: none;
}

.device-link-chip strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 880;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-link-chip small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 740;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-link-list .link-row {
  min-height: 38px;
  border: 1px solid rgba(110, 112, 153, 0.16);
  border-radius: 12px;
  padding: 0 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  font-weight: 800;
}

.device-review-filter {
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.device-review-filter::-webkit-scrollbar {
  display: none;
}

.device-review-filter-chip {
  flex: 0 0 auto;
  min-height: 30px;
  border: 1px solid rgba(110, 112, 153, 0.16);
  border-radius: 999px;
  padding: 0 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.64);
  font-size: 12px;
  font-weight: 850;
}

.device-review-filter-chip.is-selected {
  color: #fff;
  background: var(--primary);
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(75, 70, 219, 0.18);
}

.device-review-filter-chip.orange.is-selected {
  background: var(--orange);
}

.device-review-filter-chip.brown.is-selected {
  background: var(--brown);
}

.device-review-filter-chip.violet.is-selected {
  background: var(--violet);
}

.setting-review-list div {
  display: grid;
  gap: 2px;
  border: 1px solid rgba(110, 112, 153, 0.14);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.58);
}

.setting-review-list strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 880;
}

.setting-review-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 740;
}

.device-chat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.device-chat input {
  min-height: 38px;
}

@media (max-width: 780px) {
  .device-detail-grid,
  .device-edit-grid {
    grid-template-columns: 1fr;
  }

  .device-hero,
  .device-panel {
    border-radius: 16px;
  }
}

@media (max-width: 520px) {
  .device-tabs-compact {
    padding: 10px;
  }

  .device-hero {
    padding: 14px;
  }

  .device-hero-main {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
  }

  .device-hero-icon .device-button {
    width: 58px;
    height: 58px;
    border-radius: 16px;
  }

  .device-hero-icon .device-button img {
    width: 36px;
    height: 36px;
  }

  .device-hero-copy h2 {
    font-size: 21px;
  }

  .manual-row {
    grid-template-columns: auto 1fr;
  }

  .device-chat {
    grid-template-columns: 1fr;
  }
}
