/* Shared custom dropdown — cream field, contained menu, no native overflow */
.calc-l select,
.gen-card select{
  width:100%;
  max-width:100%;
  height:52px;
  padding:0 40px 0 16px;
  border:1.5px solid var(--line2);
  border-radius:13px;
  font-size:15px;
  font-family:var(--fb);
  font-weight:600;
  color:var(--ink);
  background:var(--cream) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%235F5B54' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center;
  appearance:none;
  -webkit-appearance:none;
  box-sizing:border-box;
}
.calc-l select:focus,
.gen-card select:focus{
  outline:none;
  border-color:var(--org);
  background-color:#fff;
  box-shadow:0 0 0 4px var(--org-soft);
}

.dd{position:relative;min-width:0;width:100%}
.dd-native{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none;overflow:hidden}
.dd-btn{
  width:100%;
  max-width:100%;
  height:52px;
  padding:0 40px 0 16px;
  border:1.5px solid var(--line2);
  border-radius:13px;
  font-size:15px;
  font-family:var(--fb);
  font-weight:600;
  line-height:1;
  background:var(--cream);
  color:var(--ink);
  text-align:left;
  cursor:pointer;
  position:relative;
  box-sizing:border-box;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.dd-btn:focus{outline:none;border-color:var(--org);background:#fff;box-shadow:0 0 0 4px var(--org-soft)}
.dd-btn::after{
  content:"";
  position:absolute;
  right:16px;
  top:50%;
  width:8px;
  height:8px;
  border-right:2px solid var(--soft);
  border-bottom:2px solid var(--soft);
  transform:translateY(-70%) rotate(45deg);
  pointer-events:none;
}
.dd.open .dd-btn{border-color:var(--org);background:#fff}
.dd-menu{
  display:none;
  position:absolute;
  left:0;
  right:0;
  top:calc(100% + 6px);
  width:100%;
  max-width:100%;
  margin:0;
  padding:6px 0;
  list-style:none;
  background:#fff;
  border:1.5px solid var(--ink);
  border-radius:13px;
  box-shadow:4px 4px 0 var(--line2);
  z-index:40;
  box-sizing:border-box;
  max-height:220px;
  overflow-x:hidden;
  overflow-y:auto;
}
.dd.open .dd-menu{display:block}
.dd-menu li{
  padding:10px 16px;
  font-size:15px;
  font-weight:600;
  cursor:pointer;
  overflow-wrap:anywhere;
}
.dd-menu li:hover,
.dd-menu li[aria-selected="true"]{background:var(--peach)}

.gen-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:16px;
  align-items:end;
}
.gen-row>*{min-width:0}
.gen-row:has(> .gen-btn),
.gen-row:has(> div > .gen-btn){
  grid-template-columns:minmax(0,1fr) auto;
}
.gen-row .gen-btn{
  margin-top:0;
  width:auto;
  height:52px;
  padding:0 28px;
  white-space:nowrap;
  line-height:1;
  box-sizing:border-box;
}
@media(max-width:720px){
  .gen-row{grid-template-columns:1fr!important}
  .gen-row .gen-btn{width:100%}
}

.calc-l select,
.calc-l .dd-btn{font-size:16px}
.calc-card:has(.dd){overflow:visible}
.calc-card:has(.dd) .calc-r{overflow:hidden;border-radius:0 24px 24px 0}
@media(max-width:760px){
  .calc-card:has(.dd) .calc-r{border-radius:0 0 24px 24px}
}

/* checkboxes + radios */
.choice-row{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px 20px;
  margin:0 0 8px;
}
.gen-card .choice,
.calc-l .choice{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin:0;
  padding:6px 0;
  font-family:var(--fb);
  font-weight:600;
  font-size:14px;
  line-height:1;
  text-transform:none;
  letter-spacing:0;
  color:var(--ink);
  cursor:pointer;
  user-select:none;
}
.choice input[type="checkbox"],
.choice input[type="radio"]{
  appearance:none;
  -webkit-appearance:none;
  width:18px;
  height:18px;
  margin:0;
  flex:none;
  border:1.5px solid var(--ink);
  border-radius:5px;
  background:#fff;
  display:grid;
  place-items:center;
  cursor:pointer;
  box-sizing:border-box;
}
.choice input[type="radio"]{border-radius:50%}
.choice input[type="checkbox"]:checked{
  background:var(--org);
  border-color:var(--ink);
}
.choice input[type="checkbox"]:checked::after{
  content:"";
  width:9px;
  height:5px;
  border-left:2px solid #fff;
  border-bottom:2px solid #fff;
  transform:translateY(-1px) rotate(-45deg);
}
.choice input[type="radio"]:checked::after{
  content:"";
  width:8px;
  height:8px;
  border-radius:50%;
  background:var(--org);
}
.choice input[type="checkbox"]:focus-visible,
.choice input[type="radio"]:focus-visible{
  outline:none;
  box-shadow:0 0 0 4px var(--org-soft);
}

/* date + time fields */
.gen-card input[type="date"],
.gen-card input[type="time"],
.calc-l input[type="date"],
.calc-l input[type="time"]{
  width:100%;
  max-width:100%;
  height:52px;
  padding:0 14px;
  border:1.5px solid var(--line2);
  border-radius:13px;
  font-size:15px;
  font-family:var(--fb);
  font-weight:600;
  color:var(--ink);
  background:var(--cream);
  color-scheme:light;
  box-sizing:border-box;
  min-width:0;
}
.gen-card input[type="date"]:focus,
.gen-card input[type="time"]:focus,
.calc-l input[type="date"]:focus,
.calc-l input[type="time"]:focus{
  outline:none;
  border-color:var(--org);
  background:#fff;
  box-shadow:0 0 0 4px var(--org-soft);
}
.gen-card input[type="date"]::-webkit-datetime-edit,
.gen-card input[type="date"]::-webkit-datetime-edit-fields-wrapper,
.gen-card input[type="date"]::-webkit-datetime-edit-text,
.gen-card input[type="date"]::-webkit-datetime-edit-month-field,
.gen-card input[type="date"]::-webkit-datetime-edit-day-field,
.gen-card input[type="date"]::-webkit-datetime-edit-year-field,
.gen-card input[type="time"]::-webkit-datetime-edit,
.gen-card input[type="time"]::-webkit-datetime-edit-fields-wrapper,
.gen-card input[type="time"]::-webkit-datetime-edit-text,
.gen-card input[type="time"]::-webkit-datetime-edit-hour-field,
.gen-card input[type="time"]::-webkit-datetime-edit-minute-field,
.gen-card input[type="time"]::-webkit-datetime-edit-ampm-field,
.calc-l input[type="date"]::-webkit-datetime-edit,
.calc-l input[type="time"]::-webkit-datetime-edit{
  font-family:var(--fb);
  font-size:15px;
  font-weight:600;
  color:var(--ink);
  padding:0;
}
.gen-card input[type="date"]::-webkit-calendar-picker-indicator,
.gen-card input[type="time"]::-webkit-calendar-picker-indicator,
.calc-l input[type="date"]::-webkit-calendar-picker-indicator,
.calc-l input[type="time"]::-webkit-calendar-picker-indicator{
  cursor:pointer;
  opacity:.7;
  margin:0;
}
