:root {
  color-scheme: light;
  font-family: "DM Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --surface: #f7f6f0;
  --panel: #fffef9;
  --ink: #1c2018;
  --muted: #545c4e;
  --green: #365526;
  --line: #d7d9cc;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0 auto;
  padding: 0 clamp(20px, 6vw, 64px);
  max-width: 1220px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--surface);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-size: 19px;
  font-weight: 750;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--green);
  border-radius: 50%;
  color: var(--green);
}

.topbar-label, footer {
  color: var(--muted);
  font-size: 13px;
}

main {
  width: min(100%, 785px);
  margin: clamp(54px, 12vh, 140px) auto 56px;
}

.platforms {
  margin: 0 0 18px;
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
}

.platforms span { margin: 0 6px; }

h1 {
  margin: 0;
  font-size: clamp(40px, 7.4vw, 90px);
  line-height: 1.08;
  font-weight: 750;
  letter-spacing: -.065em;
}

h1 span { color: var(--green); }

.intro {
  margin: 24px 0 36px;
  color: var(--muted);
  line-height: 1.65;
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
}

.fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

input {
  width: 100%;
  min-height: 58px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

.primary {
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  min-height: 52px;
  padding: 0 18px;
  border: none;
  border-radius: 6px;
  background: var(--green);
  color: white;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.primary:hover { background: #263d1a; }
.primary:disabled { opacity: .65; cursor: wait; }
.status { min-height: 22px; margin: 12px 0; color: var(--muted); font-size: 14px; }
.status.error { color: #952b22; }

.result {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.result img {
  width: min(30%, 160px);
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 4px;
}

.metadata { flex: 1; min-width: 0; }
.result-detail { margin: 0 0 6px; color: var(--green); font-size: 13px; }
h2 { margin: 0; font-size: 20px; overflow-wrap: anywhere; }

footer {
  margin-top: auto;
  padding: 18px 0 26px;
  border-top: 1px solid var(--line);
  line-height: 1.6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.feedback-open {
  border: 0;
  border-bottom: 1px solid currentColor;
  padding: 2px 0;
  background: transparent;
  color: var(--green);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.footer-actions { display: inline-flex; align-items: center; gap: 18px; }
.admin-link { color: var(--muted); text-decoration: none; white-space: nowrap; }
.admin-link:hover { color: var(--green); text-decoration: underline; }

.admin-body { max-width: 1360px; }
.admin-main { width: min(100%, 1080px); margin: clamp(44px, 8vh, 90px) auto 60px; }
.login-panel { width: min(100%, 460px); margin: 0 auto; }
.admin-title { font-size: clamp(36px, 6vw, 64px); letter-spacing: -.05em; }
.login-panel label { margin-top: 18px; }
.admin-submit { width: 100%; }
.admin-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 16px; }
.admin-heading .platforms { margin-bottom: 8px; }
.admin-actions { display: flex; gap: 10px; }
.secondary { min-height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); font: inherit; cursor: pointer; }
.secondary:hover { border-color: var(--green); color: var(--green); }
.feedback-list { display: grid; gap: 12px; }
.feedback-card { padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.feedback-card-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; }
.feedback-card-head strong { font-size: 18px; }
.feedback-state { padding: 4px 9px; border-radius: 999px; background: #ebece4; color: var(--muted); font-size: 12px; font-weight: 700; }
.state-new { background: #f7e9c8; color: #76520b; }
.state-reviewing { background: #dce9f2; color: #28546e; }
.state-resolved { background: #dcebd6; color: var(--green); }
.feedback-field { display: grid; grid-template-columns: 86px 1fr; gap: 12px; margin-top: 9px; color: var(--muted); line-height: 1.55; overflow-wrap: anywhere; }
.feedback-label { color: var(--ink); font-size: 13px; font-weight: 700; }
.feedback-message > :last-child { color: var(--ink); white-space: pre-wrap; }
.empty-state { padding: 70px 20px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); text-align: center; }
.password-hint { margin: 7px 0 0; color: var(--muted); font-size: 12px; }

dialog {
  width: min(92vw, 560px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 24px 80px rgb(28 32 24 / 24%);
}

dialog::backdrop { background: rgb(28 32 24 / 45%); }
.feedback-form { padding: 28px; }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
.dialog-head .platforms { margin-bottom: 6px; }
.dialog-head h2 { font-size: 28px; }
.dialog-close { border: 0; padding: 0 4px; background: transparent; color: var(--muted); font-size: 30px; line-height: 1; cursor: pointer; }
.feedback-form label { margin-top: 17px; }
.feedback-form label span { color: var(--muted); font-size: 12px; font-weight: 400; }
.feedback-form select,
.feedback-form textarea,
.feedback-form input { width: 100%; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--ink); font: inherit; }
.feedback-form select,
.feedback-form input { min-height: 48px; padding: 10px 12px; }
.feedback-form textarea { padding: 12px; resize: vertical; line-height: 1.55; }
.feedback-submit { width: 100%; margin-top: 6px; }
.honeypot { position: absolute; left: -10000px; width: 1px !important; height: 1px; opacity: 0; }

@media (max-width: 540px) {
  .fields { grid-template-columns: 1fr; }
  .result { flex-wrap: wrap; }
  .download { width: 100%; }
  footer { align-items: flex-start; }
  .feedback-form { padding: 22px; }
  .admin-heading { align-items: flex-start; flex-direction: column; }
  .admin-actions { width: 100%; }
  .admin-actions button { flex: 1; }
  .feedback-field { grid-template-columns: 1fr; gap: 2px; }
}
