:root {
  color-scheme: light;
  --pdd-blue: #0071e3;
  --pdd-success: #16833b;
  --pdd-error: #c9342d;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  font-synthesis: none;
}

button, input { font: inherit; letter-spacing: 0; }
button, a, label { -webkit-tap-highlight-color: transparent; }
.pdd-page { max-width: 980px; }

.pdd-stats-panel .pool-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.pdd-stats-panel .pool-num { min-width: 0; }
.pdd-stats-panel .pool-num b { font-variant-numeric: tabular-nums; }
.pdd-stat--today b { color: var(--pdd-blue) !important; }
.pdd-stat--success b { color: var(--pdd-success) !important; }
.pdd-stats-panel .muted { margin: 4px 0 0; }

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.panel-heading h2 { margin-bottom: 0; }
.panel-heading p { margin: 4px 0 0; color: #8a94a6; font-size: 12.5px; }
.pool-state {
  flex: none;
  padding: 5px 9px;
  border-radius: 999px;
  color: #0f766e;
  background: #ecfdf5;
  border: 1px solid #d1fae5;
  font-size: 12px;
  font-weight: 600;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 11px;
  background: #eef0f4;
}
.segment {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  color: #6e6e73;
  background: transparent;
  font-size: 14px;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.segment.active {
  color: #1d1d1f;
  background: #fff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.12);
}

.submit-form { display: grid; gap: 10px; margin-top: 16px; }
.submit-form.hidden { display: none; }
.submit-form .input { height: 48px; font-size: 16px; font-variant-numeric: tabular-nums; }
.submit-form .btn-row { margin-top: 2px; }
.submit-form .btn { min-width: 132px; }

.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-area {
  min-height: 124px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px;
  border: 1px dashed #a7b0bd;
  border-radius: 14px;
  background: #f8fafc;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}
.upload-area:hover, .upload-area:focus, .upload-area.dragging { border-color: #10b981; background: #f0fdf4; }
.upload-area.dragging { transform: scale(0.995); }
.upload-title { color: #0f766e; font-size: 15px; font-weight: 600; }
.upload-note { color: #8a94a6; font-size: 12px; }
.upload-area img { width: 100%; max-height: 220px; object-fit: contain; border-radius: 10px; }
.upload-area.has-preview .upload-title, .upload-area.has-preview .upload-note { display: none; }

.result { margin-top: 14px; padding: 11px 13px; border-radius: 10px; font-size: 13px; line-height: 1.5; }
.result[data-state="neutral"] { color: #424245; background: #f5f5f7; }
.result[data-state="success"] { color: var(--pdd-success); background: #eef8f0; }
.result[data-state="error"] { color: var(--pdd-error); background: #fff1f0; }

@media (max-width: 640px) {
  .pdd-page { padding-top: 10px; }
  .pdd-stats-panel .pool-num { padding: 5px 2px; }
  .pdd-stats-panel .pool-num b { font-size: 20px; }
  .pdd-stats-panel .pool-num span { font-size: 10.5px; }
  .panel-heading { align-items: flex-start; }
  .panel-heading h2 { font-size: 16px; }
  .upload-area { min-height: 104px; }
  .footer { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
