.cpe-events-wrap {
  --cpe-text: #1f1f1f;
  --cpe-muted: #6e6e6e;
  --cpe-line: #e5e3df;
  --cpe-bg: #fffaf3;
  --cpe-accent: #236b4c;
  color: var(--cpe-text);
}

.cpe-note {
  margin: 0 0 12px;
  color: var(--cpe-muted);
  font-size: 0.9rem;
}

.cpe-events {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--cpe-line);
}

.cpe-event {
  border-bottom: 1px solid var(--cpe-line);
}

.cpe-open {
  display: grid;
  grid-template-columns: 7.5rem 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 14px 10px;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: background 150ms ease, transform 150ms ease;
}

.cpe-open:hover {
  background: var(--cpe-bg);
  transform: translateY(-1px);
}

.cpe-open:focus-visible {
  outline: 2px solid var(--cpe-accent);
  outline-offset: 2px;
}

.cpe-open::after {
  content: '›';
  color: var(--cpe-muted);
  font-size: 1.2rem;
  line-height: 1;
  margin-left: 6px;
}

.cpe-date {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.cpe-title {
  font-weight: 600;
}

.cpe-category {
  font-size: 0.85rem;
  color: var(--cpe-accent);
  border: 1px solid var(--cpe-accent);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.cpe-empty {
  padding: 14px 10px;
  color: var(--cpe-muted);
}

.cpe-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.cpe-modal.is-open {
  display: flex;
}

.cpe-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.55);
  animation: cpe-fade-in 160ms ease-out;
}

.cpe-modal-card {
  position: relative;
  background: #fff;
  max-width: 720px;
  width: calc(100% - 32px);
  border-radius: 16px;
  padding: 20px 20px 24px;
  max-height: min(80vh, 720px);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  animation: cpe-rise-in 220ms ease-out;
  display: flex;
  flex-direction: column;
}

.cpe-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.cpe-modal-head {
  padding-right: 30px;
}

.cpe-modal-date {
  color: var(--cpe-muted);
  font-size: 0.95rem;
}

.cpe-modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 6px;
}

.cpe-modal-category {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--cpe-accent);
  border: 1px solid var(--cpe-accent);
  padding: 2px 8px;
  border-radius: 999px;
}

.cpe-modal-body {
  margin-top: 18px;
  display: grid;
  gap: 14px;
  overflow: auto;
  padding-right: 4px;
  padding-bottom: 6px;
  min-height: 0;
}

.cpe-modal-section {
  display: grid;
  gap: 6px;
}

.cpe-modal-label {
  font-size: 0.82rem;
  color: var(--cpe-muted);
  letter-spacing: 0.08em;
}

.cpe-modal-text {
  font-size: 0.98rem;
}

.cpe-modal-desc {
  white-space: pre-line;
}

.cpe-modal-fees {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cpe-modal-fees li + li {
  margin-top: 4px;
}

.cpe-hidden {
  display: none;
}

.cpe-modal-open {
  overflow: hidden;
}

@keyframes cpe-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes cpe-rise-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .cpe-open {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .cpe-category {
    justify-self: start;
  }
}
