#panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: transparent;
}

.panel-sheet {
  width: 100%;
  max-width: 560px;
  min-height: 160px;
  max-height: 70%;
  overflow-y: auto;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: cos-rise 0.18s ease-out;
}

.panel-title {
  margin: 0 0 var(--space-3);
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  font-weight: 600;
}

.cc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: var(--space-3);
}

.cc-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
  min-height: 88px;
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.cc-tile[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-contrast);
}

.cc-tile:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cc-icon {
  display: inline-flex;
  margin-bottom: var(--space-1);
}

.cc-label {
  font-weight: 600;
}

.cc-state {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.cc-tile[aria-pressed="true"] .cc-state {
  color: inherit;
  opacity: 0.85;
}

@media (prefers-reduced-motion: reduce) {
  .panel-sheet {
    animation: none;
  }
}
