:root {
  color-scheme: light;
  --brand: #0f766e;
  --brand-dark: #0b5f59;
  --accent: #14b8a6;
  --ink: #111827;
  --muted: #4b5563;
  --soft: #f7f8f8;
  --white: #ffffff;
  --line: #e5e7eb;
  --line-strong: #cbd5e1;
  --danger: #b42318;
  --gold: #d99a22;
  --shadow: 0 16px 36px rgba(17, 24, 39, .06);
  --radius: 16px;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.hidden {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(229, 231, 235, .92);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(12px);
}

.nav-shell,
main,
.footer-shell,
.footer-record {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

.nav-shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.site-nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--brand);
  background: #edf7f6;
}

main {
  padding: 56px 0 88px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

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

h1,
h2,
h3 {
  color: var(--ink);
  letter-spacing: 0;
  line-height: 1.16;
}

h1 {
  margin-bottom: 16px;
  font-size: clamp(44px, 4.7vw, 52px);
  font-weight: 900;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(28px, 3vw, 32px);
  font-weight: 850;
}

h3 {
  margin-bottom: 6px;
  font-size: 18px;
  font-weight: 850;
}

p {
  color: var(--muted);
}

.lead {
  max-width: 680px;
  margin-bottom: 0;
  font-size: 16px;
  line-height: 1.75;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fbfcfd;
  color: var(--ink);
  outline: none;
}

textarea {
  min-height: 148px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(15, 118, 110, .45);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, .12);
}

button,
.btn-secondary,
.primary-action {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

form button,
.primary-action {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--white);
}

form button:hover,
.primary-action:hover {
  background: var(--brand-dark);
}

.btn-secondary:hover,
button:hover {
  border-color: rgba(15, 118, 110, .36);
}

.error {
  color: var(--danger) !important;
}

.form-status,
#loginStatus,
#adminLoginStatus,
#adminActionStatus,
.privacy-note {
  color: var(--muted);
  font-size: 13px;
}

.privacy-note {
  margin: 2px 0 0;
}

.feedback-hero,
.admin-hero {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 32px;
  align-items: start;
}

.feedback-title-line {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.feedback-title-line span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #e9fbf8;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.access-panel,
.session-card,
.admin-auth,
.admin-user-card {
  padding: 26px;
}

.access-panel h2,
.admin-auth h2 {
  font-size: 28px;
}

.session-card,
.admin-user-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #f1f8f7;
}

.session-card strong,
.admin-user-card strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
}

.session-card span,
.admin-user-card span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.feedback-flow {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--white);
}

.feedback-flow div {
  padding: 14px 18px;
  border-right: 1px solid var(--line);
}

.feedback-flow div:last-child {
  border-right: 0;
}

.feedback-flow strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.feedback-flow span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.feedback-tabs {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  margin: 72px 0 24px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.tab-button,
.admin-filter {
  min-height: 40px;
  border-radius: 999px;
  padding: 8px 16px;
  background: var(--white);
  color: var(--muted);
  white-space: nowrap;
}

.tab-button.is-active,
.admin-filter.is-active {
  border-color: rgba(15, 118, 110, .18);
  background: #e9fbf8;
  color: var(--brand);
}

.tab-panels {
  min-height: 360px;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.panel-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.panel-heading-row p:not(.eyebrow),
.focused-head p:not(.eyebrow) {
  margin-bottom: 0;
}

.filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filters select {
  width: auto;
  min-width: 126px;
}

.vote-list,
.mine-list,
.admin-list {
  display: grid;
  gap: 12px;
}

.suggestion-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(17, 24, 39, .04);
}

.suggestion-row:hover {
  border-color: rgba(15, 118, 110, .28);
}

.vote-button {
  width: 68px;
  min-height: 74px;
  display: grid;
  gap: 0;
  justify-items: center;
  align-content: center;
  padding: 8px 6px;
  border-radius: 14px;
  border-color: #d8e4e3;
  background: var(--soft);
  color: var(--brand);
}

.vote-button.is-voted {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--white);
}

.vote-arrow {
  font-size: 15px;
  line-height: 1;
}

.vote-count {
  font-size: 20px;
  font-weight: 900;
  line-height: 1.1;
}

.vote-copy {
  font-size: 12px;
  font-weight: 800;
}

.suggestion-main {
  min-width: 0;
}

.suggestion-main h3,
.suggestion-main > p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestion-main > p {
  margin-bottom: 0;
  font-size: 15px;
}

