body:has(.glasses-shell) {
  min-width: 0;
  overflow: hidden;
  background: #000;
}

.glasses-shell {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 8px;
  width: min(100vw, 600px);
  height: min(100vh, 600px);
  min-height: 0;
  margin: 0 auto;
  padding: 14px;
  overflow: hidden;
  background: #050706;
  color: #f4f1e9;
}

.glasses-header,
.glasses-status-row,
.glasses-card-head,
.glasses-actions,
.glasses-footer,
.glasses-tabs,
.glasses-room-strip {
  display: flex;
  align-items: center;
}

.glasses-header {
  justify-content: space-between;
  gap: 12px;
}

.glasses-kicker,
.glasses-status-row,
.glasses-card-head small,
.glasses-meta dt,
.glasses-footer {
  color: #a8afa6;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.glasses-header h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1;
}

.glasses-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 8px;
}

.glasses-status-row {
  justify-content: space-between;
  gap: 8px;
}

.glasses-status-row strong {
  color: #6cb087;
}

.glasses-error {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(224, 100, 75, 0.45);
  border-radius: 8px;
  background: rgba(224, 100, 75, 0.12);
  color: #ffb4a4;
  font-size: 12px;
}

.glasses-tabs {
  gap: 6px;
  min-width: 0;
}

.glasses-tabs button,
.glasses-actions button,
.glasses-room-strip button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #f4f1e9;
  white-space: nowrap;
}

.glasses-tabs button:hover:not(:disabled),
.glasses-actions button:hover:not(:disabled),
.glasses-room-strip button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
}

.glasses-tabs button {
  flex: 1;
}

.glasses-tabs button.is-active,
.glasses-tabs button[aria-pressed='true'],
.glasses-actions button.is-active,
.glasses-actions button[aria-pressed='true'],
.glasses-room-strip button.is-active,
.glasses-room-strip button[aria-pressed='true'] {
  border-color: rgba(232, 152, 112, 0.72);
  background: rgba(214, 130, 88, 0.2);
  color: #fff4ec;
}

.glasses-tabs button.is-active:hover:not(:disabled),
.glasses-tabs button[aria-pressed='true']:hover:not(:disabled),
.glasses-actions button.is-active:hover:not(:disabled),
.glasses-actions button[aria-pressed='true']:hover:not(:disabled),
.glasses-room-strip button.is-active:hover:not(:disabled),
.glasses-room-strip button[aria-pressed='true']:hover:not(:disabled) {
  background: rgba(214, 130, 88, 0.26);
}

.glasses-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #111512;
  padding: 12px;
}

.glasses-card-head {
  justify-content: space-between;
  gap: 10px;
}

.glasses-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 24px;
  padding: 0 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #d7ded2;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.glasses-pill.sev-error {
  border-color: rgba(224, 100, 75, 0.5);
  color: #ffb4a4;
}

.glasses-pill.sev-warn {
  border-color: rgba(212, 160, 74, 0.5);
  color: #ffd38b;
}

.glasses-queue-card h2 {
  margin: 0;
  overflow: hidden;
  font-size: 22px;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.glasses-queue-card p {
  display: -webkit-box;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  color: #d2d5ce;
  font-size: 14px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.glasses-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
}

.glasses-meta div {
  min-width: 0;
}

.glasses-meta dt,
.glasses-meta dd {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.glasses-meta dd {
  margin: 2px 0 0;
  color: #f4f1e9;
  font-size: 13px;
}

.glasses-actions {
  gap: 6px;
  min-width: 0;
}

.glasses-actions button {
  flex: 1;
  min-width: 0;
  padding: 0 10px;
}

.glasses-empty {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 220px;
  color: #a8afa6;
  text-align: center;
}

.glasses-empty strong {
  color: #f4f1e9;
  font-size: 24px;
}

.glasses-voice-card textarea {
  width: 100%;
  min-height: 126px;
  resize: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #f4f1e9;
  font: inherit;
  font-size: 18px;
  line-height: 1.35;
  padding: 10px;
}

.glasses-voice-card textarea:focus-visible {
  border-color: #d68258;
  outline: 2px solid rgba(214, 130, 88, 0.2);
}

.glasses-room-strip {
  gap: 6px;
  overflow: hidden;
}

.glasses-room-strip button {
  min-width: 0;
  max-width: 50%;
  overflow: hidden;
  padding: 0 10px;
  text-overflow: ellipsis;
}

.glasses-footer {
  min-height: 18px;
  justify-content: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .glasses-shell {
    width: 100vw;
    height: 100vh;
  }
}
