.ethos-vault-chamber {
  margin-top: 2.4rem;
  padding: 1.3rem 1.1rem 1.4rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 225, 193, 0.24);
  background: linear-gradient(160deg, rgba(29, 22, 28, 0.72), rgba(62, 44, 53, 0.42));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.ethos-vault-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}

.ethos-vault-head h2 {
  margin: 0;
}

.ethos-vault-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.ethos-vault-controls button {
  border: 1px solid rgba(255, 222, 188, 0.45);
  background: rgba(20, 14, 18, 0.46);
  color: rgba(255, 236, 216, 0.95);
  border-radius: 999px;
  padding: 0.44rem 0.82rem;
  cursor: pointer;
  font-family: 'Manrope', sans-serif;
}

.ethos-vault-controls button:hover {
  background: rgba(8, 5, 8, 0.85);
}

.ethos-vault-status {
  margin: 0 0 1.1rem;
  color: rgba(255, 224, 194, 0.8);
  font-size: 0.93rem;
}

.ethos-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.8rem;
}

.ethos-group-tile {
  border: 1px solid rgba(255, 224, 194, 0.22);
  background: linear-gradient(180deg, rgba(28, 20, 24, 0.66), rgba(18, 14, 18, 0.52));
  border-radius: 14px;
  padding: 0.85rem;
  cursor: pointer;
  display: grid;
  gap: 0.48rem;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.ethos-group-tile:hover,
.ethos-group-tile:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 231, 202, 0.42);
  box-shadow: 0 0 18px rgba(218, 168, 156, 0.22);
  outline: none;
}

.ethos-vault-chamber.is-resonating {
  animation: ethosResonancePulse 940ms ease;
}

.ethos-group-label {
  margin: 0;
  color: rgba(255, 227, 198, 0.62);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.ethos-group-title {
  margin: 0;
  color: rgba(255, 241, 226, 0.95);
  font-size: 1.03rem;
  line-height: 1.28;
}

.ethos-group-path {
  margin: 0;
  color: rgba(227, 211, 205, 0.78);
  font-size: 0.82rem;
  word-break: break-word;
}

.ethos-group-tags {
  margin: 0;
  color: rgba(224, 214, 255, 0.86);
  font-size: 0.8rem;
}

.ethos-group-preview {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255, 225, 197, 0.25);
  background: rgba(18, 12, 16, 0.5);
}

.ethos-group-empty {
  border: 1px dashed rgba(255, 225, 193, 0.28);
  border-radius: 12px;
  padding: 0.8rem;
  color: rgba(255, 224, 194, 0.75);
  font-size: 0.88rem;
}

.ethos-viewer {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
}

.ethos-viewer.is-hidden {
  display: none;
}

.ethos-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 5, 8, 0.75);
  backdrop-filter: blur(5px);
}

.ethos-viewer-panel {
  position: relative;
  width: min(980px, 94vw);
  max-height: 88vh;
  overflow: auto;
  border-radius: 16px;
  border: 1px solid rgba(255, 225, 193, 0.3);
  background: linear-gradient(160deg, rgba(30, 22, 28, 0.94), rgba(15, 11, 17, 0.92));
  padding: 1rem;
  box-shadow: 0 28px 48px rgba(0, 0, 0, 0.35);
}

.ethos-viewer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
}

.ethos-viewer-head h3 {
  margin: 0;
}

.ethos-viewer-head button {
  border: 1px solid rgba(255, 221, 189, 0.46);
  color: rgba(255, 239, 223, 0.95);
  background: rgba(23, 16, 22, 0.5);
  border-radius: 999px;
  padding: 0.42rem 0.76rem;
  cursor: pointer;
}

.ethos-viewer-meta {
  margin: 0.55rem 0;
  color: rgba(240, 227, 216, 0.86);
  font-size: 0.9rem;
}

.ethos-viewer-layout {
  display: grid;
  grid-template-columns: minmax(260px, 380px) 1fr;
  gap: 1rem;
}

.ethos-viewer-image {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(255, 225, 196, 0.26);
  background: rgba(10, 8, 12, 0.65);
}

.ethos-viewer-copy p {
  margin: 0.5rem 0;
  color: rgba(250, 239, 228, 0.9);
}

.ethos-viewer-copy a {
  color: rgba(238, 214, 181, 0.96);
}

.ethos-viewer-variants {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 0.45rem;
}

.ethos-variant-btn {
  border: 1px solid rgba(255, 222, 190, 0.3);
  border-radius: 8px;
  background: rgba(22, 16, 21, 0.6);
  color: rgba(248, 232, 213, 0.9);
  padding: 0.32rem 0.4rem;
  font-size: 0.78rem;
  cursor: pointer;
}

.ethos-variant-btn.is-active {
  border-color: rgba(255, 230, 203, 0.55);
  background: rgba(101, 71, 85, 0.44);
}

@media (max-width: 820px) {
  .ethos-viewer-layout {
    grid-template-columns: 1fr;
  }
}

@keyframes ethosResonancePulse {
  0% {
    box-shadow: 0 0 0 rgba(180, 151, 206, 0);
    transform: translateY(0);
  }
  42% {
    box-shadow: 0 0 26px rgba(182, 159, 214, 0.34);
    transform: translateY(-1px);
  }
  100% {
    box-shadow: 0 0 0 rgba(180, 151, 206, 0);
    transform: translateY(0);
  }
}
