.wdc-app {
  --wdc-bg: #0c2f27;
  --wdc-ink: #f6f1e7;
  --wdc-accent: #e3c27a;
  --wdc-accent-dark: #b8893c;
  --wdc-panel: rgba(15, 58, 55, 0.96);
  --wdc-border: rgba(227, 194, 122, 0.24);
  --wdc-shadow: 0 24px 80px rgba(8, 18, 14, 0.34);
  --wdc-preview-aspect: 3 / 4;
  font-family: "Poppins", "Helvetica Neue", Arial, sans-serif;
  color: var(--wdc-ink);
  position: fixed;
  inset: 0;
  z-index: 999999;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
}

.wdc-app * {
  box-sizing: border-box;
}

.wdc-app [hidden] {
  display: none !important;
}

html.wdc-fullscreen,
body.wdc-fullscreen {
  margin: 0 !important;
  height: 100%;
  overflow: hidden !important;
}

body.wdc-fullscreen #wpadminbar {
  position: fixed;
  top: 0;
}

.wdc-shell {
  height: 100dvh;
  padding: max(14px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom)) 14px;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(227, 194, 122, 0.14), transparent 60%),
    radial-gradient(900px 500px at 5% 10%, rgba(227, 194, 122, 0.1), transparent 55%),
    linear-gradient(180deg, #0c2f27 0%, #11413d 100%);
  overflow: hidden;
}

.wdc-screen {
  display: none;
  height: 100%;
}

.wdc-screen--active {
  display: grid;
  place-items: center;
}

.wdc-card,
.wdc-camera {
  width: min(100%, 520px);
  max-height: 100%;
  margin: 0 auto;
  background: var(--wdc-panel);
  border: 1px solid var(--wdc-border);
  border-radius: 28px;
  box-shadow: var(--wdc-shadow);
  overflow: hidden;
}

.wdc-card {
  padding: 28px 22px;
}

.wdc-kicker {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.75rem;
  color: #e3c27a;
}

.wdc-title {
  margin: 0;
  font-size: clamp(2rem, 7vw, 3.2rem);
  line-height: 0.96;
}

.wdc-copy {
  margin: 14px 0 0;
  font-size: 1rem;
  line-height: 1.6;
}

.wdc-copy--subtle,
.wdc-help {
  color: rgba(246, 241, 231, 0.76);
  font-size: 0.95rem;
}

.wdc-allowance {
  margin-top: 24px;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 14px 18px;
  background: #173f3c;
  color: #f6f1e7;
  border-radius: 18px;
}

.wdc-allowance__count {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
}

.wdc-label {
  display: block;
  margin-top: 24px;
  margin-bottom: 8px;
  font-weight: 600;
}

.wdc-input {
  width: 100%;
  border: 1px solid rgba(227, 194, 122, 0.35);
  background: #f6f1e7;
  border-radius: 16px;
  min-height: 56px;
  padding: 0 16px;
  font-size: 1rem;
  color: #0b2f2e;
}

.wdc-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.wdc-button:hover {
  transform: translateY(-1px);
}

.wdc-button--primary {
  width: 100%;
  margin-top: 18px;
  background: linear-gradient(180deg, var(--wdc-accent) 0%, var(--wdc-accent-dark) 100%);
  color: #0b2f2e;
}

.wdc-button--ghost {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff8f1;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}

.wdc-icon-button {
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: #fff9f3;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.wdc-icon-button:hover {
  transform: translateY(-1px);
}

.wdc-icon-button--small {
  width: 40px;
  height: 40px;
}

.wdc-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.wdc-app .wdc-icon svg {
  width: 100%;
  height: 100%;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  fill: none;
  stroke: currentColor;
  flex: 0 0 auto;
}

.wdc-icon-fallback {
  display: none;
  font-size: 1.15rem;
  font-weight: 700;
}

.wdc-app.wdc-icons-fallback .wdc-icon svg {
  display: none !important;
}

.wdc-app.wdc-icons-fallback .wdc-icon-fallback {
  display: inline-block;
}

.wdc-camera {
  padding: 14px;
  background: linear-gradient(180deg, #0f3a37 0%, #0c2f27 100%);
  color: #fff3ea;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: calc(100dvh - 28px);
}

.wdc-camera__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.wdc-camera__label,
.wdc-camera__meta,
.wdc-camera__stats {
  margin: 0;
}

.wdc-camera__label {
  font-size: 1.05rem;
  font-weight: 700;
}

.wdc-camera__meta {
  color: rgba(255, 243, 234, 0.76);
  font-size: 0.92rem;
}

.wdc-camera__event {
  margin: 4px 0 0;
  color: #e3c27a;
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wdc-camera__stats {
  min-width: 72px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  text-align: center;
  font-weight: 700;
}

.wdc-camera__stats-label {
  display: block;
  font-size: 0.72rem;
  color: rgba(255, 243, 234, 0.68);
}

.wdc-progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  margin-bottom: 10px;
}

.wdc-progress__bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #ffbd80 0%, #ff7447 100%);
  transition: width 180ms ease;
}

.wdc-preview-frame {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #060403;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: min(88vw, 560px);
  align-self: center;
  flex: 1 0 auto;
  min-height: 0;
  margin-top: 8px;
}

