.pde-app {
  --pde-border: #d8dee6;
  --pde-muted: #5f6b7a;
  --pde-bg: #f7f9fb;
  --pde-accent: #2f5fa7;
  font-family: inherit;
  color: inherit;
  max-width: 1050px;
  margin: 0 auto;
}

.pde-toolbar, .pde-grid, .pde-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.pde-toolbar {
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1rem;
}

.pde-card {
  border: 1px solid var(--pde-border);
  border-radius: 12px;
  padding: 1.1rem;
  margin: 1rem 0;
  background: #fff;
}

.pde-card h3 { margin-top: 0; }

.pde-muted, .pde-status {
  color: var(--pde-muted);
}

.pde-grid > label {
  flex: 1 1 260px;
}

.pde-app label {
  display: grid;
  gap: .4rem;
}

.pde-app select,
.pde-app input[type="file"],
.pde-app textarea,
.pde-app button {
  font: inherit;
}

.pde-app select,
.pde-app textarea {
  width: 100%;
  padding: .7rem;
  border: 1px solid var(--pde-border);
  border-radius: 8px;
}

.pde-app button {
  padding: .7rem 1rem;
  border: 1px solid var(--pde-border);
  border-radius: 8px;
  background: var(--pde-bg);
  cursor: pointer;
}

.pde-app button:hover {
  border-color: var(--pde-accent);
}

.pde-actions {
  margin-top: .8rem;
}

.pde-status {
  margin-top: .8rem;
}

.pde-prompt {
  background: var(--pde-bg);
  border-left: 4px solid var(--pde-accent);
  padding: .8rem;
  margin-bottom: 0;
}

.pde-warning {
  font-size: .95rem;
  color: #704600;
}

.pde-result {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pde-big {
  font-size: 2rem;
  font-weight: 700;
  min-width: 4rem;
}

.pde-table-wrap {
  overflow-x: auto;
}

.pde-app table {
  width: 100%;
  border-collapse: collapse;
}

.pde-app th, .pde-app td {
  border-bottom: 1px solid var(--pde-border);
  padding: .65rem;
  text-align: left;
  white-space: nowrap;
}

.pde-researcher-only {
  margin-top: .7rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9rem;
}

.pde-app[data-mode="participant"] .pde-researcher-only {
  display: none;
}

@media (max-width: 600px) {
  .pde-toolbar {
    align-items: stretch;
  }
  .pde-result {
    align-items: flex-start;
    flex-direction: column;
  }
}
