* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #111827;
  background: #f5f6f8;
}
.wrap { max-width: 640px; margin: 48px auto; padding: 0 20px; }
.head { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.head h1 { font-size: 24px; margin: 0; font-weight: 700; letter-spacing: -.01em; }

.drop {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 44px 20px;
  background: #fff;
  border: 2px dashed #cbd2dc;
  border-radius: 16px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: #d6342c; background: #fff8f7; }
.drop-icon { width: 36px; height: 36px; color: #d6342c; }
.drop-title { font-size: 17px; font-weight: 600; }
.drop-btn {
  padding: 9px 18px; border-radius: 10px;
  background: #d6342c; color: #fff; font-weight: 600; font-size: 14px;
}


.files { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.file { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px 16px; }
.file-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.file-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-status { color: #6b7280; font-size: 13px; white-space: nowrap; }
.file.error .file-status { color: #b91c1c; }
.file.done .file-status { color: #15803d; }
.bar { height: 6px; background: #eef0f3; border-radius: 99px; margin-top: 10px; overflow: hidden; }
.bar-fill { height: 100%; width: 0; background: #d6342c; transition: width .2s; }
.file.done .bar, .file.error .bar { display: none; }
.file-actions { display: flex; gap: 8px; margin-top: 10px; }
.file-actions:not(:has(.btn:not([hidden]))) { display: none; }
.btn {
  font: inherit; font-size: 14px; font-weight: 600;
  padding: 8px 14px; border-radius: 9px; cursor: pointer;
  border: 1px solid #d1d5db; background: #fff; color: #111827;
}
.btn:hover { background: #f3f4f6; }
.btn-primary { background: #d6342c; border-color: #d6342c; color: #fff; }
.btn-primary:hover { background: #bf2d26; }
.btn-ghost { border-color: transparent; color: #6b7280; }

.note { margin: 22px 2px 0; color: #9ca3af; font-size: 13px; text-align: center; }

/* rating gate: 1–3★ private form, 4–5★ CWS reviews; hidden until both URLs are set */
.rating { margin-top: 18px; padding-top: 12px; border-top: 1px solid #eceef1; text-align: center; }
.rating-title { margin: 0 0 4px; font-size: 12px; color: #9ca3af; }
/* row-reverse: DOM order 5..1, visual 1..5, so ~ lights the stars left of the hovered one */
.rating-group { display: inline-flex; flex-direction: row-reverse; }
.star { padding: 0; margin: 0; background: none; border: none; line-height: 0; cursor: pointer; }
.star svg { margin: 2px; width: 20px; height: 20px; fill: #d1d5db; transition: fill .3s; }
.star:hover svg, .star:hover ~ .star svg { fill: #ffc711; }
