.ws-pb-root {
  --cream: #F2F3F6;
  --blush: #CDCFDB;
  --rose: #850219;
  --burgundy: #49010D;
  --gold: #850219;
  --charcoal: #101820;
  --soft-white: #FFFFFF;
}

.ws-pb-root * { margin:0; padding:0; box-sizing:border-box; }

.ws-pb-root {
  background: var(--cream);
  font-family: 'Kanit', sans-serif;
  color: var(--charcoal);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  width: 100%;
}

/* Stretch shortcode out of narrow theme/Elementor columns */
.entry-content .ws-pb-root,
.page-content .ws-pb-root,
.elementor-widget-shortcode .ws-pb-root,
.elementor-element .ws-pb-root {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.ws-pb-root::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(205,207,219,.35) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(133,2,25,0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.ws-pb-wrapper { position: relative; z-index: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 28px 24px 60px; }

.ws-pb-root--frame-only .ws-pb-frame-only-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.ws-pb-root--frame-only .ws-pb-camera-card {
  width: 100%;
  max-width: 640px;
}

.ws-pb-photo-preview {
  width: 100%;
  max-width: 320px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0,0,0,.12);
  background: var(--soft-white);
  padding: 8px;
}

.ws-pb-photo-preview img {
  width: 100%;
  display: block;
  border-radius: 8px;
}

.ws-pb-frame-picker {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  overflow-x: auto;
  border-top: 1px solid rgba(0,0,0,.05);
}

.ws-pb-frame-pick {
  flex: 0 0 auto;
  width: 64px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: var(--cream);
  padding: 4px;
  cursor: pointer;
  transition: border-color .15s, transform .15s;
}

.ws-pb-frame-pick img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}

.ws-pb-frame-pick span {
  display: block;
  font-size: .58rem;
  color: #888;
  text-align: center;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ws-pb-frame-pick.selected {
  border-color: var(--rose);
  transform: scale(1.04);
}

.ws-pb-frame-pick.selected span { color: var(--rose); }

.ws-pb-dl-photo-btn {
  padding: 10px 20px;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--rose), var(--burgundy));
  color: white;
  border: none;
  cursor: pointer;
  font-family: 'Kanit', sans-serif;
  font-size: .82rem;
  font-weight: 500;
  box-shadow: 0 4px 14px rgba(139,0,24,0.3);
  transition: transform .18s, opacity .18s;
}

.ws-pb-dl-photo-btn:hover:not(:disabled) { transform: translateY(-1px); }
.ws-pb-dl-photo-btn:disabled { opacity: .4; cursor: not-allowed; }

.ws-pb-header { text-align: center; margin-bottom: 28px; animation: wsPbFadeDown .7s ease both; }
.ws-pb-header h1 { font-family: 'Kanit', sans-serif; font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; color: var(--rose); }
.ws-pb-header h1 span { font-weight: 600; color: var(--rose); }
.ws-pb-header p { margin-top: 6px; font-size: .88rem; color: #aaa; font-weight: 300; letter-spacing: .06em; }

.ws-pb-gold-line { display: flex; align-items: center; gap: 10px; margin: 12px auto 0; width: fit-content; }
.ws-pb-gold-line::before, .ws-pb-gold-line::after { content: ''; display: block; width: 50px; height: 1px; background: var(--gold); }
.ws-pb-gold-line span { font-size: .9rem; color: var(--rose); }

.ws-pb-main-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px 220px; gap: 24px; align-items: start; }
@media (max-width: 1024px) { .ws-pb-main-layout { grid-template-columns: 1fr; } }

