
  :root {
    --gold: #c5a467;
    --gold-light: #dcc997;
    --dark: #1a1a1a;
    --darker: #0e0e0e;
    --text: #f5f0ea;
    --text-muted: rgba(245,240,234,.5);
    --radius: 8px;
    --handle-size: 48px;
    --transition: .35s cubic-bezier(.4,0,.2,1);
  }

 
  /* ─── Container ─── */
  .ba-wrapper {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 10px;
	  margin: auto;
	  margin-bottom: 2em
  }
 
  .ba-header {
    text-align: center;
  }
  .ba-header h2 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(1.4rem, 3vw, 2rem);
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--gold-light);
  }
  .ba-header .ba-divider {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 10px auto 0;
  }
 
  /* ─── Stage ─── */
  .ba-stage {
    position: relative;
    width: 100%;
    /* 不設 aspect-ratio，由圖片原始比例撐開高度 */
    border-radius: var(--radius);
    overflow: hidden;
    cursor: col-resize;
    user-select: none;
    -webkit-user-select: none;
   
  }
 
  .ba-stage:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
  }
 
  /* Images */
  .ba-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    display: block;
  }
 
  /* After 圖片：用 relative 流排撐開容器高度 */
  .ba-img--after {
    position: relative;
  }
 
  /* Before 圖片：絕對定位疊在上面 */
  .ba-before-clip .ba-img {
    position: absolute;
    inset: 0;
  }
 
  .ba-before-clip {
    position: absolute;
    inset: 0;
    clip-path: inset(0 calc(100% - var(--split)) 0 0);
    z-index: 2;
    will-change: clip-path;
  }
 
  /* ─── Tags ─── */
  .ba-tag {
    position: absolute;
    top: 20px;
    z-index: 5;
    padding: 6px 18px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 11px;
    letter-spacing: .22em;
    text-transform: uppercase;
    border-radius: 100px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: opacity var(--transition);
    pointer-events: none;
  }
  .ba-tag--before {
    left: 20px;
    background: rgba(197,164,103,.2);
    color: #a27b18;
    border: 1px solid rgba(197,164,103,.3);
  }
  .ba-tag--after {
	right: 20px;
    background: rgba(255, 255, 255, .1);
    color: rgb(32 32 32 / 80%);
    border: 1px solid rgb(25 9 9 / 18%);
  }
 
  /* Tag auto-hide near edges */
  .ba-stage[data-near-left="true"] .ba-tag--before { opacity: 0; }
  .ba-stage[data-near-right="true"] .ba-tag--after { opacity: 0; }
 
  /* ─── Divider line ─── */
  .ba-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--split);
    width: 2px;
    z-index: 10;
    transform: translateX(-50%);
    pointer-events: none;
    background: linear-gradient(
      180deg,
      transparent 0%,
      var(--gold-light) 8%,
      var(--gold) 50%,
      var(--gold-light) 92%,
      transparent 100%
    );
    will-change: left;
  }
  .ba-line::before,
  .ba-line::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 12px rgba(197,164,103,.5);
  }
  .ba-line::before { top: 12px; }
  .ba-line::after { bottom: 12px; }
 
  /* ─── Handle ─── */
  .ba-handle {
    position: absolute;
    top: 50%;
    left: var(--split);
    z-index: 12;
    transform: translate(-50%, -50%);
    width: var(--handle-size);
    height: var(--handle-size);
    border-radius: 50%;
    border: 2px solid var(--gold);
    background: rgba(26,26,26,.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: col-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: box-shadow var(--transition), transform var(--transition), background var(--transition);
    box-shadow:
      0 0 20px rgba(197,164,103,.25),
      inset 0 0 12px rgba(197,164,103,.08);
    will-change: left;
  }
  .ba-handle:hover,
  .ba-stage.is-dragging .ba-handle {
    box-shadow:
      0 0 30px rgba(197,164,103,.45),
      inset 0 0 16px rgba(197,164,103,.12);
    background: rgba(26,26,26,.95);
  }
  .ba-stage.is-dragging .ba-handle {
    transform: translate(-50%, -50%) scale(1.08);
  }
 
  /* Chevrons */
  .ba-chev {
    display: block;
    width: 8px;
    height: 8px;
    border-top: 1.5px solid var(--gold-light);
    border-right: 1.5px solid var(--gold-light);
    transition: border-color var(--transition);
  }
  .ba-chev--l { transform: rotate(-135deg); }
  .ba-chev--r { transform: rotate(45deg); }
  .ba-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 6px rgba(197,164,103,.6);
  }
 
  /* ─── Hidden range input for accessibility ─── */
  .ba-range {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: col-resize;
    z-index: 15;
    margin: 0;
    pointer-events: none; /* JS controls interaction */
  }
 
  /* ─── Footer ─── */
  .ba-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: .06em;
  }
  .ba-percent {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-variant-numeric: tabular-nums;
    color: var(--gold-light);
    min-width: 38px;
    text-align: center;
  }
  .ba-hint {
    font-weight: normal;
    font-size: 11px;
	  color: #333;
	  
  }
 
  /* ─── Progress bar (subtle) ─── */
  .ba-progress {
    width: 100%;
    height: 2px;
    background: rgba(197,164,103,.1);
    border-radius: 1px;
    overflow: hidden;
  }
  .ba-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    border-radius: 1px;
    width: var(--split);
    transition: none;
    will-change: width;
  }
 
  /* ─── Responsive ─── */
  @media (max-width: 480px) {
    :root { --handle-size: 40px; }
    .ba-tag { font-size: 9px; padding: 5px 12px; top: 14px; }
    .ba-tag--before { left: 12px; }
    .ba-tag--after { right: 12px; }
  }