:root {
  --navy: #062a55;
  --navy-2: #0b396f;
  --blue: #175fad;
  --yellow: #ffc31a;
  --yellow-soft: #fff4c7;
  --ink: #12233a;
  --muted: #62738a;
  --line: #dce5ef;
  --surface: #ffffff;
  --background: #f4f7fb;
  --success: #15764b;
  --shadow: 0 16px 40px rgba(6, 42, 85, 0.1);
  font-family: Inter, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--background);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: linear-gradient(180deg, #fff 0, var(--background) 42rem); }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.site-header {
  height: 76px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; gap: 11px; align-items: center; text-decoration: none; color: var(--navy); }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--yellow); font-weight: 900; letter-spacing: -1px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 14px; letter-spacing: .09em; }
.brand small { margin-top: 2px; font-size: 9px; letter-spacing: .14em; color: var(--muted); }
.privacy-pill { padding: 8px 12px; color: var(--navy); background: #edf4fb; border-radius: 999px; font-size: 12px; font-weight: 700; }
.privacy-pill small { display: block; margin-top: 1px; color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .03em; }

.page-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 72px 0 96px; }
.hero { position: relative; max-width: 740px; margin-bottom: 68px; }
.hero::after { content: "03"; position: absolute; right: -300px; top: -58px; font-size: 230px; line-height: 1; font-weight: 900; color: transparent; -webkit-text-stroke: 1px #dfe8f2; z-index: -1; }
.eyebrow { margin: 0 0 12px; color: var(--blue); font-size: 11px; font-weight: 900; letter-spacing: .18em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 20px; color: var(--navy); font-size: clamp(44px, 6.5vw, 82px); line-height: 1.03; letter-spacing: -.055em; }
h1 span { position: relative; z-index: 0; }
h1 span::after { content: ""; position: absolute; left: 0; right: 0; bottom: 5px; height: 16px; background: var(--yellow); z-index: -1; transform: skew(-5deg); }
.en-title { display: block; margin-top: 18px; color: var(--blue); font-size: clamp(16px, 2vw, 24px); font-weight: 800; letter-spacing: .01em; line-height: 1.25; }
.translation, .heading-translation { display: block; color: var(--muted); font-weight: 500; letter-spacing: .01em; line-height: 1.45; }
.translation { margin-top: 4px; font-size: .78em; }
.heading-translation { margin-top: 5px; font-size: .48em; }
.hero-copy { max-width: 590px; color: var(--muted); font-size: 16px; line-height: 1.8; }
.hero-copy .translation { font-size: 12px; line-height: 1.6; }
.selection-meter { width: min(100%, 430px); margin-top: 30px; padding-top: 20px; border-top: 2px solid var(--navy); display: flex; align-items: baseline; justify-content: space-between; }
.selection-meter > div { color: var(--navy); font-size: 38px; font-weight: 900; letter-spacing: -.05em; }
.selection-meter .meter-total { color: #9aacbe; font-size: 20px; }
.selection-meter > span { color: var(--muted); font-size: 13px; font-weight: 700; }
.selection-meter > span .translation { font-size: 9px; text-align: right; }
.selection-meter > span.complete { color: var(--success); }
.selection-meter > span.attention { color: #a8402c; }

.section-heading { margin-bottom: 22px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.section-heading h2 { margin: 0; color: var(--navy); font-size: 28px; letter-spacing: -.03em; }
.section-heading > p { margin: 0; color: var(--muted); font-size: 13px; }
.logo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.logo-card {
  position: relative;
  min-width: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  color: var(--ink);
  text-align: left;
  border: 2px solid transparent;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(6, 42, 85, .08), 0 8px 26px rgba(6, 42, 85, .06);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.logo-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.logo-card:focus-within { outline: 4px solid rgba(23, 95, 173, .18); outline-offset: 2px; }
.logo-card.selected { border-color: var(--yellow); box-shadow: 0 0 0 3px var(--yellow-soft), var(--shadow); }
.logo-card:nth-child(5) { grid-column-start: 2; }
.card-number { position: absolute; top: 14px; left: 14px; padding: 7px 8px; border-radius: 8px; color: var(--navy); background: var(--yellow); font-weight: 900; font-size: 13px; }
.check-mark { position: absolute; top: 14px; right: 14px; width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: transparent; background: #fff; font-weight: 900; transition: .18s ease; }
.logo-card.selected .check-mark { color: #fff; border-color: var(--navy); background: var(--navy); transform: scale(1.05); }
.logo-stage { position: relative; width: 100%; height: 176px; display: grid; place-items: center; padding: 25px 6px 6px; border: 0; border-radius: 12px; background: #f8fafc; overflow: hidden; cursor: zoom-in; }
.logo-stage img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.zoom-badge { position: absolute; right: 8px; bottom: 8px; padding: 5px 7px; border-radius: 7px; color: #fff; background: rgba(6,42,85,.82); font-size: 9px; font-weight: 800; opacity: 0; transform: translateY(3px); transition: .18s ease; }
.logo-stage:hover .zoom-badge, .logo-stage:focus-visible .zoom-badge { opacity: 1; transform: none; }
.card-select { width: 100%; min-height: 70px; padding: 0 2px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 0; color: inherit; text-align: left; background: transparent; cursor: pointer; }
.card-select:focus { outline: none; }
.card-copy { padding: 14px 0 3px; }
.card-copy strong, .card-copy small { display: block; }
.card-copy strong { font-size: 15px; color: var(--navy); }
.card-copy small { margin-top: 5px; color: var(--muted); font-size: 10px; letter-spacing: .03em; }
.select-label { flex: 0 0 auto; padding: 6px 7px; border-radius: 7px; color: var(--blue); background: #edf4fb; font-size: 9px; font-weight: 900; }
.select-label small { display: block; margin-top: 1px; font-size: 7px; font-weight: 700; }
.logo-card.selected .select-label { color: var(--navy); background: var(--yellow); }

.submit-dock { position: sticky; z-index: 5; bottom: 18px; margin: 34px auto 0; padding: 12px 12px 12px 22px; max-width: 660px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid rgba(220, 229, 239, .8); border-radius: 18px; background: rgba(255,255,255,.92); box-shadow: 0 18px 50px rgba(6,42,85,.18); backdrop-filter: blur(16px); }
.dock-copy strong, .dock-copy span { display: block; }
.dock-copy strong { color: var(--navy); font-size: 14px; }
.dock-copy strong small, .dock-copy > span small { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; font-weight: 600; }
.dock-copy span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.primary-button, .secondary-button { min-height: 46px; padding: 0 20px; border-radius: 12px; font-weight: 800; cursor: pointer; transition: transform .15s ease, opacity .15s ease; }
.primary-button { border: 0; color: #fff; background: var(--navy); box-shadow: 0 7px 18px rgba(6,42,85,.18); }
.primary-button:hover:not(:disabled) { transform: translateY(-1px); background: var(--navy-2); }
.primary-button:disabled { opacity: .38; cursor: not-allowed; box-shadow: none; }
.secondary-button { border: 1px solid var(--line); color: var(--navy); background: #fff; }
.bilingual-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; line-height: 1.05; }
.bilingual-button > span:first-child { display: block; }
.bilingual-button small { display: block; margin-top: 4px; font-size: 8px; font-weight: 600; opacity: .72; }

.state-card { max-width: 650px; margin: 60px auto; padding: 52px; text-align: center; border-radius: 24px; background: #fff; box-shadow: var(--shadow); }
.state-card h2 { margin-bottom: 12px; color: var(--navy); font-size: 30px; }
.state-card h2 .heading-translation { font-size: 14px; }
.state-card p:not(.eyebrow) { color: var(--muted); line-height: 1.75; }
.state-icon { width: 60px; height: 60px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 50%; color: var(--navy); background: var(--yellow); font-size: 26px; font-weight: 900; }
.success-icon { color: #fff; background: var(--success); }
.warning-icon { color: #fff; background: #a8402c; }
.spinner { width: 34px; height: 34px; display: inline-block; border: 3px solid var(--line); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.confirm-dialog { width: min(560px, calc(100% - 28px)); padding: 0; border: 0; border-radius: 24px; box-shadow: 0 32px 100px rgba(6,42,85,.3); }
.confirm-dialog::backdrop, .image-dialog::backdrop { background: rgba(6, 25, 48, .66); backdrop-filter: blur(5px); }
.confirm-dialog form { position: relative; padding: 34px; }
.confirm-dialog h2 { margin-bottom: 8px; color: var(--navy); font-size: 29px; }
.confirm-dialog h2 .heading-translation { font-size: 13px; }
.confirm-dialog form > p:not(.eyebrow,.form-error) { color: var(--muted); }
.dialog-close { position: absolute; top: 20px; right: 20px; width: 36px; height: 36px; border: 0; border-radius: 50%; color: var(--muted); background: #f0f4f8; font-size: 24px; cursor: pointer; }
.confirm-list { margin: 24px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.confirm-choice { padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: #f8fafc; }
.confirm-choice img { width: 100%; height: 86px; object-fit: contain; mix-blend-mode: multiply; }
.confirm-choice span { display: flex; align-items: center; gap: 7px; }
.confirm-choice small { color: var(--blue); font-weight: 900; }
.confirm-choice strong { color: var(--navy); font-size: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
.form-error, #error-message { white-space: pre-line; }
.form-error { margin: 14px 0 0; color: #a8402c; font-size: 13px; font-weight: 700; }

.image-dialog { width: min(900px, calc(100% - 28px)); max-height: calc(100vh - 28px); padding: 0; border: 0; border-radius: 24px; background: #fff; box-shadow: 0 32px 100px rgba(6,42,85,.34); }
.image-dialog form { position: relative; max-height: calc(100vh - 28px); padding: 18px; overflow: auto; }
.image-dialog .dialog-close { z-index: 2; top: 16px; right: 16px; color: var(--navy); background: rgba(255,255,255,.92); box-shadow: 0 4px 14px rgba(6,42,85,.16); }
.preview-tabs { width: fit-content; margin: 0 auto 12px; padding: 4px; display: flex; gap: 4px; border-radius: 12px; background: #e8eef5; }
.preview-tabs button { min-width: 140px; padding: 8px 14px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 900; cursor: pointer; }
.preview-tabs button small { display: block; margin-top: 2px; font-size: 8px; font-weight: 600; }
.preview-tabs button.active { color: var(--navy); background: #fff; box-shadow: 0 3px 12px rgba(6,42,85,.12); }
.product-mockup { padding: 10px 12px 12px; border-radius: 18px; background: radial-gradient(circle at 50% 35%, #fff 0, #edf2f7 72%); }
.garment-stage { width: min(100%, 650px); aspect-ratio: 1; margin: 0 auto; overflow: hidden; border-radius: 14px; background: #fff; }
.mockup-product-image { width: 100%; height: 100%; display: block; object-fit: contain; opacity: 1; transition: opacity .16s ease; }
.mockup-product-image.loading { opacity: 0; }
.mockup-note-grid { margin: -3px auto 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.mockup-note-grid > span { min-width: 0; padding: 9px 10px; border: 1px solid #dae3ed; border-radius: 10px; color: var(--navy); background: rgba(255,255,255,.84); }
.mockup-note-grid strong, .mockup-note-grid small { display: block; }
.mockup-note-grid strong { font-size: 10px; }
.mockup-note-grid small { margin-top: 2px; color: var(--muted); font-size: 8px; line-height: 1.25; }
.image-preview-stage { height: min(62vh, 650px); display: grid; place-items: center; padding: 22px; border-radius: 16px; background: #f3f6fa; overflow: hidden; }
.image-preview-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.image-preview-caption { padding: 18px 6px 2px; }
.image-preview-caption .eyebrow { margin-bottom: 7px; }
.image-preview-caption h2 { margin: 0; color: var(--navy); font-size: 22px; }

footer { max-width: 1240px; margin: 0 auto; padding: 22px 28px 34px; display: flex; justify-content: space-between; color: #7f8fa2; border-top: 1px solid var(--line); font-size: 10px; letter-spacing: .1em; }

@media (max-width: 900px) {
  .hero::after { right: -80px; opacity: .5; }
  .logo-grid { grid-template-columns: repeat(2, 1fr); }
  .logo-card:nth-child(5) { grid-column-start: auto; }
}
@media (max-width: 560px) {
  .site-header { height: 66px; padding: 0 18px; }
  .privacy-pill { font-size: 10px; }
  .privacy-pill small { font-size: 7px; }
  .page-shell { width: min(100% - 28px, 1180px); padding: 48px 0 76px; }
  .hero { margin-bottom: 48px; }
  .hero::after { display: none; }
  h1 { font-size: 44px; }
  h1 span::after { bottom: 2px; height: 11px; }
  .en-title { margin-top: 14px; font-size: 15px; }
  .hero-copy { font-size: 14px; }
  .section-heading { align-items: start; }
  .section-heading > p { display: none; }
  .logo-grid { gap: 10px; }
  .logo-card { padding: 10px; border-radius: 14px; }
  .logo-stage { height: 126px; padding-top: 27px; }
  .card-number { top: 9px; left: 9px; padding: 5px 6px; font-size: 11px; }
  .check-mark { top: 9px; right: 9px; width: 25px; height: 25px; font-size: 12px; }
  .card-select { min-height: 69px; align-items: flex-start; flex-direction: column; gap: 2px; padding-bottom: 5px; }
  .card-copy { padding-top: 11px; }
  .card-copy strong { font-size: 13px; }
  .select-label { align-self: stretch; text-align: center; }
  .submit-dock { bottom: 10px; margin-top: 22px; padding: 9px 9px 9px 14px; }
  .dock-copy > span { display: none; }
  .primary-button, .secondary-button { padding: 0 15px; }
  .state-card { padding: 38px 24px; }
  .confirm-dialog form { padding: 28px 20px 22px; }
  .confirm-list { gap: 6px; }
  .confirm-choice { padding: 7px; }
  .confirm-choice img { height: 68px; }
  .confirm-choice strong { font-size: 10px; }
  .dialog-actions > * { flex: 1; }
  .image-dialog form { padding: 10px; }
  .preview-tabs { width: calc(100% - 48px); margin-bottom: 8px; }
  .preview-tabs button { min-width: 0; flex: 1; padding-inline: 8px; }
  .product-mockup { padding: 6px; }
  .mockup-note-grid { margin-top: -2px; grid-template-columns: repeat(2, 1fr); gap: 4px; }
  .mockup-note-grid > span { padding: 7px 8px; }
  .image-preview-stage { height: min(62vh, 560px); padding: 10px; }
  .image-preview-caption { padding: 14px 6px 5px; }
  footer { padding-inline: 18px; }
}

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