/* Curate apply — minimal stylesheet, mobile-first */
:root {
  --bg: #faf8f4;
  --paper: #ffffff;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --line: #e7e3dc;
  --accent: #2d4a2b; /* deep coffee-leaf green */
  --accent-ink: #ffffff;
  --error: #b42318;
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang HK", "Hiragino Sans CNS",
    "Microsoft JhengHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.hero {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-weight: 700;
  letter-spacing: 0.3em;
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.hero h1 {
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
  font-weight: 600;
}
.hero h1 .en {
  display: block;
  font-weight: 400;
  font-size: 1rem;
  color: var(--muted);
  margin-top: 0.2rem;
}
.hero .sub {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
}
.hero .sub .en {
  display: block;
  font-size: 0.85rem;
  margin-top: 0.1rem;
}
.hero .collab {
  margin: 1rem auto 0;
  max-width: 560px;
  font-size: 0.85rem;
  color: var(--accent);
  background: rgba(45, 74, 43, 0.06);
  padding: 0.6rem 1rem;
  border-radius: 16px;
  display: inline-block;
}
/* Render newlines inside .collab spans as line breaks. Lets us put a
   two-line message in a single .collab pill without HTML in the content. */
.hero .collab .zh,
.hero .collab .en {
  white-space: pre-line;
}
.hero .collab .en {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 0.1rem;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 1rem;
}

.info-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 1rem 0;
  font-size: 0.95rem;
}
.info-box > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  user-select: none;
}
.info-box > summary::-webkit-details-marker { display: none; }
.info-box-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 600;
}
.info-box-toggle {
  color: var(--muted);
  font-size: 0.8rem;
  transition: transform 0.2s;
}
.info-box[open] .info-box-toggle { transform: rotate(180deg); }
.info-box:not([open]) > summary { padding-bottom: 0.85rem; }
.info-box-content {
  padding: 0 1.25rem 1rem;
}
.info-box h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0.5rem 0 0.3rem;
}
.info-box ul {
  list-style: none;
  padding: 0;
  margin: 0 0 0.5rem;
}
.info-box li {
  padding: 0.15rem 0;
}
.store-days {
  margin-top: 0.3rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.store-days-label {
  font-weight: 600;
  margin-right: 0.3rem;
}
.day-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  margin-top: 0.4rem;
}
@media (min-width: 480px) {
  .day-grid { grid-template-columns: repeat(7, 1fr); }
}
.day-grid label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.5rem 0.3rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  background: #fff;
  font-size: 0.85rem;
  text-align: center;
}
.day-grid label:has(input:checked) {
  background: rgba(45, 74, 43, 0.08);
  border-color: var(--accent);
  font-weight: 600;
}
.day-grid input[type="checkbox"] {
  width: 0.9rem;
  height: 0.9rem;
  accent-color: var(--accent);
}
.store-setup {
  border-top: 1px dashed var(--line);
}
.store-setup:first-of-type { border-top: none; }
.store-setup > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.55rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.store-setup > summary::-webkit-details-marker { display: none; }
.store-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
}
.store-toggle {
  color: var(--muted);
  font-size: 0.85rem;
  transition: transform 0.2s;
}
.store-setup[open] .store-toggle { transform: rotate(180deg); }
.store-body {
  padding-bottom: 0.5rem;
}
.store-prompt {
  margin: 1rem 0 0.3rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
}
.store-prompt .en {
  display: inline;
  color: var(--muted);
  font-weight: 400;
  font-size: 0.85rem;
}
.store-menu {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 0.3rem;
}
.store-equip {
  font-size: 0.85rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.store-equip li {
  padding: 0.05rem 0;
  color: var(--ink);
}
.store-equip li::before {
  content: "▸";
  color: var(--accent);
  margin-right: 0.4rem;
  font-size: 0.7em;
}
.store-shifts {
  margin-top: 0.5rem;
  padding-top: 0.4rem;
  border-top: 1px dotted var(--line);
}
.store-shifts-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.2rem;
}
.store-shifts ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.85rem;
}
.store-shifts li {
  padding: 0.05rem 0;
}

form section {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1rem 0;
}
form h2 {
  font-size: 1.05rem;
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}
.step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}
form h2 .en {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.9rem;
}

.field {
  display: block;
  margin: 0 0 1rem;
}
.field:last-child { margin-bottom: 0; }
.label-text {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
}
.label-text em {
  color: var(--error);
  font-style: normal;
  margin-left: 0.1rem;
}
.label-text .en {
  font-weight: 400;
  color: var(--muted);
}
.hint {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.hint .en { display: block; }

input[type="text"], input[type="email"], input[type="tel"],
input[type="number"], textarea, select {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 16px; /* prevent iOS zoom */
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45, 74, 43, 0.15);
}
textarea { resize: vertical; }

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 480px) {
  .row { grid-template-columns: 1fr; }
}