.ws-pb-camera-card { background: var(--soft-white); border-radius: 20px; overflow: hidden; box-shadow: 0 8px 36px rgba(0,0,0,.08); animation: wsPbFadeUp .7s .1s ease both; }
.ws-pb-camera-viewport { position: relative; width: 100%; aspect-ratio: 4/3; background: #1a1a1a; overflow: hidden; }
.ws-pb-video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
.ws-pb-frame-overlay { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
.ws-pb-frame-overlay img.ws-pb-overlay-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ws-pb-countdown { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; font-family: 'Kanit', sans-serif; font-size: 8rem; color: white; text-shadow: 0 4px 20px rgba(0,0,0,.6); z-index: 20; }
.ws-pb-countdown.active { display: flex; }
.ws-pb-flash { position: absolute; inset: 0; background: white; opacity: 0; pointer-events: none; z-index: 30; transition: opacity .08s; }
.ws-pb-flash.flash { opacity: 1; }
.ws-pb-progress-bar { height: 4px; background: #eee; overflow: hidden; }
.ws-pb-progress-fill { height: 100%; background: linear-gradient(90deg, var(--rose), #e8001a); transition: width .3s ease; width: 0%; }
.ws-pb-controls-bar { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 16px 20px; border-top: 1px solid rgba(0,0,0,.05); flex-wrap: wrap; }

.ws-pb-shutter-btn { width: 64px; height: 64px; border-radius: 50%; background: var(--rose); border: none; cursor: pointer; position: relative; flex-shrink: 0; box-shadow: 0 4px 16px rgba(186,0,32,0.5), 0 0 0 4px rgba(186,0,32,0.15); transition: transform .15s, box-shadow .15s; }
.ws-pb-shutter-btn::after { content: ''; position: absolute; inset: 8px; border-radius: 50%; background: rgba(255,255,255,.25); }
.ws-pb-shutter-btn:hover { transform: scale(1.07); }
.ws-pb-shutter-btn:active { transform: scale(.94); }
.ws-pb-shutter-btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

.ws-pb-timer-btn { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--blush); background: transparent; color: var(--rose); font-size: .72rem; font-family: 'Kanit', sans-serif; font-weight: 500; cursor: pointer; transition: all .18s; }
.ws-pb-timer-btn.active { background: var(--blush); border-color: var(--rose); color: var(--rose); }
.ws-pb-count-badge { font-size: .78rem; color: #888; white-space: nowrap; }
.ws-pb-count-badge strong { color: var(--rose); }

.ws-pb-sidebar-left { display: flex; flex-direction: column; gap: 16px; animation: wsPbFadeUp .7s .15s ease both; }
.ws-pb-panel { background: var(--soft-white); border-radius: 18px; padding: 16px; box-shadow: 0 4px 18px rgba(0,0,0,.06); }
.ws-pb-panel-label { font-size: .68rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--rose); margin-bottom: 11px; }

.ws-pb-frame-grid, .ws-pb-ar-filter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.ws-pb-frame-opt, .ws-pb-ar-opt { aspect-ratio: 1; border-radius: 10px; border: 2px solid transparent; cursor: pointer; background: var(--cream); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; transition: all .18s; overflow: hidden; }
.ws-pb-frame-opt--custom { flex-direction: column; gap: 2px; padding: 4px; font-size: .62rem; }
.ws-pb-frame-opt--custom img { width: 100%; height: calc(100% - 14px); object-fit: contain; border-radius: 6px; }
.ws-pb-frame-opt--custom .frame-name { font-size: .58rem; font-weight: 500; color: #888; line-height: 1.1; text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-pb-frame-opt.selected .frame-name { color: var(--rose); }
.ws-pb-ar-opt { flex-direction: column; gap: 3px; padding: 8px 4px; font-size: inherit; }
.ws-pb-ar-opt .ar-icon { font-size: 1.4rem; line-height: 1; }
.ws-pb-ar-opt .ar-label { font-size: .62rem; font-weight: 500; color: #999; }
.ws-pb-frame-opt.selected, .ws-pb-ar-opt.selected { border-color: var(--rose); transform: scale(1.06); background: #fff0f2; }
.ws-pb-ar-opt.selected .ar-label { color: var(--rose); }
.ws-pb-frame-opt:hover, .ws-pb-ar-opt:hover { border-color: var(--blush); }

.ws-pb-filter-grid { display: flex; flex-direction: column; gap: 5px; }
.ws-pb-filter-opt { padding: 7px 10px; border-radius: 9px; border: 1.5px solid transparent; cursor: pointer; font-size: .78rem; font-family: 'Kanit', sans-serif; background: transparent; color: var(--charcoal); text-align: left; transition: all .18s; display: flex; align-items: center; gap: 6px; }
.ws-pb-filter-opt.selected, .ws-pb-filter-opt:hover { background: var(--cream); border-color: var(--blush); }
.ws-pb-filter-opt.selected { border-color: var(--rose); color: var(--rose); font-weight: 500; }

.ws-pb-color-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ws-pb-color-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; transition: transform .15s, border-color .15s; }
.ws-pb-color-dot.selected { border-color: var(--rose); transform: scale(1.15); }
.ws-pb-color-dot:hover { transform: scale(1.1); }

.ws-pb-strip-column { animation: wsPbFadeUp .7s .2s ease both; }
.ws-pb-strip-wrapper { background: var(--soft-white); border-radius: 18px; padding: 16px; box-shadow: 0 4px 18px rgba(0,0,0,.06); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ws-pb-strip-title { font-size: .68rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--rose); align-self: flex-start; }

.ws-pb-layout-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; width: 100%; }
.ws-pb-layout-opt { aspect-ratio: 1; border-radius: 10px; border: 2px solid transparent; cursor: pointer; background: var(--cream); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--charcoal); transition: all .18s; padding: 6px; }
.ws-pb-layout-opt svg { width: 100%; flex: 1; min-height: 0; }
.ws-pb-layout-opt span { font-size: .62rem; font-weight: 500; color: #999; line-height: 1; }
.ws-pb-layout-opt.selected { border-color: var(--rose); background: #fff0f2; color: var(--rose); }
.ws-pb-layout-opt.selected span { color: var(--rose); }
.ws-pb-layout-opt:hover { border-color: var(--blush); }

.ws-pb-film-strip { background: #850219; border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 4px; width: 100%; box-shadow: 0 4px 12px rgba(16,24,32,.18); }
.ws-pb-strip-slot { width: 100%; aspect-ratio: 4/3; background: #222; border-radius: 4px; overflow: hidden; position: relative; display: flex; align-items: center; justify-content: center; transition: outline .1s; }
.ws-pb-strip-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ws-pb-strip-slot .slot-num { color: #444; font-size: 1rem; font-family: 'Kanit', sans-serif; font-weight: 600; }
.ws-pb-strip-slot.captured .slot-num { display: none; }
.ws-pb-strip-slot.active-slot { outline: 3px solid var(--rose); outline-offset: -3px; }
.ws-pb-strip-label-bottom {
  padding: 6px 0 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  visibility: visible;
}

.ws-pb-strip-label-bottom.is-hidden {
  visibility: hidden;
}

.ws-pb-strip-label-bottom img {
  height: 28px;
  display: block;
  margin: 0 auto;
  width: auto;
}

.ws-pb-logo-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1.5px solid var(--blush);
  border-radius: 12px;
  background: var(--cream);
  color: var(--charcoal);
  font-family: 'Kanit', sans-serif;
  font-size: .78rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: border-color .18s, background .18s;
}

.ws-pb-logo-toggle:hover {
  border-color: var(--rose);
}

.ws-pb-logo-toggle.is-on {
  border-color: var(--rose);
  background: #fff0f2;
}

.ws-pb-logo-toggle-track {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #c8cad4;
  transition: background .18s;
}

.ws-pb-logo-toggle.is-on .ws-pb-logo-toggle-track {
  background: var(--rose);
}

.ws-pb-logo-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(16,24,32,.25);
  transition: transform .18s;
}

.ws-pb-logo-toggle.is-on .ws-pb-logo-toggle-thumb {
  transform: translateX(18px);
}

.ws-pb-logo-toggle-text {
  flex: 1;
  text-align: left;
}

.ws-pb-dl-strip-btn { width: 100%; padding: 11px; border-radius: 50px; background: linear-gradient(135deg, var(--rose), var(--burgundy)); color: white; border: none; cursor: pointer; font-family: 'Kanit', sans-serif; font-size: .86rem; font-weight: 500; box-shadow: 0 4px 16px rgba(139,0,24,0.35); transition: transform .18s, box-shadow .18s; display: flex; align-items: center; justify-content: center; gap: 6px; }
.ws-pb-dl-strip-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(139,0,24,0.4); }
.ws-pb-dl-strip-btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

.ws-pb-reset-btn { width: 100%; padding: 9px; border-radius: 50px; background: transparent; color: var(--rose); border: 1.5px solid var(--blush); cursor: pointer; font-family: 'Kanit', sans-serif; font-size: .8rem; transition: all .18s; }
.ws-pb-reset-btn:hover { background: var(--blush); }

.ws-pb-cam-prompt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: #1a1a1a; color: white; z-index: 5; }
.ws-pb-cam-prompt-icon { font-size: 2.6rem; }
.ws-pb-cam-prompt p { font-size: .85rem; color: #999; text-align: center; max-width: 180px; }
.ws-pb-start-cam-btn { padding: 10px 26px; background: var(--rose); color: white; border: none; border-radius: 50px; font-family: 'Kanit', sans-serif; font-size: .88rem; font-weight: 500; cursor: pointer; box-shadow: 0 4px 14px rgba(212,117,106,.45); transition: transform .18s; }
.ws-pb-start-cam-btn:hover { transform: scale(1.04); }

#wsPbArCanvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 15; transform: scaleX(-1); }
.ws-pb-ar-status { font-size: .68rem; color: #bbb; text-align: center; margin-top: 8px; display: none; }

@keyframes wsPbFadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes wsPbFadeDown { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes wsPbPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.2); } }
@keyframes wsPbSnapIn { from { opacity: 0; transform: scale(.88); } to { opacity: 1; transform: scale(1); } }
