.pp-root {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
  }

  .theme-dark .pp-root {
    background: #1e1e2e;
    border-color: #2d2d3f;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  }

  .pp-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  @media (min-width: 1024px) {
    .pp-grid {
      grid-template-columns: 5fr 8fr;
    }
  }

  .pp-inputs {
    padding: 2rem;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    border-right: 1px solid #e2e8f0;
  }

  .theme-dark .pp-inputs {
    background: #16161e;
    border-right-color: #2d2d3f;
  }

  .pp-section-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  .pp-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .theme-dark .pp-section-title {
    color: #e2e8f0;
  }

  .pp-section-desc {
    font-size: 0.875rem;
    color: #64748b;
  }

  .theme-dark .pp-section-desc {
    color: #94a3b8;
  }

  .pp-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .pp-group-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
  }

  .pp-label-frame {
    color: #4f46e5;
  }

  .theme-dark .pp-label-frame {
    color: #818cf8;
  }

  .pp-label-art {
    color: #db2777;
  }

  .theme-dark .pp-label-art {
    color: #f472b6;
  }

  .pp-group-icon {
    width: 1.25rem;
    height: 1.25rem;
  }

  .pp-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .pp-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  .pp-label {
    font-size: 0.75rem;
    color: #64748b;
    margin-left: 0.25rem;
  }

  .theme-dark .pp-label {
    color: #94a3b8;
  }

  .pp-input {
    width: 100%;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: #0f172a;
    font-size: 1.125rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
  }

  .pp-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
  }

  .theme-dark .pp-input {
    background: #1e1e2e;
    border-color: #3d3d50;
    color: #e2e8f0;
  }

  .theme-dark .pp-input:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.15);
  }

  .pp-toggle-row {
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
  }

  .theme-dark .pp-toggle-row {
    border-top-color: #2d2d3f;
  }

  .pp-toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    gap: 1rem;
  }

  .pp-toggle-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
  }

  .pp-toggle-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0f172a;
  }

  .theme-dark .pp-toggle-name {
    color: #e2e8f0;
  }

  .pp-toggle-desc {
    font-size: 0.75rem;
    color: #64748b;
  }

  .theme-dark .pp-toggle-desc {
    color: #94a3b8;
  }

  .pp-checkbox {
    width: 3rem;
    height: 1.75rem;
    appearance: none;
    background: #cbd5e1;
    border-radius: 9999px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
    flex-shrink: 0;
  }

  .pp-checkbox:checked {
    background: #4f46e5;
  }

  .pp-checkbox::after {
    content: '';
    position: absolute;
    width: 1.375rem;
    height: 1.375rem;
    background: #fff;
    border-radius: 50%;
    top: 0.1875rem;
    left: 0.1875rem;
    transition: left 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  }

  .pp-checkbox:checked::after {
    left: 1.4375rem;
  }

  .pp-toggle-track {
    display: none;
  }

  .pp-offset-ctrl {
    display: none;
    padding-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
  }

  .theme-dark .pp-offset-ctrl {
    border-top-color: #2d2d3f;
  }

  .pp-offset-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
  }

  .pp-range {
    flex: 1;
    height: 0.5rem;
    accent-color: #4f46e5;
    cursor: pointer;
  }

  .pp-offset-val {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    min-width: 2.5rem;
    text-align: right;
  }

  .theme-dark .pp-offset-val {
    color: #e2e8f0;
  }

  .pp-error {
    display: none;
    padding: 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.75rem;
    color: #dc2626;
    font-size: 0.875rem;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .theme-dark .pp-error {
    background: #2d1515;
    border-color: #7f1d1d;
    color: #fca5a5;
  }

  .pp-error-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
  }

  .pp-preview {
    background: #f1f5f9;
    padding: 3rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
  }

  .theme-dark .pp-preview {
    background: #0f172a;
  }

  .pp-dots-bg {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(0, 0, 0, 0.15) 1px, transparent 0);
    background-size: 20px 20px;
    pointer-events: none;
    opacity: 0.5;
  }

  .theme-dark .pp-dots-bg {
    background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.1) 1px, transparent 0);
  }

  .pp-frame-wrapper {
    position: relative;
    height: 100%;
    max-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .pp-frame {
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    background: #fff;
    height: 100%;
    max-height: 60vh;
    transition: all 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .theme-dark .pp-frame {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  }

  .pp-mat {
    position: absolute;
    inset: 0;
    background: #e2e2e2;
  }

  .theme-dark .pp-mat {
    background: #334155;
  }

  .pp-art {
    position: absolute;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .theme-dark .pp-art {
    background: #1e293b;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  }

  .pp-art-placeholder {
    font-style: italic;
    color: #94a3b8;
    font-size: clamp(0.75rem, 2vw, 1.25rem);
    user-select: none;
    position: relative;
    z-index: 1;
  }

  .theme-dark .pp-art-placeholder {
    color: #475569;
  }

  .pp-art-dim {
    position: absolute;
    pointer-events: none;
    opacity: 0.5;
  }

  .pp-art-dim-w {
    bottom: 0.5rem;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.125rem;
  }

  .pp-art-dim-h {
    top: 0;
    bottom: 0;
    right: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.125rem;
  }

  .pp-dim-line {
    height: 1px;
    width: 60%;
    background: #0f172a;
  }

  .theme-dark .pp-dim-line {
    background: #e2e8f0;
  }

  .pp-dim-line-v {
    width: 1px;
    height: 60%;
  }

  .pp-dim-label {
    font-size: 0.5rem;
    color: #0f172a;
  }

  .theme-dark .pp-dim-label {
    color: #e2e8f0;
  }

  .pp-dim-label-v {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
  }

  .pp-border-label {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
    color: #4f46e5;
    z-index: 10;
  }

  .theme-dark .pp-border-label {
    color: #818cf8;
  }

  .pp-border-top {
    top: 0;
    left: 50%;
    transform: translate(-50%, -100%);
    padding-bottom: 0.5rem;
  }

  .pp-border-bottom {
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 100%);
    padding-top: 0.5rem;
  }

  .pp-border-left {
    left: 0;
    top: 50%;
    transform: translate(-100%, -50%);
    padding-right: 1rem;
    color: #db2777;
  }

  .theme-dark .pp-border-left {
    color: #f472b6;
  }

  .pp-border-right {
    right: 0;
    top: 50%;
    transform: translate(100%, -50%);
    padding-left: 1rem;
    color: #db2777;
  }

  .theme-dark .pp-border-right {
    color: #f472b6;
  }

  .pp-border-val {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
  }

  .pp-border-tag {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.7;
  }

  .pp-border-unit {
    font-size: 0.6rem;
    opacity: 0.5;
  }

  @media (max-width: 1023px) {
    .pp-preview {
      padding: 4rem 3rem;
    }
  }