.wdc-preview-frame video,
.wdc-preview-frame canvas {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.wdc-preview-frame canvas {
  display: none;
}

.wdc-permission {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  text-align: center;
  padding: 20px;
  background: rgba(11, 8, 7, 0.88);
}

.wdc-flash {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  opacity: 0;
  pointer-events: none;
}

.wdc-flash.is-active {
  animation: wdc-flash 220ms ease;
}

@keyframes wdc-flash {
  0% { opacity: 0; }
  35% { opacity: 1; }
  100% { opacity: 0; }
}

.wdc-camera__controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

.wdc-toolbar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.wdc-icon-button--photos {
  order: 2;
  margin: 0 10px;
}

.wdc-gallery__strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.wdc-gallery__item {
  flex: 0 0 auto;
  width: 84px;
  text-decoration: none;
  color: rgba(255, 243, 234, 0.94);
  font-size: 0.8rem;
}

.wdc-gallery__item img {
  width: 84px;
  height: 84px;
  display: block;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  margin-bottom: 6px;
}

.wdc-gallery__empty {
  margin: 0;
  color: rgba(255, 243, 234, 0.68);
  font-size: 0.9rem;
}

.wdc-shutter {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.32));
}

.wdc-shutter__outer {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  padding: 8px;
  background: linear-gradient(180deg, rgba(246,241,231,0.98), rgba(227,194,122,0.45));
  border: 2px solid rgba(227,194,122,0.65);
}

.wdc-shutter__inner {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #f9f5ec, #d6a34a 68%);
  border: 6px solid rgba(88, 63, 18, 0.16);
  box-shadow: inset 0 -8px 18px rgba(88, 63, 18, 0.2);
}

.wdc-status {
  text-align: center;
  font-size: 0.92rem;
  color: rgba(255, 243, 234, 0.72);
  width: 100%;
}

.wdc-status.is-error {
  color: #ffb2a2;
}

.wdc-availability {
  margin: 10px 0 0;
  text-align: center;
  color: rgba(246, 241, 231, 0.76);
  font-size: 0.85rem;
}

.wdc-availability.is-closed {
  color: #ffd3c8;
}

.wdc-button.is-active {
  background: rgba(255, 183, 94, 0.28);
  border-color: rgba(255, 183, 94, 0.82);
  color: #fffefb;
}

.wdc-icon-button.is-active {
  background: rgba(255, 183, 94, 0.28);
  border-color: rgba(255, 183, 94, 0.82);
}

.wdc-card--limit {
  text-align: center;
}

.wdc-app.is-busy .wdc-shutter,
.wdc-app.is-busy .wdc-button,
.wdc-app.is-busy .wdc-icon-button {
  opacity: 0.7;
  pointer-events: none;
}

.wdc-photos-drawer {
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 6, 0.64);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: end center;
  padding: 16px 14px max(18px, env(safe-area-inset-bottom));
}

.wdc-photos-drawer__panel {
  width: min(100%, 560px);
  max-height: 70dvh;
  background: rgba(31, 20, 14, 0.96);
  color: #fff7f0;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 24px 24px 18px 18px;
  padding: 16px;
  box-shadow: 0 22px 44px rgba(0,0,0,0.3);
}

.wdc-photos-drawer__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.wdc-photos-drawer__header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.wdc-gallery__strip--drawer {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  overflow: auto;
  max-height: calc(70dvh - 72px);
  gap: 12px;
}

@media (min-width: 768px) {
  .wdc-shell {
    padding: 28px 20px;
  }

  .wdc-card,
  .wdc-camera {
    width: min(100%, 640px);
  }

  .wdc-card {
    padding: 40px 36px;
  }
}

@media (orientation: landscape) and (max-height: 540px) {
  .wdc-shell {
    padding: 10px 12px;
  }

  .wdc-card,
  .wdc-camera {
    width: min(100%, 960px);
    border-radius: 22px;
  }

  .wdc-card {
    padding: 20px 20px 18px;
  }

  .wdc-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
  }

  .wdc-copy,
  .wdc-copy--subtle,
  .wdc-help {
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .wdc-allowance {
    margin-top: 14px;
    padding: 10px 14px;
  }

  .wdc-label {
    margin-top: 14px;
  }

  .wdc-input,
  .wdc-button {
    min-height: 46px;
  }

  .wdc-camera {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    grid-template-areas:
      "top preview"
      "progress preview"
      "controls preview";
    gap: 10px 14px;
    align-items: stretch;
  }

  .wdc-camera__top {
    grid-area: top;
    margin-bottom: 0;
    flex-direction: column;
  }

  .wdc-progress {
    grid-area: progress;
    margin-bottom: 0;
    align-self: center;
  }

  .wdc-preview-frame {
    grid-area: preview;
    height: 100%;
    min-height: 0;
  }

  .wdc-camera__controls {
    grid-area: controls;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    margin-top: 0;
  }

  .wdc-toolbar {
    grid-column: 1 / -1;
  }

  .wdc-status {
    text-align: center;
  }

  .wdc-shutter {
    justify-self: center;
    width: 86px;
    height: 86px;
  }
}
