.fwg-shell {
  --fwg-bg: #fffaf4;
  --fwg-surface: #ffffff;
  --fwg-border: #e9dacb;
  --fwg-text: #2d241f;
  --fwg-muted: #73645a;
  --fwg-accent: #b76e5d;
  --fwg-accent-dark: #8d4d3e;
  --fwg-success-bg: #e7f7ee;
  --fwg-success-text: #1f5a37;
  --fwg-error-bg: #fff0ef;
  --fwg-error-text: #8f2f2b;
  background: linear-gradient(180deg, #fffaf4 0%, #fffefc 100%);
  border: 1px solid var(--fwg-border);
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(65, 43, 32, 0.08);
  color: var(--fwg-text);
  margin: 0 auto 24px;
  padding: 20px;
}

.fwg-upload {
  background: #f7f0ea;
  border: 0;
  border-radius: 32px;
  box-shadow: none;
  max-width: 980px;
  padding: 48px 16px 28px;
}

.fwg-upload__header {
  margin: 0 auto 28px;
  max-width: 760px;
  text-align: center;
}

.fwg-upload__card {
  background: #fff;
  border-radius: 30px;
  box-shadow: 0 22px 54px rgba(93, 70, 55, 0.12);
  margin: 0 auto;
  max-width: 830px;
  padding: 28px;
}

.fwg-wall {
  display: grid;
  gap: 24px;
}

.fwg-kicker {
  color: var(--fwg-accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.fwg-title {
  font-size: clamp(2.9rem, 8vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin: 0 0 10px;
}

.fwg-copy {
  color: #4d4038;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  margin: 0;
  max-width: none;
}

.fwg-form {
  display: grid;
  gap: 18px;
}

.fwg-field {
  display: grid;
  gap: 10px;
}

.fwg-label {
  color: #382f2b;
  font-size: 1rem;
  font-weight: 700;
}

.fwg-input {
  appearance: none;
  background: var(--fwg-surface);
  border: 1px solid #ede7e2;
  border-radius: 18px;
  color: var(--fwg-text);
  font: inherit;
  font-size: 1.05rem;
  min-height: 84px;
  padding: 0 18px;
  width: 100%;
}

.fwg-input:focus {
  border-color: #d3b2a7;
  box-shadow: 0 0 0 3px rgba(183, 110, 93, 0.1);
  outline: none;
}

.fwg-input--file {
  height: 1px;
  left: -9999px;
  opacity: 0;
  padding: 0;
  position: absolute;
  width: 1px;
}

.fwg-dropzone {
  align-items: center;
  background: #fbf8f6;
  border: 2px dashed #d7beb2;
  border-radius: 22px;
  cursor: pointer;
  display: grid;
  gap: 4px;
  justify-items: center;
  min-height: 118px;
  padding: 18px 20px;
  text-align: center;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    transform 0.2s ease;
}

.fwg-dropzone:hover,
.fwg-dropzone:focus-within,
.fwg-dropzone.is-dragover {
  border-color: #bd9787;
  background: #fffaf6;
  transform: translateY(-1px);
}

.fwg-dropzone__title {
  color: #3c302a;
  font-size: 1rem;
  font-weight: 800;
}

.fwg-dropzone__copy,
.fwg-dropzone__filename {
  color: #75675f;
  font-size: 0.95rem;
}

.fwg-dropzone__filename {
  font-weight: 500;
}

.fwg-help {
  color: #8d7c72;
  font-size: 0.85rem;
  margin: 2px 4px 0;
  text-align: center;
}

.fwg-trap {
  height: 0;
  left: -9999px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  pointer-events: none;
  top: auto;
  width: 1px;
}

.fwg-button {
  align-items: center;
  background: #ab7a69;
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: inline-grid;
  font: inherit;
  font-weight: 700;
  justify-content: center;
  justify-items: center;
  min-height: 58px;
  padding: 0 22px;
  position: relative;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
  width: 100%;
}

.fwg-button__label,
.fwg-button__spinner {
  grid-area: 1 / 1;
}

.fwg-button__label {
  transition: opacity 0.2s ease;
}

.fwg-button__spinner {
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  border-top-color: #fff;
  height: 18px;
  opacity: 0;
  transition: opacity 0.2s ease;
  width: 18px;
}

.fwg-button:hover,
.fwg-button:focus {
  background: #966655;
  outline: none;
  transform: translateY(-1px);
}

.fwg-button.is-loading {
  cursor: wait;
  pointer-events: none;
}

.fwg-button.is-loading .fwg-button__label {
  opacity: 0;
}

.fwg-button.is-loading .fwg-button__spinner {
  animation: fwg-spin 0.8s linear infinite;
  opacity: 1;
}

.fwg-notice {
  border-radius: 18px;
  margin: 0 0 18px;
  padding: 14px 16px;
}

.fwg-notice p {
  margin: 0;
}

.fwg-notice--success {
  background: var(--fwg-success-bg);
  color: var(--fwg-success-text);
}

.fwg-notice--error {
  background: var(--fwg-error-bg);
  color: var(--fwg-error-text);
}

.fwg-gallery {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.fwg-gallery__header {
  margin-bottom: 20px;
}

.fwg-gallery__grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fwg-gallery__item {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--fwg-border);
  border-radius: 18px;
  overflow: hidden;
}

.fwg-gallery__trigger {
  display: block;
  text-decoration: none;
}

.fwg-gallery__image {
  aspect-ratio: 1 / 1;
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.fwg-gallery__meta {
  display: grid;
  gap: 6px;
  padding: 12px 14px 14px;
}

.fwg-gallery__caption {
  color: var(--fwg-muted);
  font-size: 0.9rem;
  margin: 0;
}

.fwg-empty {
  background: rgba(255, 255, 255, 0.7);
  border: 1px dashed var(--fwg-border);
  border-radius: 18px;
  padding: 18px;
}

.fwg-empty p {
  color: var(--fwg-muted);
  margin: 0;
}

.fwg-pagination {
  margin-top: 22px;
}

.fwg-pagination ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.fwg-pagination ul li {
  display: flex;
}

.fwg-pagination a,
.fwg-pagination span {
  background: #fff;
  border: 1px solid var(--fwg-border);
  border-radius: 999px;
  color: var(--fwg-text);
  display: inline-flex;
  min-width: 42px;
  justify-content: center;
  padding: 10px 14px;
  text-decoration: none;
}

.fwg-pagination a.next,
.fwg-pagination a.prev {
  font-size: 0;
  background: transparent;
  padding: 0;
  border: none;
}

.fwg-pagination a svg {
  height: 28px;
}

.fwg-pagination .current {
  background: var(--fwg-accent);
  border-color: var(--fwg-accent);
  color: #fff;
}

.fwg-lightbox[hidden] {
  display: none;
}

.fwg-lightbox {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 9999;
}

.fwg-lightbox__overlay {
  background: rgba(24, 15, 11, 0.82);
  inset: 0;
  position: absolute;
}

.fwg-lightbox__dialog {
  background: rgba(12, 8, 6, 0.96);
  border-radius: 22px;
  max-height: min(96vh, 1200px);
  max-width: min(96vw, 1280px);
  overflow: hidden;
  position: relative;
  width: 100%;
  z-index: 1;
}

.fwg-lightbox__nav,
.fwg-lightbox__close {
  align-items: center;
  background: rgba(255, 255, 255, 0.16);
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 1.6rem;
  height: 42px;
  justify-content: center;
  position: absolute;
  right: 14px;
  top: 14px;
  width: 42px;
  z-index: 2;
}

.fwg-lightbox__nav {
  font-size: 2rem;
  height: 48px;
  position: absolute;
  top: calc(50% - 24px);
  width: 48px;
}

.fwg-lightbox__nav--prev {
  left: 14px;
}

.fwg-lightbox__nav--next {
  right: 14px;
}

.fwg-lightbox__image {
  background: transparent;
  display: block;
  max-height: 82vh;
  object-fit: contain;
  width: 100%;
}

.fwg-lightbox__meta {
  display: grid;
  gap: 8px;
  padding: 16px 18px 20px;
}

.fwg-lightbox__caption,
.fwg-lightbox__count {
  margin: 0;
}

.fwg-lightbox__caption,
.fwg-lightbox__count {
  color: rgba(255, 255, 255, 0.82);
}

.fwg-lightbox__count {
  font-size: 0.9rem;
}

body.fwg-lightbox-open {
  overflow: hidden;
}

@keyframes fwg-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 680px) {
  .fwg-shell {
    padding: 28px;
  }

  .fwg-upload {
    padding: 58px 28px 36px;
  }

  .fwg-upload__card {
    padding: 30px;
  }

  .fwg-gallery__grid {
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .fwg-upload {
    padding: 72px 32px 44px;
  }

  .fwg-upload__card {
    padding: 30px 30px 32px;
  }

  .fwg-gallery__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 679px) {
  .fwg-lightbox {
    padding: 8px;
  }

  .fwg-lightbox__dialog {
    border-radius: 18px;
  }

  .fwg-lightbox__nav {
    top: auto;
    bottom: 82px;
  }

  .fwg-lightbox__nav--prev {
    left: 12px;
  }

  .fwg-lightbox__nav--next {
    right: 12px;
  }
}
