:root {
  color-scheme: light;
  --ink: #173029;
  --muted: #64756f;
  --line: #dbe5de;
  --paper: #fff;
  --wash: #edf4ee;
  --green: #1a9e55;
  --green-dark: #11753d;
  --green-soft: #e5f7eb;
  --amber: #d98816;
  --danger: #b93c37;
  --shadow: 0 18px 50px rgba(25, 69, 47, .09);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }

html { min-width: 320px; background: var(--wash); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(110, 190, 132, .18), transparent 34rem),
    radial-gradient(circle at 96% 18%, rgba(248, 215, 157, .18), transparent 28rem),
    var(--wash);
  overflow-x: hidden;
}

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

.page-shell {
  width: min(960px, 100%);
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 20px calc(30px + env(safe-area-inset-bottom));
}

.hero {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: #fff;
  background: linear-gradient(145deg, #23b966, #138645);
  border-radius: 19px 19px 19px 7px;
  box-shadow: 0 10px 28px rgba(22, 133, 70, .2);
  font-size: 24px;
  font-weight: 850;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(25px, 4vw, 38px);
  line-height: 1.12;
  letter-spacing: -.045em;
}

.hero-copy > p:last-child {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.staff-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 15px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(23, 48, 41, .09);
  border-radius: 999px;
  box-shadow: 0 7px 22px rgba(25, 69, 47, .07);
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9ba9a3;
  box-shadow: 0 0 0 4px rgba(155, 169, 163, .13);
}

.staff-pill.is-ready .status-dot {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(26, 158, 85, .13);
}

.load-error {
  display: grid;
  gap: 5px;
  padding: 18px 20px;
  color: #78332f;
  background: #fff4f2;
  border: 1px solid #f0cbc7;
  border-radius: 20px;
}

.load-error[hidden], form[hidden], [hidden] { display: none !important; }

.report-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 16px;
  padding: 6px;
  background: rgba(255, 255, 255, .68);
  border: 1px solid rgba(23, 48, 41, .09);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(25, 69, 47, .06);
}

.report-switch {
  display: grid;
  gap: 3px;
  min-width: 0;
  min-height: 58px;
  padding: 9px 15px;
  color: var(--muted);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 15px;
  cursor: pointer;
}

.report-switch span { color: var(--ink); font-size: 14px; font-weight: 820; }
.report-switch small { font-size: 11px; }
.report-switch.is-selected {
  color: var(--green-dark);
  background: #fff;
  box-shadow: 0 7px 18px rgba(25, 69, 47, .09), inset 0 0 0 1px rgba(26, 158, 85, .18);
}
.report-switch.is-selected span { color: var(--green-dark); }

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

.form-card {
  min-width: 0;
  padding: 20px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(23, 48, 41, .08);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.section-heading {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: start;
  gap: 11px;
  margin-bottom: 16px;
}

.step-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--green-dark);
  background: var(--green-soft);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .04em;
}

.section-heading h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -.025em;
}

.section-heading h2 em {
  margin-left: 7px;
  color: var(--green-dark);
  font-size: 11px;
  font-style: normal;
  letter-spacing: .05em;
}

.section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

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

.field-stack label,
.detail-fields label,
.introduce-fields label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.field-stack em {
  margin-left: 5px;
  color: var(--green-dark);
  font-size: 10px;
  font-style: normal;
}

