@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300..600&family=Inter:wght@400;500;600;700;800&family=Noto+Serif+SC:wght@400;500;600&display=swap");

:root {
  --bg: #1a1614;
  --surface: #2a2420;
  --surface-soft: #0e0b0a;
  --ink: #f5efe6;
  --muted: #c8bfb2;
  --subtle: #92877c;
  --line: #493f38;
  --line-soft: #352d28;
  --accent: #d4a574;
  --accent-strong: #b28756;
  --warm: #8b9474;
  --danger: #c4513a;
  --success: #6bc693;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
  color-scheme: dark;
  font-family:
    Inter, "Noto Serif SC", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 16% 0%, rgba(212, 165, 116, 0.16), transparent 340px),
    linear-gradient(180deg, rgba(14, 11, 10, 0.55), transparent 380px),
    var(--bg);
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.share-preview-image {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0.01;
  pointer-events: none;
  overflow: hidden;
  clip-path: inset(50%);
}

.page-shell {
  width: min(100%, 820px);
  margin: 0 auto;
  padding: 22px 14px 64px;
}

.hero {
  padding: 10px 2px 18px;
}

.topbar,
.admin-header,
.detail-header,
.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--accent);
  font-family: Fraunces, "Noto Serif SC", serif;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.brand-mark,
.success-mark,
.upload-icon {
  display: inline-block;
  flex: 0 0 auto;
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, var(--accent) 0 28%, transparent 30%),
    radial-gradient(circle at 50% 50%, transparent 0 56%, var(--accent) 57% 62%, transparent 63%);
  box-shadow: inset 0 0 0 1px rgba(212, 165, 116, 0.54);
}

.language-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-width: 164px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(14, 11, 10, 0.7);
}

.lang-button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.lang-button.is-active {
  background: var(--accent);
  color: var(--surface-soft);
  box-shadow: none;
}

.eyebrow {
  margin: 26px 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-family: Fraunces, "Noto Serif SC", serif;
  font-size: clamp(34px, 9vw, 64px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: 0;
}

.intro {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.notice {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  background: rgba(42, 36, 32, 0.76);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.intake-form {
  display: grid;
  gap: 16px;
}

.section-panel,
.submit-panel,
.success-panel,
.login-panel,
.detail-panel,
.submission-list-panel {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.section-panel {
  padding: 18px;
}

.section-heading {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.section-kicker {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border: 1px solid rgba(212, 165, 116, 0.36);
  border-radius: 50%;
  background: rgba(212, 165, 116, 0.1);
  color: var(--accent);
  font-weight: 900;
}

.section-heading h2 {
  margin: 0;
  font-family: Fraunces, "Noto Serif SC", serif;
  font-size: 21px;
  font-weight: 500;
  line-height: 1.2;
}

.section-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.fields {
  display: grid;
  gap: 18px;
}

.field {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.field:first-child {
  padding-top: 0;
  border-top: 0;
}

.field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.field-label {
  color: var(--ink);
  font-weight: 800;
  line-height: 1.35;
}

.field-meta {
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(212, 165, 116, 0.28);
  background: rgba(212, 165, 116, 0.1);
  color: var(--accent);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}

.field-help {
  margin: -2px 0 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="search"],
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface-soft);
  color: var(--ink);
  padding: 12px 13px;
  outline: 0;
}

textarea {
  resize: vertical;
  min-height: 112px;
  line-height: 1.55;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(212, 165, 116, 0.18);
}

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

.choices.dense {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-soft);
  padding: 10px 11px;
  color: var(--muted);
  line-height: 1.3;
}

.choice input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.choice span {
  min-width: 0;
}

.choice.is-selected {
  border-color: var(--accent);
  background: rgba(212, 165, 116, 0.12);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(212, 165, 116, 0.22);
}

.choice:has(input:disabled) {
  opacity: 0.55;
}

.field-error,
.submit-error {
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 14px;
  font-weight: 700;
}

.has-error input,
.has-error textarea {
  border-color: var(--danger);
}

.photo-guide {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.tip-list {
  margin: 14px 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.55;
}

.tip-list li + li {
  margin-top: 6px;
}

.upload-zone {
  display: grid;
  min-height: 86px;
  place-items: center;
  gap: 8px;
  border: 1.5px dashed rgba(212, 165, 116, 0.54);
  border-radius: 4px;
  background: rgba(212, 165, 116, 0.08);
  color: var(--accent);
  padding: 18px;
  text-align: center;
  font-weight: 900;
}

.upload-zone input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 48%, transparent 0 22%, var(--accent) 23% 35%, transparent 36%),
    linear-gradient(var(--accent), var(--accent));
  -webkit-mask:
    radial-gradient(circle at 50% 48%, transparent 0 23%, #000 24% 37%, transparent 38%),
    linear-gradient(#000 0 0);
  mask:
    radial-gradient(circle at 50% 48%, transparent 0 23%, #000 24% 37%, transparent 38%),
    linear-gradient(#000 0 0);
}

.photo-preview {
  margin: 14px 0 0;
}

.photo-preview img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-soft);
}

.photo-preview figcaption,
.admin-photo figcaption {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.submit-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  line-height: 1.55;
}

.consent-row input {
  width: 19px;
  height: 19px;
  margin-top: 2px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.primary-button,
.secondary-button,
.danger-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  padding: 0 17px;
  text-decoration: none;
  font-weight: 900;
  line-height: 1;
}

.primary-button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--surface-soft);
}

.primary-button:hover {
  background: var(--accent-strong);
}

.secondary-button {
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
}

.danger-button {
  border: 1px solid var(--danger);
  background: transparent;
  color: var(--danger);
}

.danger-button:hover {
  background: var(--danger);
  color: var(--ink);
}

.danger-button:disabled,
.primary-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.secondary-button.compact {
  min-height: 42px;
  padding: 0 12px;
}

.success-panel {
  margin-top: 16px;
  padding: 28px 20px;
  text-align: center;
}

.success-mark {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, transparent 45%, var(--surface-soft) 45% 55%, transparent 56%) 14px 21px / 18px 12px no-repeat,
    var(--accent);
}

.success-panel h2 {
  margin: 13px 0 8px;
}

.success-panel p {
  color: var(--muted);
  line-height: 1.6;
}

.case-line {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: var(--surface-soft);
  padding: 10px 12px;
}

.case-line strong {
  color: var(--accent-strong);
}

.admin-body {
  background:
    radial-gradient(circle at 12% 0%, rgba(212, 165, 116, 0.14), transparent 360px),
    var(--bg);
}

.admin-shell {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 18px 14px 36px;
}

.login-panel {
  width: min(100%, 440px);
  margin: 64px auto 0;
  padding: 24px;
}

.login-panel h1 {
  margin-top: 28px;
  font-size: 32px;
}

.login-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.login-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 800;
}

