:root{
  --j-primary:#155dfc;
  --j-primary-text:rgb(20,106,252);          /* 源站 --j-color-primary-text：勾选/边框/按钮主色 */
  --j-text:#000;
  --j-text-secondary:rgba(0,0,0,.6);
  --j-border:rgba(0,0,0,.15);                /* --j-input-color-border */
  --j-checkable-border:rgba(0,0,0,.3);       /* --j-input-checkable-color-border */
  --j-field-bg:rgba(255,255,255,.5);         /* --j-input-color-bg */
  --j-required:#ff4d4f;
  --j-radius:6px;                            /* --j-input-border-radius */
  --j-checkable-size:22px;                   /* --j-input-checkable-size */
  --j-spacing-xs:8px;
  --j-focus-ring:0 0 0 3px rgba(20,106,252,.15);
  --font:-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Hiragino Sans GB','Microsoft YaHei','Helvetica Neue',Helvetica,Arial,sans-serif;
}

*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  font-family:var(--font);
  color:var(--j-text);
  font-size:16px;
  line-height:1.5;
  min-height:100vh;
  padding-bottom:20px;
  /* 源站 .body::after：白色底 + bg 图 cover/top 固定铺满（底色在图片下层，不冲淡图片） */
  background-color:rgba(255,255,255,.9);
  background-image:url('bg.webp');
  background-position:top;
  background-repeat:no-repeat;
  background-size:cover;
  background-attachment:fixed;
  -webkit-font-smoothing:antialiased;
}

/* 外层：左右 32px 边距 → 视口 760 时表单宽 696（上限 700） */
.wrap{
  max-width:764px;
  margin:0 auto;
  padding:32px 32px 0;
}

/* 表单容器：横幅 + 内容共边拼接，整体 12px 圆角（源站 __form） */
.form-card{
  border-radius:12px;
  overflow:hidden;
}

.banner img{
  display:block;
  width:100%;
  height:auto;
}

/* 内容区：半透明白底（源站 __content） */
.content{
  background:rgba(255,255,255,.5);
}

/* 标题区：padding 32/32/0 + 标题 72 + 分隔线 16+1 = 121 */
.header{padding:32px 32px 0;}
.header .title{
  margin:0;
  text-align:center;
  font-size:24px;
  font-weight:600;
  line-height:36px;
  color:var(--j-text);
}
.divider{height:1px;margin-top:16px;background:rgb(195,201,208);}

/* 字段区：grid 行间距 40px，padding 16/32/0 */
.fields{
  display:grid;
  grid-template-columns:1fr;
  row-gap:40px;
  padding:32px 32px 0;
}

.flabel{
  position:relative;
  display:block;
  font-size:16px;
  font-weight:600;
  line-height:24px;
  color:var(--j-text);
  margin-bottom:8px;
}
/* 必填星号：源站为绝对定位（left:-12px, top:0），不占位、不推移标签文字 */
.flabel.req::before{
  content:"*";
  position:absolute;
  left:-12px;
  top:0;
  color:var(--j-required);
  font-size:16px;
  font-weight:600;
  line-height:24px;
}

/* 字段级内联报错（源站 ErrorMessage）：14px/21px、左对齐、距控件 8px，单条占位 29px */
.ferr{
  font-size:14px;
  line-height:21px;
  color:rgb(251,44,54);
  margin-top:8px;
}
.ferr[hidden]{display:none;}

/* 输入框：高 48、6px 圆角、1px 边框、半透明白底 */
.input-wrap{
  display:flex;
  align-items:center;
  gap:8px;
  height:48px;
  background:var(--j-field-bg);
  border:1px solid var(--j-border);
  border-radius:var(--j-radius);
  padding:0 12px;
  transition:border-color .15s,box-shadow .15s;
}
.input-wrap:focus-within{
  border-color:var(--j-primary-text);
  box-shadow:var(--j-focus-ring);
}
.input-wrap .prefix{
  display:flex;
  color:var(--j-text-secondary);
  flex:0 0 auto;
}
.input-wrap .prefix svg{width:18px;height:18px;}
.input-wrap input{
  flex:1;
  min-width:0;
  height:24px;
  line-height:24px;
  border:none;
  outline:none;
  background:transparent;
  font-size:16px;
  font-family:inherit;
  color:var(--j-text);
}
.input-wrap input::placeholder{color:rgba(0,0,0,.4);}
.input-wrap .suffix{
  display:flex;
  color:var(--j-text-secondary);
  flex:0 0 auto;
}
.input-wrap .suffix svg{width:20px;height:20px;}