.status-badge,
.row-kind {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef7f6;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.reason {
  margin: 8px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(217, 154, 34, .25);
  border-radius: 12px;
  background: #fff8e8;
  color: #7a5412;
  white-space: normal !important;
}

.empty {
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background: #fbfcfd;
  color: var(--muted);
  text-align: center;
}

.focused-head {
  max-width: 640px;
  margin: 0 auto 24px;
  text-align: left;
}

.focused-form {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px;
}

.mine-item {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
}

.mine-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.mine-body,
.mine-reply {
  margin-bottom: 0;
  font-size: 15px;
}

.mine-reply {
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 24, 39, .46);
}

.modal-card {
  position: relative;
  width: min(560px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  padding: 28px;
}

.modal-card h2 {
  font-size: 28px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 50%;
}

.modal-hint {
  margin-bottom: 16px;
  font-size: 14px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #fbfcfd;
}

.footer-shell {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 38px 0 18px;
}

.footer-brand {
  display: grid;
  gap: 6px;
}

.footer-brand strong {
  color: var(--ink);
  font-size: 18px;
}

.footer-brand span,
.footer-links a,
.footer-record a {
  color: var(--muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a,
.footer-record a {
  font-weight: 700;
  text-decoration: none;
}

.footer-links a:hover,
.footer-record a:hover {
  color: var(--brand);
}

.footer-record {
  padding: 0 0 30px;
  text-align: center;
}

.admin-console {
  padding-top: 48px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 72px 0 24px;
}

.admin-stats div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--soft);
}

.admin-stats span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.admin-stats strong {
  color: var(--brand);
  font-size: 26px;
  line-height: 1;
}

.admin-queue {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.admin-queue-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.admin-filter-tabs {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.admin-filter span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  min-height: 22px;
  border-radius: 999px;
  background: rgba(15, 118, 110, .09);
  color: var(--brand);
  font-size: 12px;
}

.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
}

.admin-row-main {
  min-width: 0;
}

.admin-row h3 {
  margin-top: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-row p {
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

.admin-row .meta {
  color: var(--muted);
  font-size: 13px;
}

.admin-row-side {
  display: grid;
  justify-items: end;
  gap: 12px;
}

.admin-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-actions button {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 14px;
}

.admin-modal-card {
  width: min(600px, 100%);
}

.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--soft);
}

.login-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(24px, 6vh, 72px) 24px;
}

.login-card-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  text-decoration: none;
}

.login-card-brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.login-only-card {
  width: min(520px, 100%);
  padding: 32px;
}

.login-only-card h1 {
  font-size: clamp(36px, 4vw, 46px);
}

.login-only-card .lead {
  margin-bottom: 22px;
  font-size: 15px;
}

.back-link {
  width: max-content;
  margin-top: 4px;
  color: var(--brand);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 900px) {
  .feedback-hero,
  .admin-hero,
  .admin-stats {
    grid-template-columns: 1fr;
  }

  .feedback-flow {
    grid-template-columns: 1fr;
  }

  .feedback-flow div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .feedback-flow div:last-child {
    border-bottom: 0;
  }

  .panel-heading-row,
  .admin-queue-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .filters {
    width: 100%;
  }

  .filters select,
  .filters .primary-action {
    flex: 1 1 160px;
  }
}

@media (max-width: 640px) {
  .nav-shell,
  main,
  .footer-shell,
  .footer-record {
    width: min(100% - 32px, var(--max));
  }

  .nav-shell {
    min-height: auto;
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .site-nav a {
    padding: 0 9px;
    font-size: 13px;
  }

  main,
  .admin-console {
    padding: 42px 0 64px;
  }

  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 28px;
  }

  .feedback-tabs,
  .admin-stats {
    margin-top: 48px;
  }

  .access-panel,
  .session-card,
  .admin-auth,
  .admin-user-card,
  .focused-form,
  .admin-queue {
    padding: 22px;
  }

  .session-card,
  .admin-user-card,
  .footer-shell {
    align-items: flex-start;
    flex-direction: column;
  }

  .suggestion-row {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 14px;
  }

  .suggestion-row .status-badge {
    grid-column: 2;
    justify-self: start;
  }

  .vote-button {
    width: 58px;
    min-height: 70px;
  }

  .admin-row {
    grid-template-columns: 1fr;
  }

  .admin-row-side {
    justify-items: start;
  }

  .admin-actions {
    justify-content: flex-start;
  }

  .modal-backdrop {
    padding: 0;
  }

  .modal-card {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
  }
}