.admin-header {
  margin: 8px 0 16px;
}

.admin-header h1 {
  font-size: clamp(30px, 5vw, 44px);
}

.admin-header .eyebrow {
  margin: 0 0 6px;
}

.admin-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.submission-list-panel {
  position: sticky;
  top: 14px;
  padding: 12px;
}

.list-toolbar {
  align-items: stretch;
}

.list-toolbar input {
  min-height: 42px;
}

.status-filters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 10px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-soft);
}

.status-filter {
  min-height: 36px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.status-filter.is-active {
  background: var(--accent);
  color: var(--surface-soft);
}

.submission-list {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 198px);
  overflow: auto;
  margin-top: 12px;
  padding-right: 3px;
}

.submission-card {
  display: grid;
  gap: 5px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-soft);
  padding: 12px;
  color: var(--ink);
  text-align: left;
}

.submission-card.is-active {
  border-color: var(--accent);
  background: rgba(212, 165, 116, 0.12);
}

.submission-card strong {
  font-size: 16px;
}

.submission-card small,
.submission-date {
  color: var(--muted);
}

.submission-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.submission-date {
  font-size: 12px;
  font-weight: 800;
}

.status-badge {
  display: inline-flex;
  width: fit-content;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.status-badge.pending {
  border: 1px solid rgba(212, 165, 116, 0.34);
  background: rgba(212, 165, 116, 0.14);
  color: var(--accent);
}

.status-badge.processed {
  border: 1px solid rgba(107, 198, 147, 0.34);
  background: rgba(107, 198, 147, 0.12);
  color: var(--success);
}

.detail-panel {
  min-height: 520px;
  padding: 18px;
}

.empty-state {
  display: grid;
  min-height: 300px;
  place-items: center;
  align-content: center;
  text-align: center;
}

.empty-state p,
.detail-header p {
  color: var(--muted);
}

.detail-header {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.detail-header .eyebrow {
  margin: 0 0 7px;
}

.detail-header h2 {
  margin: 8px 0 0;
  font-size: 28px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.download-button {
  flex: 0 0 auto;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(230px, 320px) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.admin-photo,
.quick-notes {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-soft);
  padding: 12px;
}

.admin-photo img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: 4px;
  background: var(--bg);
}

.quick-notes h3,
.answer-section h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

dl {
  margin: 0;
}

.quick-notes dl,
.answer-section dl {
  display: grid;
  gap: 10px;
}

.quick-notes dl div,
.answer-section dl div {
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.quick-notes dl div:first-child,
.answer-section dl div:first-child {
  border-top: 0;
  padding-top: 0;
}

dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

dt span {
  display: block;
  margin-top: 2px;
  font-weight: 700;
}

dd {
  margin: 0;
  color: var(--ink);
  line-height: 1.45;
}

.answer-sections {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.answer-section {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-soft);
  padding: 14px;
}

.empty-list {
  border: 1px dashed var(--line);
  border-radius: 4px;
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(12, 25, 22, 0.46);
}

.confirm-modal {
  width: min(100%, 420px);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(12, 25, 22, 0.28);
  padding: 22px;
}

.confirm-modal h2 {
  margin: 0;
  font-size: 24px;
}

.confirm-modal p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

@media (max-width: 760px) {
  .page-shell {
    padding-inline: 12px;
  }

  .topbar,
  .admin-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .language-switch {
    width: 100%;
  }

  h1 {
    font-size: 38px;
  }

  .section-panel,
  .submit-panel,
  .detail-panel {
    padding: 15px;
  }

  .field-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .choices,
  .choices.dense {
    grid-template-columns: 1fr;
  }

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

  .submission-list-panel {
    position: static;
  }

  .submission-list {
    max-height: 360px;
  }

  .detail-header,
  .detail-grid,
  .list-toolbar {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .detail-actions {
    width: 100%;
    justify-content: stretch;
  }

  .detail-actions > * {
    width: 100%;
  }

  .download-button,
  .list-toolbar .secondary-button {
    width: 100%;
  }

  .modal-actions {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 900px) {
  .choices.dense {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