/* 清除按钮 */
.clear{
  display:none;
  border:none;
  background:rgba(0,0,0,.25);
  width:18px;height:18px;
  border-radius:50%;
  cursor:pointer;
  flex:0 0 auto;
  padding:0;
  position:relative;
}
.clear::before,.clear::after{
  content:"";
  position:absolute;
  left:50%;top:50%;
  width:9px;height:1.6px;
  background:#fff;
  transform:translate(-50%,-50%) rotate(45deg);
}
.clear::after{transform:translate(-50%,-50%) rotate(-45deg);}
.input-wrap.has-value:hover .clear,
.input-wrap:focus-within.has-value .clear{display:block;}

/* ---------- 单选 / 多选：共边纵向列表 ---------- */
.choices{
  display:flex;
  flex-direction:column;
  border-radius:var(--j-radius);
}
.choice{
  position:relative;
  display:flex;
  align-items:flex-start;
  gap:12px;
  border:1px solid var(--j-border);
  /* 非末项：去掉底边与底部圆角，形成共边列表 */
  border-bottom-width:0;
  border-bottom-left-radius:0;
  border-bottom-right-radius:0;
  border-top-left-radius:var(--j-radius);
  border-top-right-radius:var(--j-radius);
  padding:11px 12px;
  cursor:pointer;
  background:var(--j-field-bg);
  transition:border-color .15s,background .15s;
  user-select:none;
}
.choice + .choice{
  border-top-left-radius:0;
  border-top-right-radius:0;
}
.choice:last-child{
  border-bottom-width:1px;
  border-bottom-left-radius:var(--j-radius);
  border-bottom-right-radius:var(--j-radius);
}
/* 勾选项：蓝框闭合 + 浅蓝底 */
.choice:has(input:checked){
  border-color:var(--j-primary-text);
  border-bottom-width:1px;
  background:linear-gradient(var(--j-field-bg),var(--j-field-bg)),
             linear-gradient(rgba(20,106,252,.1),rgba(20,106,252,.1));
}
.choice:has(input:checked) + .choice{
  border-top-width:0;
}
/* 仅隐藏选项自身的单选/复选控件，避免误伤「其他」行内的补充信息输入框 */
.choice > input[type="radio"],
.choice > input[type="checkbox"]{position:absolute;opacity:0;width:0;height:0;}

/* 勾选控件：22px / 1px 边框 / 6px 圆角（单选框为圆形） */
.mark{
  flex:0 0 auto;
  width:var(--j-checkable-size);
  height:var(--j-checkable-size);
  margin-top:1px;
  border:1px solid var(--j-checkable-border);
  border-radius:var(--j-radius);
  background:var(--j-field-bg);
  position:relative;
  transition:border-color .15s,background .15s;
}
.mark.radio{border-radius:50%;}

/* 多选：选中为实心蓝底 + 白色勾 */
.choice input:checked ~ .mark.check{
  border-color:var(--j-primary-text);
  background-color:var(--j-primary-text);
  background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
  background-repeat:no-repeat;
  background-position:center;
  background-size:100% 100%;
}
/* 单选：选中为实心蓝圆 + 白色圆点 */
.choice input:checked ~ .mark.radio{
  border-color:var(--j-primary-text);
  background:var(--j-primary-text);
}
.choice input:checked ~ .mark.radio::after{
  content:"";
  position:absolute;
  left:50%;top:50%;
  width:10px;height:10px;
  background:#fff;
  border-radius:50%;
  transform:translate(-50%,-50%);
}

.cbody{
  flex:1;
  min-width:0;
  display:block;
}
.ctext{display:block;font-size:16px;line-height:24px;color:var(--j-text);}

/* 「其他」展开的补充信息输入（高度 0 → 56px，含 8px 间距） */
.other-slot{
  display:block;
  overflow:hidden;
  height:0;
  padding-top:0;
  opacity:0;
  transition:height .3s ease,padding-top .3s ease,opacity .3s ease;
}
.choice.is-other-open .other-slot{
  height:56px;
  padding-top:8px;
  opacity:1;
}
.other-slot .input-wrap{height:48px;}

/* ---------- 公司地址：级联 + 详细地址 + 定位/改址链接 ---------- */
.address-field{
  display:flex;
  flex-direction:column;
  gap:var(--j-spacing-xs);
}
.input-wrap.cascade{cursor:pointer;}
.input-wrap.cascade input{cursor:pointer;}
.addr-link{
  display:flex;
  align-items:center;
  align-self:flex-start;
  gap:var(--j-spacing-xs);
  margin-top:4px;
  padding:0;
  height:24px;
  border:none;
  background:none;
  color:var(--j-primary-text);
  font-size:16px;
  font-family:inherit;
  line-height:1;
  cursor:pointer;
}
.addr-link-icon{display:flex;flex:0 0 auto;}
.addr-link-icon svg{width:20px;height:20px;}

