:root {
  --ink: #132b35;
  --deep: #0f3445;
  --accent: #e56f3d;
  --paper: #f5f2eb;
  --white: #fffefa;
  --muted: #6d7a7e;
  --line: #d7d8d2;
  --success: #24735b;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button, .upload-primary, .upload-secondary { -webkit-tap-highlight-color: transparent; }

.topbar { height: 68px; padding: 0 max(20px, env(safe-area-inset-left)); display: flex; align-items: center; justify-content: space-between; background: var(--deep); color: white; }
.brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.45); font-weight: 800; letter-spacing: -.04em; }
.brand strong, .brand small { display: block; }
.brand small { margin-top: 2px; color: #b9c9ce; font-size: 11px; letter-spacing: .08em; }
.base-link { color: white; text-decoration: none; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,.5); padding-bottom: 3px; }

main { max-width: 1040px; margin: 0 auto; padding: 0 28px 150px; }
.intro { padding: 66px 0 48px; border-bottom: 1px solid var(--line); animation: rise .55s ease both; }
.eyebrow { margin: 0 0 18px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.intro h1 { margin: 0; max-width: 700px; font-size: clamp(42px, 7vw, 78px); line-height: .98; letter-spacing: -.055em; }
.intro > p:not(.eyebrow) { max-width: 560px; margin: 24px 0 0; color: var(--muted); line-height: 1.8; }
.steps { display: flex; gap: 28px; list-style: none; margin: 40px 0 0; padding: 0; color: #8c9799; font-size: 13px; }
.steps li { display: flex; align-items: center; gap: 8px; }
.steps span { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 11px; }
.steps .active { color: var(--deep); font-weight: 700; }

.form-section { padding: 52px 0; border-bottom: 1px solid var(--line); animation: rise .5s ease both; animation-delay: .08s; }
.section-title { display: grid; grid-template-columns: 45px 1fr; gap: 14px; margin-bottom: 32px; }
.section-title > span { color: var(--accent); font: 800 12px/1 ui-monospace, monospace; padding-top: 5px; }
.section-title h2 { margin: 0; font-size: 27px; letter-spacing: -.03em; }
.section-title p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; margin-left: 59px; }
label { display: grid; gap: 8px; color: #42565d; font-size: 13px; font-weight: 700; }
label.wide { grid-column: 1 / -1; }
input, select, textarea { width: 100%; min-height: 46px; border: 0; border-bottom: 1px solid #aab2b1; border-radius: 0; background: transparent; color: var(--ink); outline: none; padding: 9px 2px; transition: border-color .2s, background .2s; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-bottom-color: var(--accent); background: rgba(255,255,255,.45); }

.upload-actions { margin-left: 59px; display: flex; gap: 12px; }
.upload-primary, .upload-secondary { min-height: 48px; padding: 0 22px; border-radius: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-weight: 800; font-size: 14px; }
.upload-primary { border: 1px solid var(--deep); background: var(--deep); color: white; }
.upload-secondary { border: 1px solid var(--deep); color: var(--deep); }
.upload-hint { margin: 12px 0 0 59px; color: var(--muted); font-size: 12px; }
.bulk-tools { margin: 28px 0 0 59px; padding: 18px 0; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 14px; border-top: 1px dashed #b8bcb6; border-bottom: 1px dashed #b8bcb6; }
.bulk-tools button { min-height: 42px; border: 0; background: #dfe5e2; color: var(--deep); padding: 0 18px; font-weight: 800; cursor: pointer; }
.empty-state { width: calc(100% - 59px); margin: 34px 0 0 59px; min-height: 230px; padding: 20px; display: grid; place-items: center; align-content: center; border: 1px dashed #afb8b6; background: transparent; text-align: center; color: var(--muted); cursor: pointer; }
.empty-state span { font-size: 34px; color: var(--accent); }
.empty-state strong { margin-top: 8px; color: var(--ink); font-size: 18px; }
.empty-state .empty-copy { margin: 8px 20px 0; max-width: 420px; color: var(--muted); font-size: 13px; line-height: 1.6; }

.photo-list { margin: 28px 0 0 59px; display: grid; gap: 22px; }
.photo-item { display: grid; grid-template-columns: minmax(220px, .85fr) 1.15fr; background: var(--white); border-top: 3px solid var(--deep); animation: rise .35s ease both; overflow: hidden; }
.photo-item.dragging { opacity: .45; }
.photo-preview { position: relative; min-height: 320px; background: #d9dfdc; }
.photo-preview img { width: 100%; height: 100%; position: absolute; object-fit: cover; }
.photo-index { position: absolute; left: 12px; top: 12px; width: 34px; height: 34px; display: grid; place-items: center; background: rgba(15,52,69,.92); color: white; font: 800 12px/1 ui-monospace, monospace; }
.photo-fields { padding: 18px 22px 22px; }
.photo-toolbar { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.drag-label { color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.photo-toolbar button { min-width: 34px; height: 32px; border: 0; background: transparent; color: var(--deep); cursor: pointer; }
.photo-toolbar .remove { color: #9a3f32; font-size: 12px; }
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 18px; margin-top: 14px; }
.photo-grid label { font-size: 11px; }
.photo-grid input, .photo-grid select, .photo-grid textarea { min-height: 39px; font-size: 14px; }
.photo-grid .description { grid-column: 1 / -1; }

.final-section { border-bottom: 0; }
.footer-note { margin-left: 59px; }
.consent { margin: 22px 0 0 59px; display: flex; gap: 12px; align-items: flex-start; color: var(--muted); font-size: 13px; }
.consent span { width: 9px; height: 9px; margin-top: 5px; flex: 0 0 auto; border-radius: 50%; background: var(--success); }
.consent p { margin: 0; }

.submit-dock { position: fixed; left: 50%; bottom: 18px; z-index: 20; width: min(920px, calc(100% - 36px)); min-height: 74px; transform: translateX(-50%); padding: 12px 14px 12px 22px; display: flex; align-items: center; justify-content: space-between; background: var(--deep); color: white; box-shadow: 0 18px 44px rgba(15,52,69,.24); }
.submit-dock small, .submit-dock strong { display: block; }
.submit-dock small { color: #b5c7cc; font-size: 10px; letter-spacing: .12em; }
.submit-dock strong { margin-top: 3px; font-size: 15px; }
.submit-dock button { min-height: 48px; border: 0; padding: 0 20px; display: flex; align-items: center; gap: 22px; background: var(--accent); color: white; font-weight: 800; cursor: pointer; }
.submit-dock button:disabled { cursor: wait; opacity: .65; }
.submit-dock i { font-style: normal; font-size: 20px; }
.result { margin-top: 30px; padding: 38px; background: var(--white); border-left: 4px solid var(--success); }
.result h2 { margin: 0; font-size: 28px; }
.result p { color: var(--muted); }
.result a { color: var(--deep); font-weight: 800; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (max-width: 720px) {
  .topbar { height: 60px; }
  main { padding: 0 18px 140px; }
  .intro { padding: 46px 0 36px; }
  .intro h1 { font-size: 49px; }
  .steps { gap: 12px; justify-content: space-between; font-size: 11px; }
  .steps li { gap: 5px; }
  .form-section { padding: 40px 0; }
  .field-grid, .upload-actions, .upload-hint, .bulk-tools, .empty-state, .photo-list, .footer-note, .consent { margin-left: 0; }
  .empty-state { width: 100%; }
  .field-grid { grid-template-columns: 1fr; gap: 18px; }
  label.wide { grid-column: auto; }
  .upload-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .upload-primary, .upload-secondary { padding: 0 12px; }
  .bulk-tools { grid-template-columns: 1fr; }
  .photo-item { grid-template-columns: 1fr; }
  .photo-preview { min-height: 260px; aspect-ratio: 4 / 3; }
  .photo-fields { padding: 14px 16px 19px; }
  .photo-grid { grid-template-columns: 1fr 1fr; gap: 10px 14px; }
  .photo-grid label:first-child, .photo-grid .description { grid-column: 1 / -1; }
  .submit-dock { bottom: max(10px, env(safe-area-inset-bottom)); width: calc(100% - 20px); padding-left: 14px; }
  .submit-dock button { padding: 0 14px; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; } }
