@font-face {
  font-family: 'Fishman Tools SC';
  src: url('assets/cjk-regular-v6.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+80-FFFF;
}
@font-face {
  font-family: 'Fishman Tools SC';
  src: url('assets/cjk-bold-v6.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+80-FFFF;
}
@font-face {
  font-family: Barlow;
  src: url('assets/barlow-condensed.ttf') format('truetype');
  font-style: italic;
  font-weight: 800;
  font-display: swap;
}
:root {
  --bg: #edf1f7;
  --ink: #07080c;
  --text: #1a1a1a;
  --muted: #8b94a3;
  --line: #e8edf5;
  --chip: #f1f4f8;
  --lime: #c6ff3d;
  --error: #b12d32;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    15px/1.55 'Fishman Tools SC',
    -apple-system,
    BlinkMacSystemFont,
    'PingFang SC',
    'Microsoft YaHei',
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
a,
summary {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  border: 0;
  background: none;
}
img {
  display: block;
  max-width: 100%;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #658928;
  outline-offset: 3px;
}
.app-shell {
  max-width: 440px;
  margin: 0 auto;
  padding: max(8px, env(safe-area-inset-top)) 15px max(20px, env(safe-area-inset-bottom));
}
.topbar {
  height: 55px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 750;
}
.icon-button {
  width: 40px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  flex-shrink: 0;
  padding: 8px;
}
.icon-button img {
  width: 24px;
  height: 24px;
}
.topbar > .icon-button:first-child {
  margin-left: -8px;
}
.topbar > .icon-button:last-child {
  margin-right: -8px;
}
.intro {
  margin: 22px 6px 18px;
}
.eyebrow {
  margin: 0;
  color: var(--muted);
  font:
    italic 800 14px/1.1 Barlow,
    'Arial Narrow',
    sans-serif;
  letter-spacing: 0.25px;
}
.intro h2 {
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -0.7px;
  line-height: 1.3;
  margin: 5px 0 9px;
}
.subtitle {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
  line-height: 1.5;
}
.setup-card {
  background: #fff;
  padding: 0 14px;
  border-radius: 14px;
}
.form-row {
  margin: 0;
  padding: 13px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
  min-height: 70px;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.field-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.field-copy strong {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}
.field-copy small {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.segments {
  display: flex;
  gap: 6px;
  min-width: 0;
}
.segments label {
  position: relative;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.segments input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.segments span {
  display: flex;
  min-height: 44px;
  padding: 9px 3px;
  align-items: center;
  justify-content: center;
  background: var(--chip);
  border-radius: 8px;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
}
.segments input:checked + span {
  background: var(--ink);
  color: var(--lime);
}
.segments input:focus-visible + span {
  outline: 3px solid #658928;
  outline-offset: 2px;
}
.flow-options span {
  font-size: 12px;
}
.stepper {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  gap: 6px;
  align-items: stretch;
}
.step-button {
  border-radius: 8px;
  min-height: 44px;
  background: var(--chip);
  display: grid;
  place-items: center;
  padding: 9px;
}
.step-button img {
  width: 21px;
  height: 21px;
  opacity: 0.75;
}
.step-button:disabled {
  opacity: 0.4;
  cursor: default;
}
.number-box {
  min-width: 0;
  border: 1px solid #e0e6ee;
  border-radius: 9px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  background: #fff;
}
.number-box input {
  width: 100%;
  min-width: 0;
  padding: 4px 0;
  border: 0;
  outline: 0;
  font:
    italic 800 29px/1 Barlow,
    'Arial Narrow',
    sans-serif;
  text-align: center;
  background: transparent;
}
input[type='number'] {
  appearance: textfield;
  -moz-appearance: textfield;
}
input::-webkit-inner-spin-button,
input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.number-box:focus-within {
  outline: 2px solid #658928;
  outline-offset: 2px;
}
.number-box span {
  color: var(--muted);
  font-size: 13px;
}
.number-box:has(input[aria-invalid='true']) {
  border-color: var(--error);
  background: #fff8f7;
}
.select-wrap {
  position: relative;
}
select {
  appearance: none;
  -webkit-appearance: none;
  min-height: 44px;
  width: 100%;
  background: var(--chip);
  border: 0;
  border-radius: 9px;
  font-size: 16px;
  font-weight: 600;
  padding: 10px 30px 10px 14px;
}
.select-wrap > img {
  pointer-events: none;
  position: absolute;
  right: 9px;
  top: 13px;
  width: 17px;
  height: 17px;
  opacity: 0.45;
}
.optional summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 5px;
  cursor: pointer;
}
summary::-webkit-details-marker {
  display: none;
}
.optional summary > span:first-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.optional summary strong {
  font-size: 15px;
  font-weight: 700;
}
.optional summary small {
  color: var(--muted);
  font-size: 11px;
}
.optional-label {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 4px;
  align-items: center;
  white-space: nowrap;
}
.optional-label img {
  width: 17px;
  height: 17px;
  opacity: 0.5;
}
.optional[open] .optional-label img {
  transform: rotate(90deg);
}
.optional-body {
  border-top: 1px solid var(--line);
  padding: 15px 0 18px;
}
.optional-grid,
.measurement-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.optional-body label,
.measurement-fields label {
  font-size: 13px;
  font-weight: 600;
}
.optional-grid input,
.measurement-fields input {
  margin-top: 7px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #e0e6ee;
  border-radius: 9px;
  background: var(--chip);
  min-height: 46px;
}
input::placeholder {
  font-size: 13px;
  color: #939dab;
  font-weight: 400;
}
.select-field {
  display: block;
  margin: 15px 0 12px;
}
.select-field select {
  display: block;
  margin-top: 7px;
  font-weight: 400;
}
.check-row {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 40px;
}
.check-row input {
  accent-color: #526d1e;
  width: 18px;
  height: 18px;
}
.guide-strip {
  border-radius: 13px;
  min-height: 104px;
  display: flex;
  align-items: center;
  margin: 15px 0 17px;
  padding: 8px 16px 8px 5px;
  background: rgba(255, 255, 255, 0.6);
}
.float-art {
  width: 52%;
  height: 88px;
  object-fit: contain;
  flex: none;
}
.guide-strip p {
  border-left: 1px solid #dce3ed;
  margin: 0;
  padding-left: 18px;
  color: #525d6c;
  font-size: 14px;
  line-height: 1.8;
}
.primary-button,
.secondary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 700;
}
.primary-button {
  color: #fff;
  background: var(--ink);
}
.primary-button img {
  width: 24px;
  height: 24px;
  filter: brightness(0) saturate(100%) invert(90%) sepia(74%) saturate(719%) hue-rotate(27deg)
    brightness(107%) contrast(104%);
}
.primary-button:hover {
  background: #202631;
}
.primary-button:active,
.step-button:active {
  transform: translateY(1px);
}
.secondary-button {
  background: var(--chip);
  color: var(--ink);
  font-size: 14px;
}
.secondary-button img {
  width: 19px;
  height: 19px;
}
.text-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 48px;
  margin: 7px auto 0;
  padding: 10px 12px;
  color: #7e8999;
  font-size: 14px;
  font-weight: 600;
}
.text-button img {
  width: 17px;
  height: 17px;
  opacity: 0.5;
}
.page-footer {
  border-top: 1px solid #e1e6ed;
  text-align: center;
  margin-top: 13px;
  padding: 14px 0 2px;
  color: var(--muted);
  font-size: 12px;
}
.notice {
  padding: 14px;
  border-radius: 11px;
  margin: 12px 0;
  font-size: 13px;
  line-height: 1.7;
}
.error-notice {
  background: #fff1ee;
  color: #972e2b;
  display: flex;
  gap: 9px;
}
.error-notice > img {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 2px;
}
.error-notice strong {
  font-size: 14px;
}
.error-notice p {
  margin: 4px 0 0;
}
.field-error {
  margin: 0;
  padding: 7px 0 10px;
  font-size: 12px;
  color: var(--error);
}
.compact-notice {
  background: #f6f9ed;
  color: #4c5d34;
}

.is-embedded .topbar { display:none; }
.is-embedded .app-shell { padding-top:8px; }
