:root {
  color-scheme: dark;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #e8eef8;
  background: #09111d;
  --panel: #101a29;
  --panel-soft: #152235;
  --line: #263751;
  --muted: #91a1b8;
  --cyan: #67d7d0;
  --orange: #ffad6b;
  --danger: #ff7f83;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  background: #09111d;
  color: #e8eef8;
}

button,
input,
textarea {
  font: inherit;
}

body,
input,
textarea,
button {
  font-size: 16px;
}

button {
  touch-action: manipulation;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.page-shell {
  width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  overflow-x: hidden;
  background: var(--panel);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.topbar {
  padding: calc(18px + env(safe-area-inset-top)) 18px 14px;
  background: #0f1a2a;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 6px;
  font-size: 20px;
  line-height: 1.25;
}

.topbar-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.feedback-form {
  padding: 18px 18px calc(22px + env(safe-area-inset-bottom));
}

.form-section-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.form-section-head > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  color: #0a1823;
  font-size: 11px;
  font-weight: 900;
  background: var(--cyan);
  border-radius: 6px;
}

.form-section-head h3 {
  margin: 0 0 2px;
  font-size: 15px;
  line-height: 1.4;
}

.form-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.form-section-head em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 400;
}

.section-gap {
  margin-top: 28px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.field {
  display: block;
  min-width: 0;
}

.field-label {
  display: block;
  margin: 0 0 8px;
  color: #cbd7e8;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.field-label b {
  color: var(--orange);
}

input,
textarea {
  width: 100%;
  color: #edf5ff;
  background: #0b1523;
  border: 1px solid #2b3d56;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

input {
  min-height: 48px;
  padding: 0 14px;
}

textarea {
  display: block;
  min-height: 150px;
  padding: 13px 14px;
  resize: vertical;
  line-height: 1.65;
}

input::placeholder,
textarea::placeholder {
  color: #53647c;
}

input:focus,
textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgb(103 215 208 / 12%);
}

input[readonly] {
  color: #b8c9dc;
  background: #0f1a2a;
  border-style: dashed;
  cursor: default;
}

input[readonly]:focus {
  box-shadow: none;
  border-color: #40566f;
}

.field-hint {
  display: block;
  margin: 7px 0 0 2px;
  color: #667991;
  font-size: 11px;
  line-height: 1.5;
}

.field-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 7px 2px 0;
  color: #667991;
  font-size: 11px;
  line-height: 1.4;
}

.upload-zone {
  padding: 14px;
  background: #0c1725;
  border: 1px dashed #3b506d;
  border-radius: 9px;
}

.upload-zone.dragover {
  border-color: var(--cyan);
  background: #102334;
}

.upload-zone.full .upload-trigger {
  opacity: 0.65;
  pointer-events: none;
}

.upload-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  color: #c8d6e8;
  cursor: pointer;
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  color: #071620;
  font-size: 24px;
  font-weight: 300;
  background: var(--orange);
  border-radius: 8px;
}

.upload-trigger strong,
.upload-trigger small {
  display: block;
}

.upload-trigger strong {
  font-size: 14px;
}

.upload-trigger small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.file-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 10px;
  color: #cbd7e8;
  background: #142236;
  border: 1px solid #273c57;
  border-radius: 7px;
}

.file-kind {
  display: grid;
  place-items: center;
  width: 28px;
  height: 26px;
  flex: none;
  color: #0c1826;
  font-size: 10px;
  font-weight: 900;
  background: var(--cyan);
  border-radius: 5px;
}

.file-item.video .file-kind {
  background: var(--orange);
}

.file-name {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-size {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.remove-file {
  width: 28px;
  height: 28px;
  flex: none;
  color: #8293aa;
  font-size: 18px;
  line-height: 1;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.remove-file:hover {
  color: var(--danger);
}

.submit-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  min-height: 48px;
  margin-left: auto;
  padding: 0 18px;
  color: #06131c;
  font-size: 14px;
  font-weight: 800;
  background: var(--cyan);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.submit-button:hover {
  background: #88e6df;
}

.submit-button:active {
  transform: translateY(1px);
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.progress {
  margin-top: 16px;
}

.progress-track {
  height: 4px;
  overflow: hidden;
  background: #263852;
  border-radius: 999px;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--cyan);
  transition: width 0.2s;
}

.progress p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.form-message {
  min-height: 20px;
  margin: 14px 0 0;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.5;
  text-align: right;
}

.form-message.success {
  color: var(--cyan);
}

.privacy-note {
  margin: 16px 0 0;
  color: #586c84;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(4 10 18 / 72%);
  backdrop-filter: blur(6px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 360px);
  padding: 20px;
  background: #101a29;
  border: 1px solid #2b3d56;
  border-radius: 14px;
  box-shadow: 0 24px 80px rgb(0 0 0 / 40%);
}

.modal-eyebrow {
  margin: 0 0 6px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal-panel h2 {
  margin: 0 0 14px;
  font-size: 22px;
  line-height: 1.25;
}

.qrcode-slot {
  display: grid;
  place-items: center;
  min-height: 180px;
  margin-bottom: 14px;
  background: #0b1523;
  border: 1px dashed #3b506d;
  border-radius: 12px;
}

.qrcode-slot[hidden],
.field[hidden],
.modal-note[hidden] {
  display: none;
}

.qrcode-slot img {
  display: block;
  width: min(100%, 240px);
  height: auto;
  max-height: 240px;
  object-fit: contain;
}

.modal-note {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.modal-close {
  width: 100%;
  min-height: 46px;
  color: #06131c;
  font-size: 14px;
  font-weight: 800;
  background: var(--cyan);
  border: 0;
  border-radius: 10px;
}

.submit-row {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-top: 24px;
}

.submit-button {
  width: 100%;
  margin-left: 0;
}

.form-message {
  text-align: left;
}

.field-meta {
  flex-direction: column;
  align-items: flex-start;
}

.upload-trigger {
  align-items: flex-start;
}

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