/* ACPHARM Supplement Formula Creator — leaf theme */
.acb {
  --acb-primary: #2E7D3E;
  --acb-accent: #7CC94E;
  --acb-dark: #1F3D2A;
  --acb-text: #24352A;
  --acb-muted: #5E6E63;
  --acb-line: #DCE8D5;
  --acb-cream: #F5FAEF;
  --acb-mint: #EAF5E2;
  --acb-sun: #F6C445;
  --acb-err: #B3261E;
  --acb-warn: #8A5A00;
  --acb-fill: var(--acb-accent);
  --acb-capcolor: #9CD67A;
  --acb-capline: #6E8F78;
  --acb-r: 18px;
  font-family: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--acb-text);
  font-size: 17px;
  line-height: 1.55;
  padding: 0 0 32px;
  box-sizing: border-box;
  background: var(--acb-cream);
  border-radius: 24px;
  overflow: clip;
}
.acb *, .acb *::before, .acb *::after { box-sizing: border-box; }
.acb h2, .acb h3, .acb h4 { font-family: inherit; color: var(--acb-dark); margin: 0; padding: 0; line-height: 1.2; font-weight: 800; letter-spacing: 0; text-transform: none; }
.acb p { margin: 0; padding: 0; }
.acb button { font-family: inherit; cursor: pointer; }
.acb input, .acb select, .acb textarea {
  font-family: inherit; font-size: 18px; color: var(--acb-text); background: #fff;
  border: 2px solid #C9D9C0; border-radius: 12px; padding: 11px 14px; width: 100%;
  min-height: 52px; margin: 0; box-shadow: none; line-height: 1.3;
}
.acb input:focus, .acb select:focus, .acb textarea:focus { outline: none; border-color: var(--acb-primary); box-shadow: 0 0 0 4px rgba(124, 201, 78, .35); }
.acb :focus-visible { outline: 3px solid var(--acb-sun); outline-offset: 2px; }
.acb-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.acb-muted { color: var(--acb-muted); }
.acb-green { color: var(--acb-primary); }
.acb b { font-weight: 800; }

/* Width: break out of narrow theme content columns (ID selector beats theme layout rules). */
#acb-app.acb { width: min(1280px, calc(100vw - 32px)); max-width: none; margin: 0 0 0 calc(50% - min(640px, 50vw - 16px)) !important; }

