/* SLT MRA Works Style v11. Loaded only while swk11 is active (see SLT_MRA_V11_LIVE in slt-mra-works.php).
   1) hero market card: white card in the palette of the white hero, with a bell curve and a vertical line for this job
   2) price figure: tabular digits so the count-up does not shake the layout
   3) price-range cards (front page, /service/*): no beige panel, one row, slider
   Hidden start states exist only under html.swk11-js (set in <head> only when the animation can run). */

/* ===== 1) market card ===== */
#body_wrap.swk11 .swk-hmk {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px 12px;
  box-shadow: 0 10px 30px rgba(21, 20, 15, .06);
}
#body_wrap.swk11 .swk-hmk__lab { color: var(--gold-d); }
#body_wrap.swk11 .swk-hmk__val {
  background: none !important; -webkit-background-clip: border-box; background-clip: border-box;
  -webkit-text-fill-color: var(--ink); color: var(--ink);
}
#body_wrap.swk11 .swk-hmk__val small { -webkit-text-fill-color: var(--sub); color: var(--sub); }

.swk11 .swk-gs { position: relative; margin: 0 0 0; padding-top: 46px; }
.swk11 .swk-gs__fig { position: relative; }
.swk11 .swk-gs__plot, .swk11 .swk-gs__me { display: block; width: 100%; height: auto; overflow: visible; }
.swk11 .swk-gs__me { position: absolute; inset: 0; height: 100%; }
.swk11 .swk-gs__area { fill: rgba(193, 171, 5, .10); stroke: none; }
.swk11 .swk-gs__band { fill: rgba(193, 171, 5, .42); stroke: none; }
.swk11 .swk-gs__crv { fill: none; stroke: var(--gold-d); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.swk11 .swk-gs__ax { stroke: #d9d3bd; stroke-width: 1; }
.swk11 .swk-gs__ln { stroke: var(--ink); stroke-width: 2; stroke-linecap: round; fill: none; }
.swk11 .swk-gs__dot { fill: var(--ink); stroke: #fff; stroke-width: 2.5; transform-box: fill-box; transform-origin: center; }

/* label above the line: "MRA" over "今回の施工 187万円" */
.swk11 .swk-gs__tag {
  position: absolute; top: 0; left: var(--swk-x); transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px; white-space: nowrap; line-height: 1.25;
  font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--ink);
}
.swk11 .swk-gs__tag em { font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .32em; color: var(--gold-d); margin-right: -.32em; }
.swk11 .swk-gs__tag.is-l { transform: none; left: calc(var(--swk-x) - 5px); align-items: flex-start; }
.swk11 .swk-gs__tag.is-r { transform: translateX(-100%); left: calc(var(--swk-x) + 5px); align-items: flex-end; }
.swk11 .swk-gs__note { display: block; margin: 4px 2px 0 0; text-align: right; font-size: 10px; letter-spacing: .04em; color: var(--sub); }

@media (max-width: 767px) {
  #body_wrap.swk11 .swk-hmk { padding: 18px 16px 10px; }
  .swk11 .swk-gs__tag { font-size: 12px; }
}

/* ===== 2) price figure ===== */
.swk11 .swk-hero .swk-price { font-variant-numeric: tabular-nums lining-nums; font-feature-settings: "tnum" 1; }

/* ===== motion: figure counts up, curve draws left to right, then the line drops onto the axis ===== */
@media (prefers-reduced-motion: no-preference) {
  /* before the script takes over, the figure stays invisible (no flash of the final number); while it counts, the real text is hidden
     (visibility) and an aria-hidden copy on top shows the running number */
  html.swk11-js .swk-hero .swk-price:not(.swk-cu):not(.swk-cu-done):not(.swk-cu-ov) { opacity: 0; }
  .swk11 .swk-hero .swk-price.swk-cu:not(.swk-cu-ov) { visibility: hidden; }
  .swk11 .swk-hero .swk-cu-ov { position: absolute; white-space: nowrap; pointer-events: none; margin: 0; }

  html.swk11-js .swk-gs__plot { transition: clip-path 1.15s cubic-bezier(.2, .7, .2, 1) .45s; clip-path: inset(-6px -6px -6px -6px); }
  html.swk11-js .swk-gs:not(.is-in) .swk-gs__plot { clip-path: inset(-6px 100% -6px -6px); }

  html.swk11-js .swk-gs__ln { stroke-dasharray: 1; transition: stroke-dashoffset .55s cubic-bezier(.2, .7, .2, 1) 1.45s; stroke-dashoffset: 0; }
  html.swk11-js .swk-gs:not(.is-in) .swk-gs__ln { stroke-dashoffset: 1; }
  html.swk11-js .swk-gs__dot { transition: opacity .35s ease 1.95s, transform .45s cubic-bezier(.3, 1.6, .5, 1) 1.95s; }
  html.swk11-js .swk-gs:not(.is-in) .swk-gs__dot { opacity: 0; transform: scale(.3); }
  html.swk11-js .swk-gs__tag { transition: opacity .45s ease 1.35s, translate .45s cubic-bezier(.2, .7, .2, 1) 1.35s; }
  html.swk11-js .swk-gs:not(.is-in) .swk-gs__tag { opacity: 0; translate: 0 8px; }
  html.swk11-js .swk-gs__note { transition: opacity .5s ease 1.8s; }
  html.swk11-js .swk-gs:not(.is-in) .swk-gs__note { opacity: 0; }
}

/* ===== 3) price-range cards: no beige panel, one row slider ===== */
.swk11 .elementor-top-section:has(.swk-pr-h) { background: transparent !important; padding: 8px 0 28px; }
.swk11 .elementor-container:has(> .elementor-column > .elementor-widget-wrap > .swk-pr-h) {
  display: flex !important; flex-wrap: nowrap !important; gap: 18px; max-width: 1120px;
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding: 0 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  padding: 6px 4px 26px; cursor: grab;
}
.swk11 .elementor-container:has(> .elementor-column > .elementor-widget-wrap > .swk-pr-h)::-webkit-scrollbar { display: none; }
.swk11 .elementor-container:has(> .elementor-column > .elementor-widget-wrap > .swk-pr-h).is-drag { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.swk11 .elementor-container:has(> .elementor-column > .elementor-widget-wrap > .swk-pr-h) > .elementor-column {
  flex: 0 0 calc((100% - 36px) / 3) !important; max-width: none !important; scroll-snap-align: start;
}
.swk11 .elementor-container:has(> .elementor-column > .elementor-widget-wrap > .swk-pr-h) a { cursor: pointer; }

.swk11 .swk-sl__ctl { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; max-width: 1120px; margin: 0 auto; padding: 0 4px; box-sizing: border-box; }
.swk11 .swk-sl__bar { position: relative; flex: 1; height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; }
.swk11 .swk-sl__bar i { position: absolute; top: 0; bottom: 0; left: 0; width: 50%; border-radius: 2px; background: var(--gold); transition: left .15s linear; }
.swk11 .swk-sl__b {
  display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 50%;
  background: #fff; color: var(--ink); cursor: pointer; transition: background .2s, color .2s, border-color .2s, opacity .2s;
}
.swk11 .swk-sl__b svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.swk11 .swk-sl__b:hover:not(:disabled) { background: var(--ink); color: #fff; border-color: var(--ink); }
.swk11 .swk-sl__b:focus-visible { outline: 2px solid var(--gold-d); outline-offset: 2px; }
.swk11 .swk-sl__b:disabled { opacity: .35; cursor: default; }

@media (max-width: 899px) {
  .swk11 .elementor-container:has(> .elementor-column > .elementor-widget-wrap > .swk-pr-h) { padding-left: 16px; padding-right: 16px; scroll-padding: 0 16px; gap: 14px; }
  .swk11 .elementor-container:has(> .elementor-column > .elementor-widget-wrap > .swk-pr-h) > .elementor-column { flex-basis: calc((100% - 14px) / 2.15) !important; }
  .swk11 .swk-sl__ctl { padding: 0 16px; }
}
@media (max-width: 560px) {
  .swk11 .elementor-container:has(> .elementor-column > .elementor-widget-wrap > .swk-pr-h) > .elementor-column { flex-basis: 80% !important; }
}
