:root {
  --card-bg: rgba(255, 255, 255, 0.1);
  --border-color: rgba(255, 255, 255, 0.2);
  --card-radius: 12px;
}

.jduk-stories {
  position: relative;
}
.jduk-stories * {
  box-sizing: border-box;
}

.mute {
  opacity: 0.65;
}

.jduk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

body.jduk-modal-open {
  overflow: hidden;
}

.jduk-hero {
  margin-bottom: 0.5rem;
}
.jduk-hero__description {
  margin: 0 0 20px;
  max-width: 100ch;
}
.jduk-hero__cta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}
.jduk-hero__divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 0 0 16px;
}
.jduk-hero__count {
  margin: 0;
}

.jduk-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}
@media (max-width: 900px) {
  .jduk-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .jduk-grid {
    grid-template-columns: 1fr;
  }
}

.jduk-grid__sentinel {
  height: 1px;
}

.jduk-card {
  position: relative;
  padding: 24px;
  border-radius: var(--card-radius);
  background: var(--card-bg);
  display: flex;
  flex-direction: column;
}
.jduk-card--own {
  border-width: 2px;
}
.jduk-card__badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  font-size: 0.75rem;
}
.jduk-card__author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.jduk-card__author-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.jduk-card__author-link:hover, .jduk-card__author-link:focus-visible {
  text-decoration: underline;
}
.jduk-card__avatar {
  border-radius: 50%;
}
.jduk-card__author-info {
  display: flex;
  flex-direction: column;
}
.jduk-card__name {
  line-height: 1.2;
  font-size: 1.143em;
}
.jduk-card__handle {
  font-size: 0.875em;
}
.jduk-card__title {
  margin: 0 0 0.5rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}
.jduk-card__excerpt {
  margin: 0 0 1rem;
  flex-grow: 1;
}
.jduk-card__actions {
  display: flex;
  gap: 0.5rem;
}

.jduk-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.jduk-modal[hidden] {
  display: none;
}
.jduk-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.jduk-modal__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: min(640px, 100%);
  max-height: 100%;
}
.jduk-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  padding: 32px;
  border-radius: var(--card-radius);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(20px);
}
.jduk-modal__loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.jduk-modal__loading[hidden] {
  display: none;
}
.jduk-modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  flex: none;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: inherit;
  cursor: pointer;
  min-height: unset;
  padding: 0;
}
.jduk-modal__close svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
}
.jduk-modal__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.25rem 1rem;
  min-height: unset;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: inherit;
  cursor: pointer;
  font: inherit;
}
.jduk-modal__back svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
}
.jduk-modal__nav {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 12px;
  padding: 0;
  min-height: unset;
}
.jduk-modal__nav:disabled {
  visibility: hidden;
}
.jduk-modal__nav svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
}
@media (max-width: 768px) {
  .jduk-modal {
    padding: 1rem;
  }
  .jduk-modal__dialog {
    padding: 1rem;
  }
  .jduk-modal__nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    margin: 0;
    transform: translateY(-50%);
  }
  .jduk-modal__nav--prev {
    left: 8px;
  }
  .jduk-modal__nav--next {
    right: 8px;
  }
}

.jduk-modal--view .jduk-modal__dialog {
  width: min(760px, 100%);
}

.jduk-modal__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}
.jduk-modal__header h3 {
  margin: 0;
}

.jduk-form__field {
  margin-bottom: 24px;
  border: 0;
  padding: 0;
  min-width: 0;
}
.jduk-form__field > label, .jduk-form__field > legend {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  font-weight: 600;
}
.jduk-form input[type=text] {
  width: 100%;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: inherit;
  font: inherit;
}
.jduk-form .desc {
  display: block;
  margin-top: 8px;
  margin-bottom: 0;
  font-size: 0.875rem;
}

.jduk-js-editor-wrap {
  overflow: hidden;
}

.jduk-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.jduk-photos__add {
  width: 100px;
  height: 100px;
  border-radius: calc(var(--card-radius) / 1.5);
  border: 1px dashed var(--border-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: inherit;
  background: transparent;
}

.jduk-photo-item {
  width: 100px;
}
.jduk-photo-item__media {
  position: relative;
  width: 100px;
  height: 100px;
  overflow: hidden;
  border-radius: calc(var(--card-radius) / 1.5);
  border: 1px solid var(--border-color);
}
.jduk-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.jduk-photo-item__caption {
  display: block;
  width: 100%;
  margin-top: 6px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  font-size: 0.7rem;
  background: transparent;
  color: inherit;
}
.jduk-photo-item__remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  line-height: 1;
  border-radius: 50%;
  border: none;
  background: var(--card-bg);
  color: inherit;
  cursor: pointer;
}
.jduk-photo-item--loading .jduk-photo-item__media {
  display: flex;
  align-items: center;
  justify-content: center;
}

.jduk-spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 2px solid var(--border-color);
  border-top-color: transparent;
  border-radius: 50%;
  animation: jduk-spin 0.8s linear infinite;
}

@keyframes jduk-spin {
  to {
    transform: rotate(360deg);
  }
}
.jduk-view__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.jduk-view__title {
  margin: 0 0 8px;
}
.jduk-view__address {
  margin: 0 0 20px;
}
.jduk-view__photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 600px) {
  .jduk-view__photos {
    grid-template-columns: 1fr;
  }
}
.jduk-view__photo {
  margin: 0;
}
.jduk-view__photo img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: calc(var(--card-radius) / 1.5);
  cursor: zoom-in;
  display: block;
  margin-bottom: 8px;
}
.jduk-view__content {
  line-height: 1.7;
}
.jduk-view__content p {
  margin: 0 0 16px;
}

a.jduk-btn.button.jduk-js-view-message {
  min-height: initial;
  padding: 4px 12px;
  line-height: 1.5;
}

.jduk-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.jduk-lightbox[hidden] {
  display: none;
}
.jduk-lightbox__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.jduk-lightbox__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  max-height: 100%;
}
.jduk-lightbox__image {
  max-width: 100%;
  max-height: 80vh;
  border-radius: calc(var(--card-radius) / 1.5);
  display: block;
}
.jduk-lightbox__caption {
  margin: 0;
  text-align: center;
}
@media (max-width: 768px) {
  .jduk-lightbox {
    padding: 1rem;
  }
}