/* Hero */
.acb-hero { position: relative; background: linear-gradient(135deg, #1F6B33 0%, #2E8B45 45%, #6DB842 100%); color: #fff; padding: 34px 32px 26px; overflow: hidden; }
.acb-deco { position: absolute; right: 0; top: 0; height: 100%; width: 60%; pointer-events: none; }
.acb-hero-in { position: relative; max-width: 900px; }
.acb-logo { height: 44px; width: auto; margin-bottom: 12px; filter: brightness(0) invert(1); opacity: .95; }
.acb-hero .acb-title { color: #fff; font-size: 36px; }
.acb-intro { font-size: 19px; margin-top: 6px !important; opacity: .95; max-width: 60ch; }
.acb-help { margin-top: 12px !important; font-size: 16px; }
.acb-call { display: inline-block; background: #fff; color: var(--acb-dark) !important; font-weight: 800; border-radius: 999px; padding: 6px 14px; margin-left: 6px; text-decoration: none !important; }
.acb-progress { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; }
.acb-progress li { margin: 0; padding: 0; }
.acb-progress button { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.14); color: #fff; border: 1.5px solid rgba(255,255,255,.35); border-radius: 999px; padding: 6px 14px 6px 6px; font-size: 15px; font-weight: 700; }
.acb-progress button:hover { background: rgba(255,255,255,.24); }
.acb-progress .acb-leafnum { background: #fff; color: var(--acb-primary); }
.acb-progress li.is-done .acb-leafnum { background: var(--acb-sun); color: var(--acb-dark); }
.acb-progress li.is-done .acb-leafnum::after { content: "✓"; }
.acb-progress li.is-done .acb-leafnum { font-size: 0; }
.acb-progress li.is-done .acb-leafnum::after { font-size: 15px; }

/* Leaf number badge */
.acb-leafnum { width: 30px; height: 30px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 0 50% 0 50%; background: var(--acb-primary); color: #fff; font-weight: 800; font-size: 15px; }
.acb-leafnum-lg { width: 46px; height: 46px; font-size: 22px; background: linear-gradient(135deg, var(--acb-primary), var(--acb-accent)); box-shadow: 0 4px 10px rgba(46,125,62,.25); }

/* Layout */
.acb-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; padding: 24px 24px 0; align-items: start; }
.acb-steps { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.acb-card { background: #fff; border: 1px solid var(--acb-line); border-radius: var(--acb-r); padding: 24px; box-shadow: 0 2px 0 rgba(31,61,42,.03); scroll-margin-top: 90px; min-width: 0; }
.acb-stephead { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.acb-stephead h3 { font-size: 25px; }
.acb-stephead p { color: var(--acb-muted); margin-top: 4px !important; }
.acb-label { font-weight: 800; color: var(--acb-dark); margin: 18px 0 8px !important; }

/* Buttons */
.acb-btn { border: 0; border-radius: 14px; padding: 14px 20px; font-size: 17px; font-weight: 800; line-height: 1.2; min-height: 52px; transition: transform .1s, background .15s, opacity .15s; }
.acb-btn:active:not(:disabled) { transform: translateY(1px); }
.acb-btn:disabled { opacity: .45; cursor: not-allowed; }
.acb-btn-go { background: var(--acb-primary); color: #fff; }
.acb-btn-go:hover:not(:disabled) { background: #256A33; }
.acb-btn-soft { background: var(--acb-mint); color: var(--acb-primary); }
.acb-btn-soft:hover { background: #DCEFD0; }
.acb-btn-send { width: 100%; background: linear-gradient(135deg, #2E7D3E, #4E9F31); color: #fff; font-size: 20px; min-height: 60px; }
.acb-wide { width: 100%; }
.acb-next { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 16px; border-top: 2px dashed var(--acb-line); }

/* Step 1 */
.acb-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.acb-tab { display: inline-flex; align-items: center; gap: 8px; border: 2px solid var(--acb-line); background: #fff; color: var(--acb-dark); border-radius: 999px; padding: 7px 14px 7px 8px; font-size: 16px; font-weight: 700; min-height: 48px; }
.acb-tab small { font-size: 13px; color: var(--acb-muted); font-weight: 700; }
.acb-tab:hover { border-color: var(--c); }
.acb-tab.is-on { background: var(--c); border-color: var(--c); color: #fff; }
.acb-tab.is-on small { color: rgba(255,255,255,.85); }
.acb-tab-ic, .acb-tile-ic { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--c); background: color-mix(in srgb, var(--c) 14%, #fff); flex: none; }
.acb-tab.is-on .acb-tab-ic { background: #fff; }
.acb-search { display: block; margin-bottom: 14px; }
.acb-search span { display: block; font-weight: 700; margin-bottom: 6px; color: var(--acb-dark); font-size: 16px; }
.acb-search input { padding-left: 46px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%235E6E63' stroke-width='2.4'%3E%3Ccircle cx='8.5' cy='8.5' r='6'/%3E%3Cpath d='M13 13l5 5'/%3E%3C/svg%3E") no-repeat 15px center; }
.acb-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; max-height: 520px; overflow-y: auto; padding: 4px; margin: -4px; }
.acb-tile { display: flex; align-items: center; gap: 10px; text-align: left; background: #fff; border: 2px solid var(--acb-line); border-radius: 14px; padding: 10px 12px; min-height: 64px; color: var(--acb-text); }
.acb-tile:hover { border-color: var(--c); background: color-mix(in srgb, var(--c) 5%, #fff); }
.acb-tile.is-on { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); box-shadow: inset 0 0 0 1px var(--c); }
.acb-tile-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.acb-tile-name { font-weight: 800; font-size: 16px; line-height: 1.25; }
.acb-tile-sub { font-size: 13px; color: var(--acb-muted); }
.acb-tick { width: 30px; height: 30px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; border: 2px solid var(--acb-line); color: var(--acb-muted); }
.acb-tile.is-on .acb-tick { background: var(--c); border-color: var(--c); color: #fff; }
.acb-none { padding: 18px; background: var(--acb-cream); border-radius: 12px; grid-column: 1 / -1; }

/* Step 2 */
.acb-empty { text-align: center; padding: 26px; background: var(--acb-cream); border-radius: 14px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.acb-empty-ic { color: var(--acb-accent); }
.acb-empty-ic svg { width: 40px; height: 40px; }
.acb-amount { border: 2px solid var(--acb-line); border-left: 6px solid var(--c); border-radius: 16px; padding: 16px 18px; margin-bottom: 12px; background: #fff; }
.acb-amount-top { display: flex; align-items: center; gap: 12px; }
.acb-amount-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.acb-amount-name b { font-size: 19px; color: var(--acb-dark); }
.acb-amount-name span { font-size: 15px; color: var(--acb-muted); }
.acb-amount-name span b { font-size: 15px; color: var(--acb-primary); }
.acb-remove { background: none; border: 0; color: var(--acb-muted); font-size: 15px; font-weight: 700; padding: 8px 10px; border-radius: 10px; min-height: 44px; }
.acb-remove:hover { background: #FDECEA; color: var(--acb-err); }
.acb-stepper { display: flex; align-items: center; gap: 10px; margin: 14px 0 6px; }
.acb-pm { width: 56px; height: 56px; flex: none; border-radius: 50%; border: 0; background: var(--acb-mint); color: var(--acb-primary); font-size: 30px; font-weight: 800; line-height: 1; touch-action: manipulation; user-select: none; }
.acb-pm:hover { background: var(--acb-primary); color: #fff; }
.acb-numwrap { position: relative; flex: 1; max-width: 220px; }
.acb-numwrap input { text-align: center; font-size: 24px; font-weight: 800; padding-right: 56px; height: 56px; }
.acb-unit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--acb-muted); font-weight: 700; pointer-events: none; }
.acb-slider { margin-top: 8px; }
.acb-slider input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 14px; min-height: 0; padding: 0; border: 0; border-radius: 999px;
  background: linear-gradient(90deg, #E7ECE4 0 var(--s1), #B9E39A var(--s1) var(--s2), #E7ECE4 var(--s2) 100%);
}
.acb-slider input[type=range]:focus { box-shadow: 0 0 0 4px rgba(124, 201, 78, .35); }
.acb-slider input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; border-radius: 50%; background: var(--acb-primary); border: 4px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3); cursor: pointer; }
.acb-slider input[type=range]::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: var(--acb-primary); border: 4px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3); cursor: pointer; }
.acb-slider-labels { display: flex; justify-content: space-between; font-size: 13px; color: var(--acb-muted); margin-top: 4px; font-weight: 700; }
.acb-note { margin-top: 10px !important; font-size: 15px; padding: 8px 12px; border-radius: 10px; }
.acb-note:empty { display: none; }
.acb-note.is-ok { background: var(--acb-mint); color: #1E6A30; }
.acb-note.is-info { background: #F3F6F1; color: var(--acb-muted); }
.acb-note.is-warn { background: #FFF4D6; color: var(--acb-warn); font-weight: 700; }

/* Step 3 */
.acb-real { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; background: repeating-linear-gradient(90deg, transparent 0 9px, rgba(46,125,62,.06) 9px 10px), var(--acb-cream); border-radius: 14px; padding: 18px; }
.acb-real-row { display: flex; align-items: center; gap: 18px; }
.acb-real p { flex: 1; min-width: 220px; }
.acb-real small { color: var(--acb-muted); }
.acb-capsvg { display: block; overflow: visible; filter: drop-shadow(0 2px 2px rgba(31,61,42,.18)); }
.acb-capfill { transition: width .45s ease; }
.acb-coin { display: block; flex: none; }
.acb-sizes { display: grid; grid-template-columns: 1fr; gap: 10px; }
.acb-size.is-disabled { opacity: .5; cursor: not-allowed; }
.acb-size-caps.is-no { color: var(--acb-err); }
.acb-size { position: relative; display: flex; gap: 12px; align-items: center; border: 2px solid var(--acb-line); border-radius: 14px; padding: 12px 14px; cursor: pointer; background: #fff; }
.acb-size input, .acb-opt input, .acb-pill input { position: absolute; opacity: 0; pointer-events: none; }
.acb-size:hover, .acb-opt:hover, .acb-pill:hover { border-color: var(--acb-accent); }
.acb-size.is-on, .acb-opt.is-on, .acb-pill.is-on { border-color: var(--acb-primary); background: var(--acb-mint); box-shadow: inset 0 0 0 1px var(--acb-primary); }
.acb-size:has(input:focus-visible), .acb-opt:has(input:focus-visible), .acb-pill:has(input:focus-visible) { outline: 3px solid var(--acb-sun); outline-offset: 2px; }
.acb-size-pic { width: 120px; flex: none; min-height: 48px; align-items: center; display: flex; justify-content: center; }
.acb-size-auto { color: var(--acb-accent); }
.acb-size-auto svg { width: 40px; height: 40px; }
.acb-size-text { display: flex; flex-direction: column; font-size: 15px; color: var(--acb-muted); }
.acb-size-text b { font-size: 17px; color: var(--acb-dark); }
.acb-size-caps { color: var(--acb-primary); font-size: 15px; margin-top: 2px; }
.acb-size-caps b { color: var(--acb-primary); font-size: 15px; }

/* Step 4 */
.acb-supply { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.acb-opt { position: relative; display: flex; flex-direction: column; border: 2px solid var(--acb-line); border-radius: 14px; padding: 14px 16px; cursor: pointer; background: #fff; }
.acb-opt-days { font-weight: 800; font-size: 18px; color: var(--acb-dark); }
.acb-opt-last { font-size: 15px; color: var(--acb-text); }
.acb-supply-wait { grid-column: 1 / -1; background: var(--acb-cream); border-radius: 12px; padding: 14px; }
.acb-opt-price { font-size: 24px; font-weight: 800; color: var(--acb-primary); font-variant-numeric: tabular-nums; }
.acb-opt-sub { font-size: 14px; color: var(--acb-muted); }
.acb-timing { border: 0; padding: 0; margin: 20px 0 0; min-width: 0; }
.acb-timing legend { font-weight: 800; color: var(--acb-dark); padding: 0; margin-bottom: 8px; }
.acb-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.acb-pill { position: relative; border: 2px solid var(--acb-line); border-radius: 999px; padding: 10px 18px; cursor: pointer; background: #fff; font-weight: 700; min-height: 48px; display: inline-flex; align-items: center; }
.acb-form { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; padding-top: 22px; border-top: 2px dashed var(--acb-line); }
.acb-form h4 { font-size: 21px; }
.acb-field { display: flex; flex-direction: column; gap: 6px; font-weight: 800; color: var(--acb-dark); }
.acb-field i { font-style: normal; font-weight: 600; color: var(--acb-muted); }
.acb-custom { margin-top: 14px; max-width: 280px; }
.acb-hp { position: absolute !important; left: -9999px; }
.acb-msg { font-size: 15px; border-radius: 10px; padding: 10px 12px; }
.acb-msg[hidden] { display: none; }
.acb-msg-err { background: #FDECEA; color: var(--acb-err); font-weight: 700; }
.acb-msg-warn { background: #FFF4D6; color: var(--acb-warn); }
.acb-msg-info { background: #EEF6FB; color: #23577A; }
.acb-disclaimer { font-size: 14px; color: var(--acb-muted); }
.acb-done { text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; padding: 26px 10px; margin-top: 20px; background: var(--acb-mint); border-radius: 16px; }
.acb-done-ic { width: 64px; height: 64px; border-radius: 0 50% 0 50%; background: var(--acb-primary); color: #fff; font-size: 32px; display: flex; align-items: center; justify-content: center; }

/* Summary */
.acb-side { position: sticky; top: 24px; }
.acb-summary { display: flex; flex-direction: column; gap: 12px; background: linear-gradient(180deg, #fff 0%, #fff 60%, var(--acb-mint) 100%); }
.acb-summary h3 { font-size: 22px; }
.acb-caps { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; min-height: 120px; padding: 18px 10px; background: var(--acb-cream); border-radius: 14px; transition: opacity .2s; }
.acb-caps.is-loading { opacity: .6; }
.acb-more { font-weight: 800; font-size: 20px; color: var(--acb-dark); }
.acb-fillnote { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--acb-muted); font-weight: 700; }
.acb-fillnote span { position: relative; flex: 0 0 90px; height: 10px; border-radius: 999px; background: #E7ECE4; overflow: hidden; }
.acb-fillnote span::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--acb-accent); border-radius: 999px; transition: width .4s; }
.acb-sum-line { font-size: 20px; color: var(--acb-dark); }
.acb-sum-size { color: var(--acb-muted); font-size: 15px; margin-top: -8px !important; }
.acb-price { display: flex; flex-direction: column; border-top: 2px dashed var(--acb-line); padding-top: 12px; }
.acb-price span { font-size: 15px; color: var(--acb-muted); }
.acb-price b { font-size: 40px; color: var(--acb-dark); line-height: 1.1; font-variant-numeric: tabular-nums; }

/* Mobile bar */
.acb-bar { display: none; }

/* Staff */
.acb-staff { margin: 22px 24px 0; }
.acb-staff h3 { font-size: 18px; margin-bottom: 12px; }
.acb-table-wrap { overflow-x: auto; }
.acb-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; margin: 0; }
.acb-table th, .acb-table td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--acb-line); vertical-align: top; }
.acb-table th { background: var(--acb-cream); font-weight: 800; color: var(--acb-dark); white-space: nowrap; }
.acb-table small { color: var(--acb-muted); }
.acb-table tr.is-sel td { background: var(--acb-mint); }
.acb-table tr.acb-sub td { color: var(--acb-muted); }
.acb-staff-grid { display: grid; grid-template-columns: minmax(280px, 1fr) 1.4fr; gap: 18px; margin-top: 16px; align-items: start; }
.acb-kv { margin: 0; font-size: 14px; }
.acb-kv div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px dashed var(--acb-line); }
.acb-kv dt { color: var(--acb-muted); margin: 0; }
.acb-kv dd { margin: 0; text-align: right; }

/* Responsive */
@media (max-width: 1020px) {
  .acb-layout { grid-template-columns: 1fr; }
  .acb-side { position: static; order: -1; }
  .acb-staff-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .acb { font-size: 16px; padding-bottom: 96px; border-radius: 16px; }
  #acb-app.acb { width: auto; margin: 0 !important; }
  .acb-hero { padding: 24px 16px 20px; }
  .acb-hero .acb-title { font-size: 28px; }
  .acb-intro { font-size: 17px; }
  .acb-progress button span:last-child { display: none; }
  .acb-progress button { padding: 6px; }
  .acb-layout { padding: 16px 12px 0; gap: 16px; }
  .acb-steps { gap: 16px; }
  .acb-card { padding: 18px 14px; border-radius: 16px; }
  .acb-stephead h3 { font-size: 21px; }
  .acb-leafnum-lg { width: 40px; height: 40px; font-size: 19px; }
  .acb-side { display: none; }
  .acb-tiles { grid-template-columns: 1fr; max-height: 420px; }
  .acb-amount { padding: 14px 12px; }
  .acb-remove span { display: none; }
  .acb-numwrap { max-width: none; }
  .acb-real { padding: 14px; }
  .acb-sizes { grid-template-columns: 1fr; }
  .acb-size-pic { width: 84px; }
  .acb-size { padding: 12px 10px; gap: 10px; }
  .acb-supply { grid-template-columns: 1fr 1fr; }
  .acb-staff { margin: 16px 12px 0; }
  .acb-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999; gap: 12px; align-items: center; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 3px solid var(--acb-accent); box-shadow: 0 -6px 18px rgba(31,61,42,.12); font-family: "Nunito", system-ui, sans-serif; }
  .acb-bar-cap { flex: none; }
  .acb-bar-text { flex: 1; display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
  .acb-bar-text b { font-size: 20px; color: var(--acb-dark); }
  .acb-bar-text span { font-size: 14px; color: var(--acb-muted); }
  .acb-bar .acb-btn { padding: 12px 18px; }
}
