#aihub-control-center-layer {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  justify-items: end;
  background: rgb(17 17 17 / 36%);
}

#aihub-control-center-layer.hidden {
  display: none;
}

.aihub-control-center-panel {
  width: min(420px, calc(100vw - 32px));
  height: 100%;
  padding: 22px;
  overflow: auto;
  color: #24221f;
  background: #fffaf2;
  box-shadow: -12px 0 32px rgb(30 26 20 / 14%);
}

.aihub-control-center-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.aihub-control-center-header h2 {
  margin: 0;
  font-size: 20px;
}

.aihub-control-center-header button,
.aihub-control-center-action {
  border: 1px solid #d8d3c9;
  border-radius: 12px;
  color: inherit;
  background: #fff;
  cursor: pointer;
}

.aihub-control-center-header button {
  min-height: 36px;
  padding: 0 12px;
}

.aihub-control-center-summary {
  margin: 0 0 20px;
  color: #6f685e;
  line-height: 1.6;
}

.aihub-control-center-actions {
  display: grid;
  gap: 10px;
}

.aihub-control-center-action {
  min-height: 44px;
  padding: 10px 14px;
  text-align: left;
}

.aihub-control-center-link {
  display: inline-flex;
  margin-top: 20px;
  color: #5b3fa3;
  font-weight: 600;
}

.aihub-control-center-panel :focus-visible {
  outline: 3px solid #805ad5;
  outline-offset: 3px;
}

body.aihub-control-center-open {
  overflow: hidden;
}

@media (max-width: 680px) {
  #aihub-control-center-layer {
    align-items: end;
    justify-items: stretch;
  }

  .aihub-control-center-panel {
    width: 100%;
    height: auto;
    max-height: min(78dvh, 660px);
    padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -12px 32px rgb(30 26 20 / 14%);
  }
}

@media (prefers-reduced-motion: reduce) {
  #aihub-control-center-layer,
  .aihub-control-center-panel {
    animation: none;
    transition: none;
  }
}

@media (forced-colors: active) {
  .aihub-control-center-panel {
    border: 1px solid CanvasText;
    box-shadow: none;
  }
}