.field-stack small,
.introduce-fields small { color: #8a9993; font-weight: 500; }
.phone-field { grid-column: 1 / -1; }

input, select, textarea {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  background: #f8faf8;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

input, select { min-height: 48px; padding: 0 13px; }
select {
  appearance: none;
  padding-right: 42px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--green-dark) 50%),
    linear-gradient(135deg, var(--green-dark) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
}
textarea { min-height: 116px; padding: 13px 14px 36px; line-height: 1.55; resize: vertical; }
input::placeholder, textarea::placeholder { color: #9aa8a2; }
input:focus, select:focus, textarea:focus {
  background: #fff;
  border-color: rgba(26, 158, 85, .72);
  box-shadow: 0 0 0 4px rgba(26, 158, 85, .1);
}

.outcome-picker {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

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

.outcome-option {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.outcome-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.outcome-option > span {
  display: grid;
  place-content: center;
  min-height: 52px;
  padding: 8px 10px;
  color: var(--ink);
  text-align: center;
  background: #f8faf8;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 13px;
  font-weight: 780;
  line-height: 1.25;
  transition: color .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.outcome-option small {
  display: block;
  margin-top: 2px;
  color: #87978f;
  font-size: 10px;
  font-weight: 600;
}

.outcome-option input:checked + span {
  color: var(--green-dark);
  background: var(--green-soft);
  border-color: rgba(26, 158, 85, .55);
  box-shadow: inset 0 0 0 1px rgba(26, 158, 85, .11);
}

.outcome-option input:checked + span small { color: var(--green-dark); }
.outcome-option input:focus-visible + span {
  outline: 3px solid rgba(26, 158, 85, .3);
  outline-offset: 2px;
}

.keep-picker {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.keep-picker > p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 1px 9px;
  color: var(--muted);
  font-size: 11px;
}

.keep-picker > p b { color: var(--ink); font-size: 12px; }

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

.keep-button {
  position: relative;
  display: grid;
  gap: 2px;
  align-content: center;
  min-width: 0;
  min-height: 52px;
  padding: 8px 12px;
  color: var(--ink);
  text-align: center;
  background: #f8faf8;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 13px;
  font-weight: 740;
  cursor: pointer;
  transition: transform .12s ease, color .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.keep-button > span { font-size: 14px; font-weight: 800; }
.keep-button small { color: #87978f; font-size: 10px; font-weight: 600; }
.keep-button:active { transform: scale(.975); }
.keep-button.is-selected {
  color: var(--green-dark);
  background: var(--green-soft);
  border-color: rgba(26, 158, 85, .55);
  box-shadow: inset 0 0 0 1px rgba(26, 158, 85, .11);
}
.keep-button.is-selected::after {
  position: absolute;
  top: -5px;
  right: -4px;
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  color: #fff;
  background: var(--green);
  border: 2px solid #fff;
  border-radius: 50%;
  content: "✓";
  font-size: 10px;
  font-weight: 900;
}

button:focus-visible {
  outline: 3px solid rgba(26, 158, 85, .3);
  outline-offset: 2px;
}

.field-message {
  min-height: 18px;
  margin: 8px 2px 0;
  color: var(--amber);
  font-size: 12px;
  font-weight: 700;
}

.detail-block {
  padding: 15px;
  background: #f7faf7;
  border: 1px solid var(--line);
  border-radius: 17px;
}

.detail-block + .detail-block { margin-top: 12px; }

.detail-block-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.detail-block-heading > div { display: flex; align-items: center; gap: 8px; }
.detail-block-heading > div > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--green-dark);
  background: var(--green-soft);
  border-radius: 9px;
  font-weight: 900;
}
.detail-block-heading b { font-size: 14px; }
.detail-block-heading small { color: var(--muted); font-size: 10px; }

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

.detail-fields textarea { min-height: 82px; padding: 10px 11px; resize: vertical; }

.introduce-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 10px;
}

.textarea-wrap { position: relative; display: block; }
.char-count {
  position: absolute;
  right: 13px;
  bottom: 11px;
  color: #87958f;
  font-size: 11px;
}
.char-count b { color: var(--ink); }

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 12px;
  padding: 11px 12px;
  background: #f5f7f5;
  border-radius: 13px;
  color: var(--muted);
  font-size: 11px;
}
.privacy-note p { margin: 0; line-height: 1.45; }
.privacy-note b { color: var(--ink); }

.daily-progress {
  position: sticky;
  z-index: 25;
  top: 10px;
  margin-bottom: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(207, 220, 211, .9);
  border-radius: 20px;
  box-shadow: 0 12px 34px rgba(31, 67, 48, .12);
  backdrop-filter: blur(14px);
}
.daily-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 13px;
}
.daily-progress-head small { color: var(--muted); }
.daily-progress-track {
  display: grid;
  grid-template-columns: repeat(var(--unit-count, 7), minmax(0, 1fr));
  gap: 6px;
}
.daily-progress-track button {
  min-width: 0;
  min-height: 46px;
  padding: 5px 3px;
  color: #809087;
  background: #f2f5f2;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 850;
}
.daily-progress-track button small { display: block; margin-top: 2px; font-size: 9px; font-weight: 700; }
.daily-progress-track button.is-complete { color: var(--green-dark); background: var(--green-soft); cursor: pointer; }
.daily-progress-track button.is-active { color: #fff; background: var(--ink); border-color: var(--ink); }
.daily-progress-track button:disabled { opacity: .62; }

.daily-rule-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px 16px;
  color: #76312e;
  background: #fff5f3;
  border: 1px solid #efcbc7;
  border-radius: 18px;
}

.daily-rule-banner > span {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #fff;
  background: var(--danger);
  border-radius: 10px;
  font-weight: 900;
}

.daily-rule-banner > div { display: grid; gap: 3px; }
.daily-rule-banner b { font-size: 14px; }
.daily-rule-banner small { color: #91635f; font-size: 11px; }
.daily-form-grid { gap: 14px; }
.daily-section { padding: 21px; }
.daily-heading { grid-template-columns: 34px minmax(0, 1fr); }
.daily-heading h2 { line-height: 1.38; overflow-wrap: anywhere; }

.section-index {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  background: var(--ink);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 850;
}

.daily-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.daily-field > span:first-child { color: var(--ink); }
.daily-field textarea { min-height: 96px; padding-bottom: 13px; }
.daily-number-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 2px;
}
.daily-number-grid.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.daily-number-grid.three-up { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.daily-number-grid.four-up { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.unit-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  background: #f8faf8;
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
}
.unit-field input {
  min-height: 46px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.unit-field:focus-within {
  background: #fff;
  border-color: rgba(26, 158, 85, .72);
  box-shadow: 0 0 0 4px rgba(26, 158, 85, .1);
}
.unit-field input:focus { box-shadow: none; }
.unit-field b {
  padding: 0 13px 0 9px;
  color: var(--green-dark);
  font-size: 12px;
}

.daily-subblock {
  display: grid;
  gap: 10px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}
.daily-subtitle { margin: 0; color: var(--ink); font-size: 13px; font-weight: 780; line-height: 1.45; }
.tag-picker { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-picker.is-invalid {
  padding: 8px;
  background: #fff7f6;
  border: 1px solid rgba(185, 60, 55, .72);
  border-radius: 14px;
  box-shadow: 0 0 0 3px rgba(185, 60, 55, .09);
}
.tag-error {
  color: var(--danger);
  font-size: 11px;
  font-weight: 760;
}
.tag-error:empty { display: none; }
.tag-button,
.add-row-button,
.remove-row {
  min-height: 44px;
  color: var(--ink);
  background: #f8faf8;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-weight: 760;
  cursor: pointer;
}
.tag-button { padding: 0 14px; font-size: 12px; }
.tag-button.is-selected {
  color: var(--green-dark);
  background: var(--green-soft);
  border-color: rgba(26, 158, 85, .55);
  box-shadow: inset 0 0 0 1px rgba(26, 158, 85, .08);
}

.repeat-list { display: grid; gap: 11px; }
.buyer-unit-flow { min-width: 0; margin-top: 12px; }
.buyer-unit-flow > .form-grid { gap: 11px; }
.buyer-unit-flow .form-card {
  padding: 16px;
  background: #f7faf7;
  border-color: var(--line);
  box-shadow: none;
}
.saved-entry-list { display: grid; gap: 7px; margin-bottom: 10px; }
.saved-entry-list:empty { display: none; }
.saved-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px 9px 13px;
  color: var(--ink);
  background: var(--green-soft);
  border: 1px solid rgba(26, 158, 85, .2);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 730;
}
.saved-entry span { min-width: 0; overflow-wrap: anywhere; }
.saved-entry button,
.empty-entry-button {
  min-height: 44px;
  padding: 0 14px;
  color: var(--green-dark);
  background: #fff;
  border: 1px solid rgba(26, 158, 85, .32);
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
}
.saved-entry button { flex: 0 0 auto; }
.saved-entry-count { margin: 12px 0 8px; color: var(--muted); font-size: 12px; }
.empty-entry-button { width: 100%; }
.empty-entry-button:disabled { opacity: .65; cursor: wait; }
.repeat-row {
  min-width: 0;
  padding: 14px;
  background: #f7faf7;
  border: 1px solid var(--line);
  border-radius: 17px;
}
.repeat-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}
.repeat-row-head b { color: var(--green-dark); font-size: 13px; }
.remove-row { min-height: 36px; padding: 0 12px; color: var(--danger); background: #fff; font-size: 11px; }
.repeat-grid { display: grid; gap: 9px; }
.buyer-repeat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.buyer-repeat-grid .daily-field:nth-child(5) { grid-column: 1 / -1; }
.competitor-repeat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.add-row-button { width: 100%; margin-top: 10px; color: var(--green-dark); background: #fff; }

.focus-tag-panel {
  margin-bottom: 13px;
  padding: 13px;
  background: #f7faf7;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.focus-tags { display: flex; flex-wrap: wrap; gap: 7px; min-height: 30px; align-items: center; }
.focus-tag {
  padding: 7px 11px;
  color: var(--green-dark);
  background: var(--green-soft);
  border: 1px solid rgba(26, 158, 85, .25);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.focus-loading { color: var(--muted); font-size: 12px; }
.focus-error { margin: 7px 0 0; color: var(--danger); font-size: 12px; font-weight: 720; }
.focus-error:empty { display: none; }
.focus-number { max-width: 280px; }

.fixed-task-section { display: grid; gap: 16px; }
.fixed-task-section > .daily-heading { margin-bottom: 0; }
.fixed-task-callout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  color: #624310;
  background: #fff8e8;
  border: 1px solid #eed7a6;
  border-radius: 17px;
}
.fixed-task-callout > span {
  display: grid;
  place-items: center;
  min-width: 46px;
  min-height: 32px;
  padding: 0 10px;
  color: #fff;
  background: #b87715;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 850;
}
.fixed-task-callout p {
  margin: 0;
  font-size: 16px;
  font-weight: 830;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.fixed-question {
  display: grid;
  gap: 9px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.fixed-question legend {
  margin-bottom: 9px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 820;
}
.fixed-question legend em,
.fixed-reason em {
  color: var(--danger);
  font-size: 11px;
  font-style: normal;
}
.fixed-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.fixed-choice-grid label { position: relative; cursor: pointer; }
.fixed-choice-grid input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.fixed-choice-grid span {
  display: grid;
  place-items: center;
  min-height: 48px;
  color: var(--ink);
  background: #f7faf7;
  border: 1px solid var(--line);
  border-radius: 13px;
  font-size: 14px;
  font-weight: 800;
}
.fixed-choice-grid input:checked + span {
  color: var(--green-dark);
  background: var(--green-soft);
  border-color: rgba(26, 158, 85, .55);
  box-shadow: inset 0 0 0 1px rgba(26, 158, 85, .1);
}
.fixed-choice-grid input:focus-visible + span,
.photo-picker-button:focus-visible {
  outline: 3px solid rgba(26, 158, 85, .25);
  outline-offset: 2px;
}
.fixed-question.is-invalid .fixed-choice-grid {
  padding: 7px;
  background: #fff7f6;
  border: 1px solid rgba(185, 60, 55, .72);
  border-radius: 16px;
}
.fixed-reason { padding-top: 2px; }
.fixed-subsection {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.fixed-error {
  color: var(--danger);
  font-size: 11px;
  font-weight: 760;
}
.fixed-error:empty { display: none; }
.photo-uploader-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.photo-uploader-head > div { display: grid; gap: 3px; }
.photo-uploader-head b { color: var(--ink); font-size: 14px; }
.photo-uploader-head small { color: var(--muted); font-size: 11px; }
.photo-picker-button {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  min-height: 46px;
  padding: 0 16px;
  color: var(--green-dark);
  background: var(--green-soft);
  border: 1px solid rgba(26, 158, 85, .3);
  border-radius: 13px;
  font-size: 12px;
  font-weight: 820;
  cursor: pointer;
}
.photo-privacy {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  color: var(--muted);
  background: #f5f7f5;
  border-radius: 12px;
  font-size: 11px;
}
.photo-privacy span { color: var(--green-dark); font-weight: 900; }
.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.photo-preview-grid:empty { display: none; }
.photo-preview-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px;
  background: #f8faf8;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.photo-preview-card img,
.photo-placeholder {
  width: 64px;
  height: 54px;
  object-fit: cover;
  background: var(--green-soft);
  border-radius: 9px;
}
.photo-placeholder { display: grid; place-items: center; color: var(--green-dark); font-size: 22px; }
.photo-preview-copy { display: grid; gap: 4px; min-width: 0; }
.photo-preview-copy b { color: var(--ink); font-size: 11px; overflow-wrap: anywhere; }
.photo-preview-copy small { color: var(--muted); font-size: 10px; }
.photo-preview-copy .is-error { color: var(--danger); }
.photo-retry-button {
  min-height: 36px;
  padding: 0 10px;
  color: var(--danger);
  background: #fff;
  border: 1px solid rgba(185, 60, 55, .35);
  border-radius: 9px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.field-error {
  min-height: 0;
  color: var(--danger);
  font-size: 11px;
  font-weight: 760;
}
.field-error:empty { display: none; }
input.is-invalid,
textarea.is-invalid,
.unit-field:has(input.is-invalid) {
  background: #fff7f6;
  border-color: rgba(185, 60, 55, .72);
  box-shadow: 0 0 0 3px rgba(185, 60, 55, .09);
}
.daily-submit-dock { margin-top: 14px; }
.back-button {
  flex: 0 0 auto;
  min-height: 50px;
  padding: 0 15px;
  color: #fff;
  white-space: nowrap;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 13px;
  font-weight: 800;
  cursor: pointer;
}

.submit-dock {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
  padding: 14px 15px 14px 20px;
  background: rgba(23, 48, 41, .93);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(17, 47, 34, .24);
  backdrop-filter: blur(18px);
}

.submit-copy { display: grid; gap: 3px; min-width: 0; color: #fff; }
.submit-copy b { font-size: 14px; }
.submit-copy span { color: rgba(255, 255, 255, .67); font-size: 11px; }

.submit-button,
.success-card button {
  min-height: 50px;
  padding: 0 21px;
  color: #fff;
  background: linear-gradient(135deg, #27b867, #15944f);
  border: 0;
  border-radius: 15px;
  box-shadow: 0 9px 24px rgba(25, 158, 84, .24);
  font-weight: 800;
  cursor: pointer;
}

.submit-button { min-width: 170px; }
.submit-button:disabled { cursor: wait; opacity: .72; }
.submit-spinner {
  display: none;
  width: 18px;
  height: 18px;
  margin: auto;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .75s linear infinite;
}
.submit-button.is-loading .submit-label { display: none; }
.submit-button.is-loading .submit-spinner { display: block; }
.submit-message { margin: 12px 0 0; color: var(--danger); font-size: 13px; font-weight: 700; }

.success-overlay {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(17, 43, 32, .58);
  backdrop-filter: blur(13px);
}

.success-card {
  width: min(420px, 100%);
  padding: 34px 28px 28px;
  text-align: center;
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(15, 48, 33, .28);
}
.success-check {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 19px;
  color: #fff;
  background: linear-gradient(145deg, #27b867, #15944f);
  border-radius: 22px;
  font-size: 34px;
  font-weight: 900;
}
.success-card h2 { margin: 4px 0 10px; font-size: 26px; letter-spacing: -.04em; }
.success-card > p:not(.eyebrow) { margin: 0 0 22px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.success-card button { width: 100%; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 720px) {
  .page-shell { padding: max(18px, env(safe-area-inset-top)) 13px calc(20px + env(safe-area-inset-bottom)); }
  .hero { grid-template-columns: 48px minmax(0, 1fr); gap: 12px; margin-bottom: 16px; }
  .brand-mark { width: 48px; height: 48px; border-radius: 16px 16px 16px 6px; font-size: 20px; }
  .hero h1 { font-size: 24px; }
  .hero-copy > p:last-child { display: none; }
  .staff-pill { grid-column: 1 / -1; justify-self: start; min-height: 38px; padding: 0 12px; font-size: 13px; }
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .form-card { padding: 16px 14px; border-radius: 20px; }
  .section-heading { grid-template-columns: 32px minmax(0, 1fr) auto; gap: 9px; margin-bottom: 14px; }
  .step-number { width: 32px; height: 32px; }
  .section-heading h2 { font-size: 17px; }
  .field-stack, .detail-fields, .introduce-fields { grid-template-columns: 1fr; gap: 9px; }
  .phone-field { grid-column: auto; }
  .outcome-grid, .keep-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .outcome-option-wide { grid-column: 1 / -1; }
  .submit-dock { padding: 10px; border-radius: 18px; }
  .submit-copy { display: none; }
  .submit-button { width: 100%; min-width: 0; min-height: 52px; }
  .report-switcher { margin-bottom: 13px; border-radius: 17px; }
  .report-switch { min-height: 54px; padding: 8px 10px; }
  .report-switch span { font-size: 13px; }
  .report-switch small { font-size: 10px; }
  .daily-rule-banner { align-items: flex-start; padding: 13px; border-radius: 16px; }
  .daily-section { padding: 16px 14px; }
  .daily-number-grid.two-up,
  .daily-number-grid.three-up,
  .daily-number-grid.four-up,
  .buyer-repeat-grid,
  .competitor-repeat-grid { grid-template-columns: 1fr; }
  .buyer-repeat-grid .daily-field:nth-child(5) { grid-column: auto; }
  .focus-number { max-width: none; }
  .fixed-task-callout { align-items: start; padding: 13px; }
  .fixed-task-callout p { font-size: 15px; }
  .photo-uploader-head { align-items: stretch; flex-direction: column; }
  .photo-picker-button { width: 100%; }
  .photo-preview-grid { grid-template-columns: 1fr; }
}

@media (max-width: 370px) {
  .outcome-grid, .keep-grid { grid-template-columns: 1fr; }
  .outcome-option-wide { grid-column: auto; }
}

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