.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  font-size: 0.9rem;
}
.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  background: #fff;
}
.checkbox-grid label:has(input:checked) {
  background: rgba(45, 74, 43, 0.08);
  border-color: var(--accent);
}
.checkbox-grid input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
}

.photo-field {
  position: relative;
}
.photo-field input[type="file"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.photo-preview {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 2rem 1rem;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  background: #fff;
}
.photo-preview:hover, .photo-field input[type="file"]:focus + .photo-preview {
  border-color: var(--accent);
  color: var(--accent);
}
.photo-preview .zh { display: block; font-size: 1.05rem; margin-bottom: 0.25rem; }
.photo-preview .en { display: block; font-size: 0.85rem; }
.photo-preview img {
  max-width: 100%;
  max-height: 280px;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

button[type="submit"] {
  display: block;
  width: 100%;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  padding: 0.95rem;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  margin: 1.5rem 0 0.75rem;
  transition: background 0.15s;
}
button[type="submit"]:hover:not(:disabled) {
  background: #1f3520;
}
button[type="submit"]:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
button[type="submit"] .en {
  display: block;
  font-weight: 400;
  font-size: 0.85rem;
  opacity: 0.85;
  margin-top: 0.15rem;
}

.error-msg {
  color: var(--error);
  font-size: 0.9rem;
  min-height: 1.2rem;
  text-align: center;
  margin: 0.5rem 0;
}

.privacy-note {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}
.privacy-note .en { display: block; margin-top: 0.2rem; }

footer {
  text-align: center;
  padding: 2rem 1rem 3rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Bilingual text helpers */
.zh, .en { display: inline; }
@media (max-width: 380px) {
  .label-text .en, .hero .sub .en { display: block; margin-top: 0.1rem; }
}

/* Thanks page */
.thanks { padding: 2rem 1rem; }
.thanks-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}
.thanks .check {
  width: 60px;
  height: 60px;
  background: var(--accent);
  color: white;
  border-radius: 999px;
  font-size: 2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}
.thanks h1 { font-size: 1.4rem; margin: 0 0 0.5rem; }
.thanks h1 .en { display: block; font-weight: 400; color: var(--muted); font-size: 1rem; margin-top: 0.2rem; }
.thanks .meta { font-size: 0.85rem; color: var(--muted); margin-top: 1.5rem; }
.thanks .meta a { color: var(--accent); text-decoration: none; }
.thanks .meta a:hover { text-decoration: underline; }

/* MBTI assessment */
#mbti-questions { margin: 1rem 0; }
.mbti-q {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-bottom: 0.7rem;
}
.mbti-prompt {
  font-size: 0.95rem;
  color: var(--ink);
  margin: 0 0 0.6rem;
  line-height: 1.5;
}
.mbti-prompt .mbti-num {
  color: var(--accent);
  font-weight: 600;
  margin-right: 0.3rem;
}
.mbti-prompt .en {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.15rem;
}
.mbti-choice {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  margin: 0.3rem 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.mbti-choice:hover { border-color: var(--accent); }
.mbti-choice input[type="radio"] {
  margin: 0.15rem 0 0 0;
  flex-shrink: 0;
}
.mbti-choice input[type="radio"]:checked + .mbti-letter + .mbti-text {
  font-weight: 500;
}
.mbti-choice:has(input:checked) {
  border-color: var(--accent);
  background: rgba(45, 74, 43, 0.04);
}
.mbti-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.3rem;
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  flex-shrink: 0;
}
.mbti-text {
  flex: 1;
  font-size: 0.92rem;
  line-height: 1.45;
}
.mbti-text .en {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.15rem;
}
.mbti-result {
  background: linear-gradient(135deg, rgba(45,74,43,0.08), rgba(45,74,43,0.02));
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.1rem;
  margin-top: 1rem;
  text-align: center;
}
.mbti-result.hidden { display: none; }
.mbti-type {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin: 0 0 0.3rem;
}
.mbti-persona {
  font-size: 0.95rem;
  color: var(--ink);
  margin: 0 0 0.9rem;
}
.mbti-persona .en {
  color: var(--muted);
  font-size: 0.85rem;
}
.mbti-bars {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: left;
  max-width: 360px;
  margin: 0 auto;
}
.mbti-bar {
  display: grid;
  grid-template-columns: 70px 1fr 60px;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
}
.mbti-bar-label {
  color: var(--muted);
  letter-spacing: 0.05em;
}
.mbti-bar-track {
  height: 6px;
  background: rgba(45,74,43,0.1);
  border-radius: 3px;
  overflow: hidden;
}
.mbti-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.4s ease;
}
.mbti-bar-pct {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  font-weight: 500;
  text-align: right;
}
