:root {
  --blue: #1647d8;
  --blue-dark: #0d2f9c;
  --ink: #111318;
  --paper: #f6f3ec;
  --white: #fff;
  --line: #d8d4ca;
  --muted: #65676d;
  --danger: #b42318;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
}

button, input { font: inherit; }
button, label { -webkit-tap-highlight-color: transparent; }

.site-header {
  min-height: 74px;
  padding: 14px clamp(20px, 5vw, 70px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.site-header p { margin: 0; color: var(--muted); font-size: 14px; font-weight: 700; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: inherit;
  text-decoration: none;
  font-size: 23px;
  font-weight: 950;
  letter-spacing: -.04em;
}

.brand-mark {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
}

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.hero {
  min-height: 540px;
  padding: 70px 0;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(330px, .75fr);
  align-items: center;
  gap: clamp(40px, 8vw, 110px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .16em;
}

h1, h2 { margin-top: 0; letter-spacing: -.045em; }
h1 { margin-bottom: 24px; font-size: clamp(45px, 7vw, 82px); line-height: 1.05; }
h2 { margin-bottom: 8px; font-size: clamp(28px, 4vw, 44px); }

.hero-copy {
  max-width: 650px;
  margin: 0;
  color: #4e5056;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.9;
}

.upload-zone {
  min-height: 330px;
  padding: 38px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 13px;
  cursor: pointer;
  text-align: center;
  background: #fff;
  border: 2px dashed #9da8c7;
  border-radius: 24px;
  box-shadow: 0 18px 45px rgba(20, 35, 75, .09);
  transition: transform .2s, border-color .2s, background .2s;
}

.upload-zone:hover, .upload-zone.is-over {
  transform: translateY(-3px);
  border-color: var(--blue);
  background: #f7f9ff;
}

.upload-zone input, .secondary-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-zone strong { font-size: 22px; }
.upload-zone > span:last-child { color: var(--muted); font-size: 14px; }
.upload-icon { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: var(--blue); color: #fff; font-size: 42px; font-weight: 300; }

.workspace { padding: 55px 0 80px; border-top: 1px solid var(--line); }
.workspace-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.workspace-heading p:not(.eyebrow) { margin: 0; color: var(--muted); }
.workspace-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.secondary-button, .danger-button, .primary-button {
  min-height: 46px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 900;
}

.secondary-button { background: #fff; border: 1px solid var(--blue); color: var(--blue); }
.danger-button { background: transparent; border: 1px solid #d9aaa6; color: var(--danger); }
.primary-button { min-height: 54px; padding-inline: 30px; border: 0; background: var(--blue); color: #fff; box-shadow: 0 10px 26px rgba(22, 71, 216, .22); }
.primary-button:hover { background: var(--blue-dark); }
.primary-button:disabled { cursor: wait; opacity: .55; }

.shot-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.shot-card {
  position: relative;
  min-width: 0;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 7px 20px rgba(20, 24, 34, .06);
  transition: transform .15s, opacity .15s, border-color .15s;
}

.shot-card.dragging { opacity: .42; transform: scale(.97); }
.shot-card.drag-target { border-color: var(--blue); }
.shot-image-wrap { aspect-ratio: 3 / 4; overflow: hidden; display: grid; place-items: center; background: #eceae4; border-radius: 10px; }
.shot-card img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }

.shot-number {
  position: absolute;
  top: 17px;
  left: 17px;
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 950;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
}

.shot-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 2px 1px; }
.shot-name { min-width: 0; overflow: hidden; color: #4d4f55; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.drag-handle { flex: 0 0 auto; padding: 5px 7px; cursor: grab; border: 0; background: #eef2ff; color: var(--blue); border-radius: 7px; font-weight: 950; touch-action: none; }
.drag-handle:active { cursor: grabbing; }
.remove-button { width: 29px; height: 29px; flex: 0 0 auto; cursor: pointer; border: 0; border-radius: 50%; background: #fff0ef; color: var(--danger); font-weight: 950; }

.page-divider { grid-column: 1 / -1; margin: 5px 0 -5px; color: var(--muted); font-size: 12px; font-weight: 900; letter-spacing: .1em; }

.convert-panel {
  margin-top: 34px;
  padding: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.convert-panel strong, .convert-panel span { display: block; }
.convert-panel strong { margin-bottom: 6px; font-size: 19px; }
.convert-panel span { color: var(--muted); font-size: 13px; line-height: 1.6; }
.status { min-height: 25px; margin: 13px 0 0; color: var(--blue); font-size: 14px; font-weight: 800; }
.status.is-error { color: var(--danger); }

.privacy-note { margin-bottom: 90px; padding: clamp(35px, 6vw, 70px); background: #111318; color: #fff; border-radius: 28px; }
.privacy-note h2 { font-size: clamp(34px, 5vw, 58px); }
.privacy-note > p:last-child { max-width: 720px; margin: 0; color: #c7c9d0; font-size: 17px; line-height: 1.9; }

footer { padding: 30px 20px; text-align: center; color: var(--muted); font-size: 12px; font-weight: 800; }

@media (max-width: 850px) {
  .hero { grid-template-columns: 1fr; padding: 50px 0; }
  .upload-zone { min-height: 250px; }
  .shot-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-heading, .convert-panel { align-items: stretch; flex-direction: column; }
  .primary-button { width: 100%; }
}

@media (max-width: 520px) {
  main { width: min(100% - 24px, 1180px); }
  .site-header { padding-inline: 14px; }
  .site-header p { display: none; }
  .hero { min-height: auto; gap: 30px; }
  h1 { font-size: 44px; }
  .hero-copy { font-size: 15px; }
  .upload-zone { padding: 25px 18px; }
  .shot-list { gap: 10px; }
  .shot-card { padding: 7px; }
  .shot-number { top: 12px; left: 12px; }
  .shot-name { display: none; }
  .convert-panel { padding: 19px; }
  .privacy-note { margin-bottom: 55px; border-radius: 20px; }
}

