/* DwellTwin Studio Synthetic PWA Shell Overlay (Issue #35, coordinated with A2 #33 tokens) */
:root {
  --pwa-safe-top: env(safe-area-inset-top, 0px);
  --pwa-safe-bottom: env(safe-area-inset-bottom, 0px);
  --pwa-safe-left: env(safe-area-inset-left, 0px);
  --pwa-safe-right: env(safe-area-inset-right, 0px);
}

.pwa-pill {
  position: fixed;
  top: calc(14px + var(--pwa-safe-top));
  left: calc(14px + var(--pwa-safe-left));
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line, #e4dbcd);
  background: var(--chip, rgba(250, 247, 242, 0.92));
  color: var(--ink, #221d18);
  font: 600 12.5px/1 var(--sans, system-ui, sans-serif);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(34, 29, 24, 0.1);
  cursor: pointer;
}

.pwa-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--clay, #a24f33);
}

.pwa-update-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(14px + var(--pwa-safe-bottom));
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: #221d18;
  color: #faf7f2;
  font: 500 12.5px/1.3 var(--sans, system-ui, sans-serif);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.pwa-update-bar[hidden] { display: none; }

.pwa-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(23, 20, 17, 0.45);
  display: flex;
  justify-content: flex-end;
}

.pwa-modal-backdrop[hidden] { display: none; }

.pwa-drawer {
  width: min(420px, 100vw);
  height: 100%;
  overflow-y: auto;
  background: var(--panel, #faf7f2);
  color: var(--ink, #221d18);
  border-left: 1px solid var(--line, #e4dbcd);
  padding: calc(18px + var(--pwa-safe-top)) calc(18px + var(--pwa-safe-right)) calc(24px + var(--pwa-safe-bottom)) calc(18px + var(--pwa-safe-left));
  font: 13px/1.45 var(--sans, system-ui, sans-serif);
}

.pwa-drawer h2 {
  margin: 0 0 4px;
  font: 500 20px/1.15 var(--serif, Georgia, serif);
}

.pwa-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--hair, #ece5da);
}

.pwa-section h3 {
  margin: 0 0 8px;
  font: 600 11px/1 var(--sans, system-ui, sans-serif);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid, #73695d);
}

.pwa-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.pwa-btn {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line, #e4dbcd);
  background: var(--bg, #f3eee6);
  color: var(--ink, #221d18);
  font: 600 12.5px/1 var(--sans, system-ui, sans-serif);
  cursor: pointer;
}

.pwa-btn-primary {
  background: #221d18;
  color: #faf7f2;
  border-color: #221d18;
}

.pwa-btn-danger {
  background: #f8e6e2;
  color: #8c2f1f;
  border-color: #dfb4ab;
}

.pwa-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: #f2e2d8;
  color: #a24f33;
}

.pwa-card {
  border: 1px solid var(--line, #e4dbcd);
  border-radius: 10px;
  background: var(--bg, #f3eee6);
  padding: 10px 12px;
  margin-top: 8px;
  font-size: 12px;
}

.pwa-design-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line, #e4dbcd);
  border-radius: 8px;
  background: var(--panel, #faf7f2);
  margin-top: 6px;
}
