.credit-tip {
  display: inline;
  margin: 0;
  padding: 0 1px;
  border-bottom: 0;
  color: inherit;
  font: inherit;
  font-weight: 600;
  line-height: inherit;
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
  cursor: pointer;
}

.credit-tip:hover {
  text-decoration-color: transparent;
  color: var(--accent);
}

.credit-tip:focus-visible {
  border-radius: 4px;
}

.credit-layer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.credit-layer[hidden] {
  display: none;
}

html.credit-open,
html.credit-open body {
  overflow: hidden;
}

.credit-layer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 14, 32, 0.46);
}

.credit-panel {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  width: 100%;
  max-height: calc(100dvh - 12px);
  overflow: auto;
  margin: 0;
  padding: 22px 44px 28px 20px;
  border: 1px solid rgba(196, 176, 230, 0.45);
  border-radius: 22px 22px 0 0;
  background: #fffcff;
  color: #3c3948;
  box-shadow: 0 -16px 40px rgba(40, 20, 70, 0.16);
}

.credit-panel h2 {
  max-width: 16em;
  color: #14121a;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.credit-panel p {
  margin-top: 10px;
  color: #6f6a7c;
  font-size: 0.95rem;
  line-height: 1.45;
}

.credit-panel__list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.credit-panel__list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #3c3948;
  font-size: 0.95rem;
  line-height: 1.4;
}

.credit-panel__list svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: #6b3fd4;
}

.credit-panel__note {
  color: #6f6a7c;
}

.credit-panel__close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #3c3948;
  background: rgba(107, 63, 212, 0.08);
}

.credit-panel__close svg {
  width: 14px;
  height: 14px;
}

.credit-panel__close:hover {
  background: rgba(107, 63, 212, 0.16);
}

@media (prefers-reduced-motion: no-preference) {
  .credit-layer__backdrop,
  .credit-panel {
    transition: opacity 200ms var(--ease), transform 200ms var(--ease);
  }

  .credit-layer:not(.is-open) .credit-layer__backdrop {
    opacity: 0;
  }

  .credit-layer:not(.is-open) .credit-panel {
    opacity: 0;
    transform: translateY(16px);
  }
}

@media (min-width: 768px) {
  .credit-layer {
    pointer-events: none;
  }

  .credit-layer__backdrop {
    display: none;
  }

  .credit-panel {
    pointer-events: auto;
    position: fixed;
    right: auto;
    bottom: auto;
    width: min(360px, calc(100vw - 32px));
    max-height: min(420px, calc(100vh - 24px));
    padding: 20px 44px 18px 18px;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(40, 20, 70, 0.16);
  }
}

[data-theme="dark"] .credit-panel {
  border-color: rgba(214, 186, 240, 0.28);
  background: #24182f;
  color: #f4eefb;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.36);
}

[data-theme="dark"] .credit-panel h2,
[data-theme="dark"] .credit-panel__list li,
[data-theme="dark"] .credit-panel__close {
  color: #f7f4fb;
}

[data-theme="dark"] .credit-panel p,
[data-theme="dark"] .credit-panel__note {
  color: rgba(236, 224, 248, 0.78);
}

[data-theme="dark"] .credit-panel__list svg {
  color: #c4b0ff;
}

[data-theme="dark"] .credit-panel__close {
  background: rgba(167, 139, 250, 0.16);
}