/* 地图：容器 288 = 边框 2 + 头部 46 + 图片 240 */
.map-box{
  border:1px solid var(--j-border);
  border-radius:var(--j-radius);
  overflow:hidden;
  background:var(--j-field-bg);
}
.map-head{
  display:flex;
  align-items:center;
  gap:8px;
  height:46px;
  padding:0 14px;
  font-size:15px;
  line-height:22px;
  color:var(--j-text);
  border-bottom:1px solid var(--j-border);
}
.map-head svg{width:20px;height:20px;color:var(--j-primary);}
.map-img{display:block;width:100%;height:240px;object-fit:cover;}

/* 卡片页脚：padding 32/32/64 + 按钮 46 = 142 */
.cfooter{
  display:flex;
  justify-content:center;
  margin-top:8px;
  padding:32px 32px 64px;
}
.submit-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:46px;
  padding:11px 40px;
  border:none;
  border-radius:var(--j-radius);
  background:var(--j-primary-text);
  color:#fff;
  font-size:16px;
  font-weight:600;
  line-height:24px;
  font-family:inherit;
  cursor:pointer;
  transition:background .15s;
}
.submit-btn:active{background:rgb(17,84,225);}

/* 页面页脚：全宽 flex 纵向居中（源站 root: x=0,760 / padding 0 16 / margin 0 0 20） */
.page-footer{
  display:flex;
  flex-direction:column;
  align-items:center;
  margin:32px 0 0;
  padding:0 16px;
  font-size:14px;
  line-height:21px;
  color:rgba(0,0,0,.5);
}
.page-footer p{margin:0;}
.pf-link{color:rgb(22,119,255);text-decoration:none;cursor:pointer;}
.branding{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  width:100%;
  margin-top:8px;
}
.branding svg{width:14px;height:14px;color:rgba(0,0,0,.4);}

/* 级联弹层 */
.cascade-mask{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.4);
  display:flex;
  align-items:flex-end;
  justify-content:center;
  z-index:50;
}
.cascade-mask[hidden]{display:none;}
.cascade-panel{
  background:#fff;
  width:100%;
  max-width:560px;
  border-radius:16px 16px 0 0;
  max-height:80vh;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.cascade-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 18px;
  border-bottom:1px solid var(--j-border);
}
.cascade-title{font-size:16px;font-weight:600;}
.cascade-close{
  border:none;background:none;font-size:24px;line-height:1;
  color:var(--j-text-secondary);cursor:pointer;padding:0 4px;
}
.cascade-cols{
  display:flex;
  overflow:hidden;
  height:50vh;
}
.cascade-cols .col{
  flex:1;
  overflow-y:auto;
  border-right:1px solid var(--j-border);
}
.cascade-cols .col:last-child{border-right:none;}
.cascade-cols .opt{
  padding:12px 14px;
  font-size:15px;
  cursor:pointer;
  color:var(--j-text);
  border-bottom:1px solid rgba(0,0,0,.04);
}
.cascade-cols .opt.active{color:var(--j-primary);font-weight:600;background:rgba(21,93,252,.05);}
.cascade-cols .opt:hover{background:rgba(0,0,0,.03);}

/* Toast */
.toast{
  position:fixed;
  left:50%;top:20%;
  transform:translateX(-50%);
  background:rgba(0,0,0,.8);
  color:#fff;
  padding:10px 18px;
  border-radius:8px;
  font-size:14px;
  z-index:60;
}
.toast[hidden]{display:none;}

/* 悬浮 */
.fixed{
  top: 32px;
  left: calc(50% + 350px + 2rem);
  padding: 12px;
  border-radius: 6px;
  /* padding: var(--j-spacing-sm); */
  /* border-radius: var(--j-border-radius); */
  background-color: #fff;
  position: fixed;
  overflow: hidden;
  box-shadow: 0 2px 4px #0000001f; 
}

/* 桌面端：弹层居中 */
@media (min-width:600px){
  .cascade-panel{border-radius:16px;margin-bottom:auto;margin-top:auto;}
  .cascade-mask{align-items:center;}
  .cascade-cols{height:320px;}
}

/* 移动端：仅收敛外层左右边距，保持表单内部 32px */
@media (max-width:560px){
  :root{
    --j-checkable-size: 16px
  }
  body{padding-bottom: 0;}
  .wrap{padding:0;}
  .form-card{border-radius: 0;}
  .header,
  .fields{
    padding: 20px 20px 0;
  }
  .header .title{
    font-size: 20px;
    line-height: 32px;
  }
  .input-wrap{
    height: 42px;
  }
  .input-wrap input{
    font-size: 14px;
  }
  .choice {
    gap: 8px;
  }
  .mark {
    margin-top: 4px;
  }
  .ctext{
    font-size: 14px;
  }
  .fixed{display: none;}
}
