/* MannlyStudio waiver styles — matches tsp-studio (no grid paper, no browns) */

.waiver-app {
    --wv-form-max: 72rem;
    --wv-accent: var(--tsp-accent, #e85d4c);
    --wv-accent-soft: var(--tsp-accent-soft, #fde8e6);
    --wv-bg: var(--tsp-bg, #f4f4f5);
    --wv-card: var(--tsp-card, #ffffff);
    --wv-border: var(--tsp-border, #e4e4e7);
    --wv-text: var(--tsp-text, #18181b);
    --wv-muted: var(--tsp-muted, #71717a);
    --wv-radius: var(--tsp-radius, 14px);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--wv-text);
}

.waiver-app .heading {
    font-family: inherit;
    letter-spacing: -0.02em;
}

.waiver-staff {
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin: 0;
}

.waiver-public {
    padding: 2rem 1.5rem 2.5rem;
    background: var(--wv-bg);
    border-radius: var(--wv-radius);
}

.waiver-wrap {
    max-width: var(--wv-form-max);
    margin: 0 auto;
}

.waiver-header,
.waiver-public-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.waiver-public-header .waiver-title {
    color: var(--wv-text);
    font-size: 1.75rem;
    font-weight: 700;
}

.waiver-public-header .waiver-subtitle {
    color: var(--wv-muted);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
}

.waiver-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.waiver-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    background: var(--wv-accent-soft);
    color: var(--wv-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    overflow: hidden;
}

.waiver-icon.has-logo {
    background: var(--wv-card);
    border: 1px solid var(--wv-border);
    padding: 0.3rem;
}

.waiver-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.waiver-icon.is-light-logo img {
    filter: invert(1);
}

.waiver-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--wv-text);
    line-height: 1.15;
}

.waiver-subtitle {
    font-size: 14px;
    color: var(--wv-muted);
    font-weight: 500;
    margin-top: 0.15rem;
}

.waiver-header-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.waiver-hint {
    color: var(--wv-muted);
    font-size: 13px;
    margin: 0 0 1rem;
    line-height: 1.45;
}

.waiver-hint code {
    background: var(--wv-bg);
    color: var(--wv-text);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    border: 1px solid var(--wv-border);
}

.waiver-tabs {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 1rem;
    width: 100%;
    flex-wrap: nowrap;
}

.waiver-tab {
    flex: 1 1 0;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid var(--wv-border);
    background: var(--wv-card);
    color: var(--wv-muted);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.waiver-tab.active {
    background: var(--wv-accent);
    color: #fff;
    border-color: var(--wv-accent);
}

.waiver-toolbar {
    margin-bottom: 1rem;
}

.waiver-panel {
    display: none;
}

.waiver-panel.active {
    display: block;
}

.waiver-app .paper {
    background: var(--wv-card);
    background-image: none;
    border: 1px solid var(--wv-border);
    border-radius: var(--wv-radius);
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
    padding: 1.75rem 2rem;
}

.waiver-signature-list {
    display: grid;
    gap: 0.75rem;
}

.waiver-signature-card {
    background: var(--wv-card);
    border: 1px solid var(--wv-border);
    border-radius: var(--wv-radius);
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
    padding: 1rem 1.1rem;
}

.waiver-signature-top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.waiver-signature-name {
    font-size: 1rem;
    font-weight: 700;
}

.waiver-signature-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 12px;
    color: var(--wv-muted);
    margin-top: 0.35rem;
}

.waiver-signature-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.9rem;
    flex-wrap: wrap;
}

.waiver-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--wv-muted);
    margin: 0.75rem 0 0.35rem;
}

.waiver-input,
.waiver-textarea {
    border: 1px solid var(--wv-border);
    background: var(--wv-card);
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    font-size: 14px;
    font-family: inherit;
    color: var(--wv-text);
}

.waiver-input:focus,
.waiver-textarea:focus {
    outline: none;
    border-color: var(--wv-accent);
    box-shadow: 0 0 0 3px var(--wv-accent-soft);
}

.waiver-input-block,
.waiver-textarea {
    width: 100%;
    box-sizing: border-box;
}

.waiver-client-combobox,
.waiver-name-combobox {
    position: relative;
    width: 100%;
}

.waiver-name-combobox .waiver-input {
    margin-bottom: 0;
}

.waiver-client-suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 40;
    margin: 0;
    padding: 0.35rem 0;
    list-style: none;
    max-height: 16rem;
    overflow-y: auto;
    background: var(--wv-card);
    border: 1px solid var(--wv-border);
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(24, 24, 27, 0.12);
}

.waiver-client-suggestion {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.55rem 0.85rem;
    cursor: pointer;
}

.waiver-client-suggestion:hover,
.waiver-client-suggestion.is-active {
    background: var(--wv-accent-soft);
}

.waiver-client-suggestion-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--wv-text);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.waiver-client-suggestion-meta {
    font-size: 12px;
    color: var(--wv-muted);
}

.waiver-client-suggestion-empty {
    cursor: default;
    color: var(--wv-muted);
    font-size: 13px;
}

.waiver-client-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--wv-accent);
    background: var(--wv-accent-soft);
    border-radius: 999px;
    padding: 0.1rem 0.4rem;
}

.waiver-btn {
    border: none;
    border-radius: 10px;
    padding: 0.55rem 1rem;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
}

.waiver-btn-lg {
    padding: 0.75rem 1.25rem;
    font-size: 14px;
}

.waiver-btn-accent {
    background: var(--wv-accent);
    color: #fff;
}

.waiver-btn-accent:hover {
    filter: brightness(0.95);
}

.waiver-btn-dark {
    background: var(--wv-text);
    color: #fff;
}

.waiver-btn-ghost {
    background: transparent;
    border: 1px solid var(--wv-border);
    color: var(--wv-muted);
}

.waiver-empty {
    text-align: center;
    color: var(--wv-muted);
    padding: 2rem 1rem;
    font-size: 13px;
}

.waiver-form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.waiver-modal {
    position: fixed;
    inset: 0;
    background: rgb(0 0 0 / 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    padding: 1rem;
}

.waiver-modal-panel {
    width: min(42rem, 100%);
    max-height: 90vh;
    overflow: auto;
    background: var(--wv-card);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 25px 50px rgb(0 0 0 / 0.15);
}

.waiver-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.waiver-modal-head h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.waiver-modal-close {
    border: none;
    background: transparent;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--wv-muted);
}

.waiver-toast {
    position: fixed;
    top: 3rem;
    right: 1.5rem;
    background: var(--wv-text);
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    z-index: 100001;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgb(0 0 0 / 0.15);
}

.waiver-document {
    margin-bottom: 1rem;
    padding: 1.25rem 1.75rem;
    background: var(--wv-bg);
    border: 1px solid var(--wv-border);
    border-radius: 10px;
}

.waiver-layout-form,
.waiver-layout-stack {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.waiver-layout-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: flex-start;
}

.waiver-layout-cell {
    flex: 1 1 14rem;
    min-width: 0;
}

.waiver-layout-cell-full {
    flex: 1 1 100%;
}

.waiver-layout-item {
    width: 100%;
}

.waiver-layout-stack .waiver-layout-item {
    padding-bottom: 0;
    border-bottom: none;
}

.waiver-section-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--wv-text);
}

.waiver-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
}

.waiver-checks {
    display: grid;
    gap: 0.65rem;
    font-size: 14px;
    color: var(--wv-text);
}

.waiver-checks label {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
}

.waiver-signature-wrap {
    border: 1px solid var(--wv-border);
    border-radius: 10px;
    background: var(--wv-card);
    padding: 0.75rem;
}

#waiver-signature-pad,
#wv-print-signature {
    width: 100%;
    max-width: none;
    height: 180px;
    border: 1px dashed var(--wv-border);
    border-radius: 8px;
    background: var(--wv-card);
    touch-action: none;
}

.waiver-success {
    text-align: center;
    padding: 2rem 1rem;
    background: var(--wv-card);
    border: 1px solid var(--wv-border);
    border-radius: var(--wv-radius);
}

.waiver-success-icon {
    font-size: 3rem;
    color: #16a34a;
    margin-bottom: 0.5rem;
}

.waiver-success h2 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
}

.waiver-confirmation {
    font-weight: 600;
    color: var(--wv-accent);
}

.waiver-print-body {
    font-size: 14px;
    line-height: 1.5;
    color: var(--wv-text);
}

.waiver-print-snapshot {
    margin: 1rem 0;
    padding: 1rem 1.25rem;
    background: var(--wv-bg);
    border: 1px solid var(--wv-border);
    border-radius: 10px;
}

.waiver-print-meta {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 1rem;
    font-size: 13px;
}

.waiver-print-signature img {
    max-width: 320px;
    border: 1px solid var(--wv-border);
    background: var(--wv-card);
    border-radius: 8px;
}

.hidden {
    display: none !important;
}

@media print {
    .waiver-modal {
        position: static;
        background: none;
        padding: 0;
    }

    .waiver-modal-panel {
        max-height: none;
        width: 100%;
        box-shadow: none;
        border: none;
    }

    .waiver-form-actions,
    .waiver-modal-close,
    .waiver-modal-head button {
        display: none !important;
    }
}

/* Template editor (MannlyStudio) */
.wv-template-toolbar {
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
}

.wv-template-hint {
    margin: 0;
    flex: 1 1 16rem;
}

.wv-template-editor-head {
    margin-bottom: 1rem;
}

.wv-template-editor-head h3 {
    margin: 0 0 0.25rem;
}

.wv-template-editor .tsp-form-actions {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--wv-border, #e4e4e7);
}

/* Canvas-first waiver editor */
.wv-canvas-editor {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.wv-split-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 1.05fr);
    gap: 0.2rem;
    align-items: start;
    min-height: 16rem;
}

.wv-preview-column {
    min-width: 0;
    min-height: 0;
}

.wv-preview-panel {
    position: sticky;
    top: 0.15rem;
    display: flex;
    flex-direction: column;
    min-height: 16rem;
    max-height: calc(100vh - 9rem);
}

.wv-preview-frame {
    flex: 1;
    min-height: 14rem;
    overflow: auto;
}

.wv-live-preview-scaler {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0.1rem;
    min-height: 100%;
}

.wv-live-preview-scale-wrap {
    flex-shrink: 0;
}

.wv-live-preview-sheet {
    width: 816px;
    background: var(--wv-card, #fff);
    border-radius: 4px;
    box-shadow: 0 2px 12px rgb(0 0 0 / 0.08), 0 0 0 1px rgb(0 0 0 / 0.04);
    padding: 0.5rem 0.65rem 0.65rem;
    pointer-events: none;
    user-select: none;
}

.wv-builder-column {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.wv-builder-column .wv-canvas-workspace {
    min-height: 14rem;
    max-height: calc(100vh - 11rem);
}

.wv-template-meta-compact {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.2rem 0.4rem;
    padding: 0;
    margin: 0;
    border: 0;
}

.wv-meta-field {
    flex: 1 1 12rem;
    min-width: 0;
}

.wv-meta-field--narrow {
    flex: 0 1 6rem;
}

.wv-meta-active {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--wv-muted, #71717a);
    padding: 0;
    margin: 0;
    white-space: nowrap;
}

.wv-meta-save {
    margin-left: auto;
}

.wv-icon-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem;
    padding: 0.15rem 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.wv-toolbar-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--wv-border, #e4e4e7);
    border-radius: 10px;
    background: var(--wv-card, #fff);
    color: var(--wv-text, #18181b);
    cursor: grab;
    transition: border-color 0.15s, color 0.15s, background 0.15s, box-shadow 0.15s;
}

.wv-toolbar-tool:hover:not(.is-disabled),
.wv-toolbar-tool:focus-visible {
    border-color: var(--wv-accent, #e85d4c);
    color: var(--wv-accent, #e85d4c);
    background: var(--wv-accent-soft, rgb(232 93 76 / 0.06));
    outline: none;
    box-shadow: 0 0 0 2px rgb(232 93 76 / 0.12);
}

.wv-toolbar-tool.is-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.wv-toolbar-tool i {
    font-size: 1rem;
    pointer-events: none;
}

.wv-canvas-workspace {
    display: flex;
    flex-direction: column;
    min-height: 14rem;
    max-height: calc(100vh - 9rem);
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.waiver-shop-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 0 1.25rem;
    padding: 0;
}

.waiver-shop-logo img {
    display: block;
    max-height: 56px;
    max-width: 220px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.waiver-shop-logo.is-light-logo img {
    filter: invert(1);
}

.wv-canvas-document .waiver-shop-logo,
.wv-preview-document .waiver-shop-logo,
.waiver-sign-document .waiver-shop-logo,
.wv-print-snapshot .waiver-shop-logo {
    margin-bottom: 1rem;
}

/* Signing page header already shows the studio logo. */
.waiver-sign-app:has(.waiver-icon.has-logo) .waiver-sign-document .waiver-shop-logo {
    display: none;
}

.wv-canvas-document {
    width: 100%;
    max-width: 8.5in;
    margin: 0;
    min-height: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 13px;
}

.wv-canvas-actions {
    opacity: 0.85;
    pointer-events: none;
}

.wv-canvas-empty {
    color: var(--wv-muted, #71717a);
    font-size: 13px;
    text-align: center;
    padding: 0;
    margin: 0;
}

.wv-canvas-fields {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    min-height: 2rem;
}

.wv-canvas-fields.is-drop-target {
    outline: 2px dashed color-mix(in srgb, var(--wv-accent, #e85d4c) 35%, transparent);
    outline-offset: 2px;
    border-radius: 6px;
}

.wv-canvas-fields .wv-canvas-block {
    width: 100%;
}

.wv-canvas-drop-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 1.25rem;
    margin: 0.05rem 0;
    border: 1px dashed transparent;
    border-radius: 8px;
    color: transparent;
    font-size: 11px;
    font-weight: 600;
    transition: border-color 0.15s, color 0.15s, background 0.15s, min-height 0.15s;
}

.wv-canvas-drop-zone.is-drag-active {
    min-height: 2.25rem;
    color: var(--wv-muted, #a1a1aa);
}

.wv-canvas-drop-zone.is-drag-active:hover,
.wv-canvas-drop-zone.is-drop-target {
    border-color: var(--wv-accent, #e85d4c);
    color: var(--wv-accent, #e85d4c);
    background: var(--wv-accent-soft, rgb(232 93 76 / 0.06));
}

.wv-canvas-row-cells {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.65rem;
    min-height: 0;
    padding: 0.15rem;
    border-radius: 8px;
    transition: box-shadow 0.15s, background 0.15s;
}

.wv-canvas-row-cells.is-drop-target {
    box-shadow: inset 0 0 0 2px rgb(232 93 76 / 0.25);
    background: var(--wv-accent-soft, rgb(232 93 76 / 0.04));
}

.wv-canvas-cell {
    position: relative;
    flex: 1 1 10rem;
    min-width: 0;
}

.wv-canvas-cell-full {
    flex: 1 1 100%;
}

.wv-canvas-block {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    grid-template-rows: auto auto;
    align-items: start;
    gap: 0.2rem 0.35rem;
    padding: 0.55rem 0;
    border: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--wv-border, #e4e4e7) 80%, transparent);
    background: transparent;
    transition: opacity 0.15s;
}

.wv-canvas-block:last-child {
    border-bottom: 0;
}

.wv-canvas-block:hover {
    background: color-mix(in srgb, var(--wv-bg, #f4f4f5) 45%, transparent);
}

.wv-canvas-block.is-dragging {
    opacity: 0.45;
}

.wv-canvas-block-drag {
    grid-column: 1;
    grid-row: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    margin-top: 0.1rem;
    border: 0;
    background: transparent;
    color: var(--wv-muted, #71717a);
    cursor: grab;
    border-radius: 4px;
    padding: 0;
}

.wv-canvas-block-drag:hover {
    color: var(--wv-accent, #e85d4c);
    background: var(--wv-accent-soft, rgb(232 93 76 / 0.08));
}

.wv-canvas-block-type {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--wv-muted, #71717a);
}

.wv-field-locked {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
    color: var(--wv-muted, #71717a);
    font-size: 0.72rem;
}

.wv-canvas-block-remove {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border: 0;
    background: transparent;
    color: var(--wv-muted, #71717a);
    cursor: pointer;
    border-radius: 4px;
    padding: 0;
}

.wv-canvas-block-remove:hover {
    color: var(--wv-accent, #e85d4c);
    background: var(--wv-accent-soft, rgb(232 93 76 / 0.08));
}

.wv-canvas-block-body {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
    padding-left: 1.7rem;
}

.wv-cb-title-input {
    width: 100%;
    border: 1px dashed transparent;
    border-radius: 6px;
    background: transparent;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--wv-text, #18181b);
    padding: 0.2rem 0.35rem;
    transition: border-color 0.15s, background 0.15s;
}

.wv-cb-title-input:hover,
.wv-cb-title-input:focus {
    border-color: var(--wv-border, #d4d4d8);
    background: var(--wv-bg, #fafafa);
    outline: none;
}

.wv-cb-title-input::placeholder {
    color: var(--wv-muted, #a1a1aa);
    font-weight: 600;
}

.wv-cb-text-input {
    width: 100%;
    min-height: 4.5rem;
    resize: vertical;
    font-size: 11px;
    line-height: 1.5;
}

.wv-cb-label-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
}

.wv-cb-label-input {
    flex: 1 1 8rem;
    min-width: 0;
    border: 1px dashed transparent;
    border-radius: 4px;
    background: transparent;
    padding: 0.15rem 0.3rem;
    transition: border-color 0.15s, background 0.15s;
}

.wv-cb-label-input.waiver-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.wv-cb-label-input:hover,
.wv-cb-label-input:focus {
    border-color: var(--wv-border, #d4d4d8);
    background: var(--wv-bg, #fafafa);
    outline: none;
}

.wv-cb-required {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 10px;
    font-weight: 600;
    color: var(--wv-muted, #71717a);
    white-space: nowrap;
    margin-left: auto;
}

.wv-cb-digit-rules {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.75rem;
    margin: 0.15rem 0 0.35rem;
    padding: 0.3rem 0.4rem;
    border-radius: 8px;
    background: color-mix(in srgb, var(--wv-muted, #71717a) 8%, transparent);
}
.wv-cb-numbers-only,
.wv-cb-max-digits {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 10px;
    font-weight: 600;
    color: var(--wv-muted, #71717a);
    white-space: nowrap;
    margin: 0;
    cursor: pointer;
}
.wv-cb-max-digits.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.wv-cb-max-digits-input {
    width: 3.5rem;
    min-height: 1.6rem;
    padding: 0.15rem 0.35rem;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}

.wv-cb-field-hint {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--wv-muted, #71717a);
}

.wv-cb-ack-row,
.wv-cb-check-row {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    width: 100%;
}

.wv-cb-ack-input {
    flex: 1;
    min-width: 0;
    font-size: 11px;
}

.wv-cb-field-acks {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.wv-editor-columns {
    display: grid;
    grid-template-columns: minmax(18rem, 32rem) minmax(28rem, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.wv-preview-column {
    min-width: 0;
}

.wv-builder-column {
    min-width: 0;
}

.wv-preview-panel {
    position: sticky;
    top: 0.75rem;
}

.wv-preview-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.wv-preview-head h4 {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
}

.wv-preview-head .tsp-meta {
    font-size: 0.68rem;
}

.wv-preview-frame {
    border: 1px solid var(--wv-border, #e4e4e7);
    border-radius: 10px;
    background: var(--wv-bg, #f4f4f5);
    min-height: 14rem;
    max-height: calc(100vh - 9rem);
    overflow: auto;
    box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.04);
    padding: 0.35rem 0.45rem 0.45rem;
}

.wv-preview-app {
    padding: 0;
    pointer-events: none;
    user-select: none;
    font-size: 13px;
}

.wv-preview-app .waiver-wrap {
    max-width: 100%;
    margin: 0 auto;
}

.wv-preview-app .waiver-public-header {
    margin-bottom: 0.85rem;
    gap: 0.75rem;
    align-items: center;
}

.wv-preview-app .waiver-icon {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1rem;
}

.wv-preview-app .waiver-icon.has-logo {
    width: auto;
    height: auto;
    min-width: 0;
    background: transparent;
    border: none;
    padding: 0;
    border-radius: 0;
    overflow: visible;
}

.wv-preview-app .waiver-icon.has-logo img {
    width: auto;
    height: 4.75rem;
    max-width: 11rem;
    object-fit: contain;
}

.wv-preview-app .waiver-title {
    font-size: 1.2rem;
}

.wv-preview-app .waiver-subtitle {
    font-size: 11px;
}

.wv-preview-app .waiver-layout-form,
.wv-preview-app .waiver-layout-stack {
    gap: 0.55rem;
}

.wv-preview-app .waiver-layout-row {
    gap: 0.5rem 0.65rem;
}

.wv-preview-app .waiver-layout-cell {
    flex: 1 1 7rem;
}

.wv-preview-app .waiver-layout-stack .waiver-layout-item {
    padding-bottom: 0;
}

.wv-preview-app .waiver-section-title {
    font-size: 12px;
}

.wv-preview-app .waiver-section-text {
    font-size: 11px;
    line-height: 1.5;
}

.wv-preview-app .waiver-label {
    font-size: 9px;
}

.wv-preview-app .waiver-input,
.wv-preview-app .waiver-textarea {
    padding: 0.45rem 0.6rem;
    font-size: 11px;
}

.wv-preview-app .waiver-checks {
    font-size: 11px;
}

.wv-preview-app .waiver-hint {
    font-size: 10px;
}

.wv-preview-app .waiver-btn-lg {
    padding: 0.5rem 0.85rem;
    font-size: 10px;
}

.wv-preview-document {
    margin-bottom: 0;
    background: var(--wv-card, #fff);
}

.wv-preview-actions {
    opacity: 0.85;
}

.wv-preview-empty {
    color: var(--wv-muted, #71717a);
    font-size: 13px;
    text-align: center;
    padding: 2rem 1rem;
}

.wv-preview-signature {
    height: 100px;
    border: 1px dashed var(--wv-border, #e4e4e7);
    border-radius: 8px;
    background: var(--wv-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wv-muted, #71717a);
    font-size: 10px;
}

.waiver-preview-banner{
  position:sticky;
  top:0;
  z-index:20;
  margin:0 0 1rem;
  padding:.55rem .85rem;
  border-radius:10px;
  background:#111;
  color:#fff;
  text-align:center;
  font:600 12px/1.4 Inter,system-ui,sans-serif;
  letter-spacing:.02em;
}
.waiver-preview-mode .waiver-form-actions{
  opacity:.72;
}
.wv-sources-flyout {
    position: fixed;
    left: 0;
    right: 0;
    top: calc(var(--tsp-header-stack, 0px) + var(--tsp-topbar-height, 52px) + var(--tsp-waiver-nav-height, 49px));
    z-index: 79;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.24s ease, opacity 0.18s ease;
    background: var(--tsp-surface, #fff);
    border-bottom: 1px solid var(--tsp-border, #e4e4e7);
    box-shadow: 0 14px 32px rgb(0 0 0 / 0.12);
}

.wv-sources-flyout.is-open {
    max-height: min(42vh, 340px);
    opacity: 1;
    pointer-events: auto;
}

.wv-sources-flyout-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--tsp-text, #18181b);
}

.wv-sources-panel-close {
    flex: 0 0 auto;
    width: 1.75rem;
    height: 1.75rem;
    border: 1px solid var(--wv-border, #e4e4e7);
    border-radius: 8px;
    background: var(--wv-card, #fafafa);
    color: var(--wv-muted, #71717a);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.wv-sources-panel-close:hover {
    border-color: color-mix(in srgb, var(--tsp-accent, #c9a227) 35%, var(--wv-border, #e4e4e7));
    color: var(--tsp-accent, #c9a227);
}

.wv-sources-panel {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
    overflow: hidden;
    flex-shrink: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.wv-sources-panel-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-width: 0;
    overflow: hidden;
}

.wv-sources-panel-toolbar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    padding: 0.35rem 0.55rem;
    border-bottom: 1px solid var(--wv-border, #e4e4e7);
    background: transparent;
}

.wv-sources-panel-columns {
    display: flex;
    align-items: stretch;
    gap: 0;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    height: min(36vh, 280px);
    min-height: 200px;
}

.wv-sources-panel-toggle {
    flex: 0 0 auto;
    width: 1.65rem;
    height: 1.65rem;
    border: 1px solid var(--wv-border, #e4e4e7);
    border-radius: 8px;
    background: var(--wv-card, #fafafa);
    color: var(--wv-muted, #71717a);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.wv-sources-panel-toggle:hover {
    border-color: color-mix(in srgb, var(--tsp-accent, #c9a227) 35%, var(--wv-border, #e4e4e7));
    color: var(--tsp-accent, #c9a227);
    background: color-mix(in srgb, var(--tsp-accent, #c9a227) 8%, var(--wv-card, #fafafa));
}

.wv-sources-panel.is-collapsed .wv-sources-panel-columns {
    display: none;
}

.wv-sources-panel.is-collapsed .wv-sources-panel-toolbar {
    border-bottom: 0;
}

.wv-sources-panel.is-collapsed .wv-sources-panel-body {
    height: auto;
    min-height: 0;
}

.wv-sources-column {
    display: flex;
    flex-direction: column;
    flex: 1.2 1 0;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border-right: 1px solid var(--wv-border, #e4e4e7);
    transition: flex 0.2s ease, min-width 0.2s ease, max-width 0.2s ease;
}

.wv-sources-column--saved {
    flex: 1 1 0;
    min-width: 11rem;
}

.wv-sources-column--starters {
    flex: 1.15 1 0;
    min-width: 11.5rem;
}

.wv-sources-column--starters .wv-sources-column-head__row h3 {
    white-space: nowrap;
    flex: 0 1 auto;
}

.wv-sources-column--import {
    flex: 0.884 1 0;
    min-width: 8.45rem;
}

.wv-sources-column.is-collapsed {
    flex: 0 0 2.4rem;
    min-width: 2.4rem;
    max-width: 2.4rem;
}

.wv-sources-column.is-collapsed .wv-sources-scroll,
.wv-sources-column.is-collapsed .wv-sources-column-head__note,
.wv-sources-column.is-collapsed .wv-starter-back,
.wv-sources-column.is-collapsed .wv-starter-type-select {
    display: none !important;
}

.wv-sources-column.is-collapsed .wv-sources-column-head {
    min-height: 0;
    height: 100%;
    padding: 0.45rem 0.3rem;
    border-bottom: 0;
    justify-content: center;
}

.wv-sources-column.is-collapsed .wv-sources-column-head__row {
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
    min-height: 0;
}

.wv-sources-column.is-collapsed .wv-sources-column-head__row h3 {
    font-size: 0;
    line-height: 1;
    justify-content: center;
}

.wv-sources-column.is-collapsed .wv-sources-column-head__row h3 i {
    font-size: 0.9rem;
}

.wv-sources-column.is-collapsed .wv-sources-column-head__control {
    flex: 0 0 auto;
    min-width: 0;
    max-width: none;
    width: 100%;
    justify-content: center;
}

.wv-sources-column:last-child {
    border-right: 0;
}

.wv-sources-column-head {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-height: 0;
    padding: 0.3rem 0.35rem 0.25rem;
    border-bottom: 1px solid var(--wv-border, #e4e4e7);
    background: transparent;
    box-sizing: border-box;
}

.wv-sources-column-head__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    min-height: 1.85rem;
}

.wv-sources-column-head__row h3 {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    line-height: 1.25;
}

.wv-sources-column-head__control {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    flex: 0 0 auto;
    min-width: 0;
    max-width: none;
}

.wv-starters-filter-row {
    align-items: flex-end;
    gap: 0.3rem;
}

.wv-starters-filter-row .wv-sources-column-head__note {
    flex: 1 1 auto;
    min-width: 0;
    -webkit-line-clamp: 1;
}

.wv-sources-column--starters .wv-sources-column-head__control {
    flex: 0 0 5.5rem;
    min-width: 5.5rem;
    max-width: 5.5rem;
}

.wv-sources-column-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.45rem;
    height: 1.45rem;
    padding: 0;
    border: 1px solid var(--wv-border, #e4e4e7);
    border-radius: 8px;
    background: var(--wv-card, #fafafa);
    color: var(--tsp-muted);
    font-size: 0.62rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.wv-sources-column-toggle:hover,
.wv-sources-column-toggle:focus-visible {
    background: color-mix(in srgb, var(--tsp-accent, #c9a227) 12%, var(--wv-card, #fafafa));
    border-color: color-mix(in srgb, var(--tsp-accent, #c9a227) 35%, var(--wv-border, #e4e4e7));
    color: var(--tsp-text);
    outline: none;
}

.wv-sources-column-head__note {
    margin: 0;
    flex: 1 1 auto;
    font-size: 0.72rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wv-sources-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    padding: 0.25rem 0.3rem 0.3rem;
}

.wv-templates-head,
.wv-starters-head,
.wv-import-head {
    margin-bottom: 0;
}

.wv-starter-type-select {
    width: 100%;
    padding: 0.28rem 1.6rem 0.28rem 0.45rem;
    font-size: 0.72rem;
    line-height: 1.2;
    box-sizing: border-box;
}

.wv-templates-body.wv-sources-scroll,
.wv-sources-column--saved .wv-sources-scroll {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.wv-templates-layout {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
}

.wv-templates-preview-pane {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
    min-height: 0;
}

.wv-templates-preview-head {
    flex-shrink: 0;
}

.wv-templates-preview-title {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--tsp-text, #18181b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wv-templates-preview-frame {
    flex: 1 1 auto;
    min-height: 8rem;
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--wv-border, #e4e4e7);
    border-radius: 8px;
    background: #fff;
}

.wv-templates-preview-scaler {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 0.2rem;
    min-height: 100%;
    width: 100%;
    box-sizing: border-box;
}

.wv-templates-preview-scale-wrap {
    flex-shrink: 0;
}

.wv-templates-preview-sheet {
    width: 816px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 8px rgb(0 0 0 / 0.06), 0 0 0 1px rgb(0 0 0 / 0.04);
    pointer-events: none;
    user-select: none;
    color: var(--wv-text, #18181b);
}

.wv-templates-preview-sheet .waiver-wrap,
.wv-templates-preview-sheet .waiver-document {
    margin: 0;
    padding: 0.65rem 0.75rem 0.75rem;
    border: none;
    background: transparent;
}

.wv-templates-preview-sheet .waiver-label,
.wv-templates-preview-sheet .waiver-section-title {
    font-size: 0.72rem;
    line-height: 1.25;
}

.wv-templates-preview-sheet .waiver-section-text,
.wv-templates-preview-sheet .waiver-field-block,
.wv-templates-preview-sheet .waiver-input,
.wv-templates-preview-sheet .waiver-textarea {
    font-size: 0.68rem;
    line-height: 1.35;
}

.wv-templates-grid-wrap {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.wv-template-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(5.75rem, 1fr));
    align-content: flex-start;
    gap: 0.35rem;
}

.wv-template-list-empty {
    grid-column: 1 / -1;
}

.wv-template-thumb-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    border: 1px solid var(--wv-border, #e4e4e7);
    border-radius: 10px;
    background: var(--wv-card, #fafafa);
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.wv-template-thumb-card:hover,
.wv-template-thumb-card:focus-within {
    border-color: color-mix(in srgb, var(--tsp-accent, #c9a227) 40%, var(--wv-border, #e4e4e7));
    box-shadow: 0 4px 14px rgb(0 0 0 / 0.06);
    transform: translateY(-1px);
}

.wv-template-thumb-card.is-selected {
    border-color: color-mix(in srgb, var(--tsp-accent, #c9a227) 55%, var(--wv-border, #e4e4e7));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--tsp-accent, #c9a227) 25%, transparent);
}

.wv-template-thumb-card__load {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.22rem;
    width: 100%;
    padding: 0.45rem 0.4rem 0.42rem;
    border: 0;
    background: transparent;
    text-align: left;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.wv-template-thumb-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 8px;
    background: color-mix(in srgb, var(--tsp-accent, #c9a227) 10%, var(--wv-card, #fafafa));
    color: var(--tsp-accent, #c9a227);
    font-size: 0.72rem;
}

.wv-template-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3.5rem;
    padding: 0.35rem;
    font-size: 0.62rem;
    color: var(--tsp-muted);
    text-align: center;
}

.wv-template-thumb-card__label {
    display: -webkit-box;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--tsp-text);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wv-template-thumb-card__meta {
    display: block;
    font-size: 0.58rem;
    line-height: 1.25;
    color: var(--tsp-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wv-template-thumb-card__actions {
    position: absolute;
    top: 0.28rem;
    right: 0.28rem;
    display: flex;
    gap: 0.2rem;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.wv-template-thumb-card:hover .wv-template-thumb-card__actions,
.wv-template-thumb-card:focus-within .wv-template-thumb-card__actions {
    opacity: 1;
}

.wv-template-thumb-card__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    padding: 0;
    border: 1px solid var(--wv-border, #e4e4e7);
    border-radius: 6px;
    background: var(--wv-card, #fafafa);
    color: var(--tsp-accent, #c9a227);
    font-size: 0.58rem;
    cursor: pointer;
}

.wv-template-thumb-card__action:hover {
    background: color-mix(in srgb, var(--tsp-accent, #c9a227) 12%, var(--wv-card, #fafafa));
    border-color: color-mix(in srgb, var(--tsp-accent, #c9a227) 35%, var(--wv-border, #e4e4e7));
}

.wv-template-thumb-card__action--danger {
    color: var(--tsp-danger, #c0392b);
}

.wv-template-thumb-card__action--danger:hover {
    background: color-mix(in srgb, var(--tsp-danger, #c0392b) 10%, var(--wv-card, #fafafa));
    border-color: color-mix(in srgb, var(--tsp-danger, #c0392b) 30%, var(--wv-border, #e4e4e7));
}

.wv-thumb-input {
    display: block;
    height: 0.55rem;
    border: 1px solid var(--wv-border, #e4e4e7);
    border-radius: 2px;
    background: var(--wv-card, #fff);
}

.wv-thumb-textarea {
    display: block;
    height: 0.85rem;
    border: 1px solid var(--wv-border, #e4e4e7);
    border-radius: 2px;
    background: var(--wv-card, #fff);
}

.wv-thumb-signature {
    height: 1.1rem;
    border: 1px dashed var(--wv-border, #d4d4d8);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.32rem;
    color: var(--wv-muted, #a1a1aa);
}

.wv-thumb-check,
.wv-thumb-checks .wv-thumb-check {
    display: block;
    font-size: 0.34rem;
    line-height: 1.3;
    margin-bottom: 0.1rem;
}

.wv-thumb-more {
    display: block;
    font-size: 0.3rem;
    color: var(--wv-muted, #a1a1aa);
    margin-top: 0.08rem;
}

.wv-template-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.35rem;
}

.wv-template-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    background: color-mix(in srgb, var(--tsp-muted, #71717a) 18%, transparent);
    color: var(--tsp-muted, #a1a1aa);
}

.wv-template-badge.is-active {
    background: color-mix(in srgb, var(--tsp-accent, #c9a227) 18%, transparent);
    color: var(--tsp-accent, #c9a227);
}



.wv-starter-back {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0 0 0.45rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--tsp-accent, #c9a227);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
}

.wv-starter-back:hover {
    text-decoration: underline;
}

.wv-starter-state-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.45rem;
    align-items: flex-start;
    min-width: 0;
}

.wv-starter-state-card {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.144rem;
    width: auto;
    min-width: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.wv-starter-state-card:hover,
.wv-starter-state-card:focus-visible {
    opacity: 0.88;
    transform: translateY(-1px);
    outline: none;
}

.wv-starter-state-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.28rem;
    height: 2.28rem;
    border: none;
    border-radius: 999px;
    background: color-mix(in srgb, var(--wv-state-icon-color, var(--tsp-accent, #c9a227)) 18%, var(--wv-card, #fafafa));
    flex-shrink: 0;
}

.wv-starter-state-logo__code {
    font-size: 0.744rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.04em;
    color: var(--tsp-text);
}

.wv-starter-state-count {
    display: block;
    font-size: 0.624rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--tsp-muted);
    white-space: nowrap;
}

.wv-starter-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}

.wv-starter-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    min-width: 0;
    padding: 0.5rem 0.55rem;
    border: 1px solid var(--wv-border, #e4e4e7);
    border-radius: 10px;
    background: var(--wv-card, #fafafa);
}

.wv-starter-form-row__main {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
    flex: 1 1 auto;
}

.wv-starter-form-row__title {
    display: block;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--tsp-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wv-starter-form-row__type {
    display: inline-block;
    width: fit-content;
    max-width: 100%;
    padding: 0.08rem 0.34rem;
    border-radius: 999px;
    font-size: 0.56rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: color-mix(in srgb, var(--tsp-accent, #c9a227) 14%, var(--wv-card, #fafafa));
    color: var(--tsp-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wv-starter-form-row .wv-starter-import {
    flex-shrink: 0;
    white-space: nowrap;
}

.wv-starter-empty {
    padding: 1rem;
    border: 1px dashed var(--wv-border, #d4d4d8);
    border-radius: 12px;
    background: color-mix(in srgb, var(--tsp-accent, #c9a227) 6%, var(--wv-card, #fafafa));
}

.wv-sources-column--import .wv-sources-column-head {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.wv-sources-column--import .wv-sources-column-head__row h3 {
    font-size: 0.78rem;
    gap: 0.28rem;
}

.wv-sources-column--import .wv-sources-column-head__control {
    flex: 0 0 auto;
    min-width: 0;
    max-width: none;
}

.wv-sources-column--import .wv-sources-scroll {
    overflow: hidden;
    padding: 0.25rem 0.3rem 0.3rem;
}

.wv-sources-column--import .wv-import-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.wv-sources-column--import .wv-import-dropzone {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-height: 0;
    padding: 0.45rem 0.3rem;
    border-radius: 10px;
}

.wv-sources-column--import .wv-import-dropzone > i {
    font-size: 1.1rem;
    margin-bottom: 0;
}

.wv-sources-column--import .wv-import-drop-title {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.2;
}

.wv-sources-column--import .wv-import-browse-line {
    margin: 0;
    font-size: 0.6rem;
    line-height: 1.2;
}

.wv-sources-column--import .wv-import-status {
    flex-shrink: 0;
    margin-top: 0.35rem;
    padding: 0.45rem 0.4rem;
}

.wv-sources-column--import .wv-import-status-row {
    margin-bottom: 0.35rem;
    font-size: 0.62rem;
}

.wv-sources-column--import .wv-import-progress {
    height: 4px;
}

@media (max-width: 960px) {
    .wv-sources-panel {
        flex-direction: column;
        height: min(52vh, 460px);
        min-height: 320px;
    }

    .wv-sources-column,
    .wv-sources-column--saved,
    .wv-sources-column--starters,
    .wv-sources-column--import {
        flex: 1 1 0;
        min-width: 0;
        max-width: none;
    }

    .wv-templates-layout {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(9rem, 1fr) auto;
    }

    .wv-templates-preview-frame {
        min-height: 8.5rem;
    }

    .wv-sources-column.is-collapsed {
        flex: 0 0 2.4rem;
        min-width: 2.4rem;
        max-width: none;
    }

    .wv-sources-column--import .wv-sources-scroll {
        overflow-y: auto;
    }

    .wv-sources-column {
        border-right: 0;
        border-bottom: 1px solid var(--wv-border, #e4e4e7);
    }



    .wv-sources-column:last-child {
        border-bottom: 0;
    }
}

.wv-import-dropzone {
    border: 2px dashed var(--wv-border, #d4d4d8);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    background: var(--wv-card, #fafafa);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.wv-import-dropzone:hover,
.wv-import-dropzone:focus-visible {
    border-color: var(--wv-accent, #e85d4c);
    box-shadow: 0 0 0 3px rgb(232 93 76 / 0.1);
    outline: none;
}

.wv-import-dropzone.is-dragover {
    border-color: var(--wv-accent, #e85d4c);
    background: rgb(232 93 76 / 0.04);
}

.wv-import-dropzone.is-busy {
    opacity: 0.65;
    pointer-events: none;
}

.wv-import-dropzone > i {
    font-size: 1.75rem;
    color: var(--wv-accent, #e85d4c);
    margin-bottom: 0.35rem;
}

.wv-import-drop-title {
    margin: 0 0 0.15rem;
    font-weight: 600;
}

.wv-import-browse {
    background: none;
    border: none;
    padding: 0;
    color: var(--wv-accent, #e85d4c);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

.wv-import-limits,
.wv-import-note {
    margin-top: 0.5rem;
}

.wv-import-status {
    margin-top: 0.75rem;
    padding: 0.75rem;
    border-radius: 10px;
    background: var(--wv-card, #fafafa);
    border: 1px solid var(--wv-border, #e4e4e7);
}

.wv-import-status-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.92rem;
}

.wv-import-progress {
    height: 6px;
}

.wv-template-meta {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.wv-waiver-body-section {
    margin: 0.75rem 0 1rem;
}

.wv-waiver-body-hint {
    margin: 0 0 0.75rem;
}

.wv-body-builder {
    --wv-palette-width: 13rem;
    display: grid;
    grid-template-columns: minmax(10rem, var(--wv-palette-width)) 6px minmax(0, 1fr);
    gap: 0 0.65rem;
    align-items: start;
}

.wv-builder-split {
    align-self: stretch;
    min-height: 12rem;
    border-radius: 999px;
    background: var(--wv-border, #e4e4e7);
    cursor: col-resize;
    transition: background 0.15s, box-shadow 0.15s;
}

.wv-builder-split:hover,
.wv-builder-split:focus-visible {
    background: var(--wv-accent, #e85d4c);
    box-shadow: 0 0 0 2px rgb(232 93 76 / 0.15);
    outline: none;
}

body.wv-builder-resizing {
    cursor: col-resize;
    user-select: none;
}

body.wv-builder-resizing * {
    cursor: col-resize !important;
}

.wv-field-palette h4,
.wv-layout-panel > h4 {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    font-weight: 700;
}

.wv-field-palette > .tsp-meta {
    margin-bottom: 0.35rem;
}

.wv-layout-panel {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.wv-layout-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 12rem;
    border: 1px solid var(--wv-border, #e4e4e7);
    border-radius: 12px;
    padding: 0.65rem;
    background: var(--wv-card);
}

.wv-layout-row {
    border: 1px solid var(--wv-border, #e4e4e7);
    border-radius: 10px;
    background: #fafafa;
    padding: 0.55rem;
}

.wv-layout-row-cells {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 3.5rem;
    padding: 0.25rem;
    border-radius: 8px;
    transition: box-shadow 0.15s, border-color 0.15s;
}

.wv-layout-row-cells.is-drop-target {
    box-shadow: inset 0 0 0 2px rgb(232 93 76 / 0.2);
    background: var(--wv-accent-soft);
}

.wv-layout-cell {
    position: relative;
    flex: 1 1 10rem;
    min-width: 0;
}

.wv-cell-resize-handle {
    position: absolute;
    top: 0;
    right: -5px;
    width: 10px;
    height: 100%;
    cursor: col-resize;
    z-index: 6;
    touch-action: none;
}

.wv-cell-resize-handle::after {
    content: '';
    position: absolute;
    top: 12%;
    bottom: 12%;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    border-radius: 1px;
    background: var(--wv-border, #e4e4e7);
    transition: background 0.15s, width 0.15s;
}

.wv-cell-resize-handle:hover::after,
.wv-cell-resize-handle:focus-visible::after,
.wv-cell-resize-handle.is-active::after {
    background: var(--wv-accent, #e85d4c);
    width: 3px;
}

body.wv-cell-resizing {
    cursor: col-resize;
    user-select: none;
}

body.wv-cell-resizing * {
    cursor: col-resize !important;
}

.wv-layout-cell-full {
    flex: 1 1 100%;
}

.wv-layout-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    margin-top: 0.45rem;
    padding-top: 0.4rem;
    border-top: 1px dashed var(--wv-border, #e4e4e7);
}

.wv-row-action-wrap {
    position: relative;
}

.wv-row-action-wrap-center {
    width: 100%;
    display: flex;
    justify-content: center;
}

.wv-row-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px dashed var(--wv-border, #e4e4e7);
    background: var(--wv-card);
    color: var(--wv-muted, #71717a);
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.wv-row-action-btn:hover,
.wv-row-action-wrap.is-open .wv-row-action-btn {
    border-color: var(--wv-accent, #e85d4c);
    color: var(--wv-accent, #e85d4c);
    background: var(--wv-accent-soft);
}

.wv-layout-new-row {
    display: flex;
    justify-content: center;
    padding: 0.2rem 0;
}

.wv-layout-new-row.is-drop-target .wv-layout-new-row-btn {
    border-color: var(--wv-accent, #e85d4c);
    color: var(--wv-accent, #e85d4c);
    background: var(--wv-accent-soft);
    box-shadow: 0 0 0 2px rgb(232 93 76 / 0.12);
}

.wv-row-picker {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(2, minmax(7.5rem, 1fr));
    gap: 0.3rem;
    min-width: 15rem;
    max-width: 18rem;
    padding: 0.45rem;
    border: 1px solid var(--wv-border, #e4e4e7);
    border-radius: 10px;
    background: var(--wv-card);
    box-shadow: 0 8px 24px rgb(0 0 0 / 0.1);
}

.wv-row-action-wrap-center .wv-row-picker {
    left: 50%;
    transform: translateX(-50%);
}

.wv-row-picker.tsp-hidden {
    display: none;
}

.wv-row-picker-item {
    border: 1px solid var(--wv-border, #e4e4e7);
    background: #fafafa;
    border-radius: 8px;
    padding: 0.4rem 0.5rem;
    font-size: 11px;
    font-weight: 600;
    color: var(--wv-text, #18181b);
    text-align: left;
    cursor: pointer;
}

.wv-row-picker-item:hover:not(.is-disabled) {
    border-color: var(--wv-accent, #e85d4c);
    background: var(--wv-accent-soft);
}

.wv-row-picker-item.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.wv-layout-list.is-drop-target {
    border-color: var(--wv-accent, #e85d4c);
    box-shadow: 0 0 0 2px rgb(232 93 76 / 0.12);
}

.wv-layout-empty {
    color: var(--wv-muted, #71717a);
    font-size: 12px;
    text-align: center;
    padding: 2.5rem 0.75rem;
}

.wv-layout-item.is-drop-target {
    border-color: var(--wv-accent, #e85d4c);
    box-shadow: 0 0 0 2px rgb(232 93 76 / 0.15);
}

.wv-field-row-stack {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.wv-body-section {
    border: 1px solid var(--wv-border, #e4e4e7);
    border-radius: 10px;
    background: #fafafa;
    padding: 0.55rem 0.65rem;
}

.wv-body-section.is-dragging {
    opacity: 0.55;
}

.wv-body-section.is-drop-target {
    border-color: var(--wv-accent, #e85d4c);
    box-shadow: 0 0 0 2px rgb(232 93 76 / 0.15);
}

.wv-body-section-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
}

.wv-body-section-title {
    flex: 1;
    min-width: 0;
}

.wv-body-section-text {
    min-height: 5.5rem;
    resize: vertical;
}

.waiver-section-text {
    font-size: 14px;
    line-height: 1.55;
    color: var(--wv-text);
    margin: 0 0 0.5rem;
}

.waiver-field-block {
    margin: 0 0 0.5rem;
}

.waiver-layout-item .waiver-field-block:last-child {
    margin-bottom: 0;
}

.wv-field-builder {
    display: grid;
    grid-template-columns: minmax(11rem, 14rem) 1fr;
    gap: 1rem;
    margin: 1.25rem 0 0.5rem;
    align-items: start;
}

.wv-field-palette h4,
.wv-field-active h4 {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    font-weight: 700;
}

.wv-field-palette-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.wv-palette-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    border: 1px dashed var(--wv-border, #e4e4e7);
    background: #fafafa;
    border-radius: 10px;
    padding: 0.55rem 0.65rem;
    font-size: 12px;
    font-weight: 600;
    color: var(--wv-text, #18181b);
    cursor: grab;
    text-align: left;
}

.wv-palette-item:hover:not(.is-disabled) {
    border-color: var(--wv-accent, #e85d4c);
    background: var(--wv-accent-soft);
}

.wv-palette-item.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.wv-palette-item span {
    flex: 1;
}

.wv-field-active-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 8rem;
    border: 1px solid var(--wv-border, #e4e4e7);
    border-radius: 12px;
    padding: 0.65rem;
    background: var(--wv-card);
}

.wv-field-row {
    border: 1px solid var(--wv-border, #e4e4e7);
    border-radius: 10px;
    background: #fafafa;
    padding: 0.55rem 0.65rem;
}

.wv-field-row.is-dragging {
    opacity: 0.55;
}

.wv-field-row.is-drop-target {
    border-color: var(--wv-accent, #e85d4c);
    box-shadow: 0 0 0 2px rgb(232 93 76 / 0.15);
}

.wv-field-row-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.wv-cell-width-label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 11px;
    color: var(--wv-muted, #71717a);
    white-space: nowrap;
}

.wv-cell-width-text {
    font-weight: 600;
}

.wv-cell-width {
    width: 4.75rem;
    min-width: 4.75rem;
    padding: 0.2rem 0.35rem;
    font-size: 11px;
}

.wv-field-drag {
    border: none;
    background: transparent;
    color: var(--wv-muted, #71717a);
    cursor: grab;
    padding: 0.15rem;
}

.wv-field-type {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--wv-muted, #71717a);
    min-width: 5.5rem;
}

.wv-field-label-input {
    flex: 1;
    min-width: 10rem;
}

.wv-field-required {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 12px;
    color: var(--wv-muted, #71717a);
    white-space: nowrap;
}

.wv-field-locked {
    color: var(--wv-muted, #71717a);
    padding: 0.2rem;
}

.wv-ack-items {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.waiver-dynamic-fields {
    margin-top: 1rem;
}

/* Full-window public waiver page (no theme header/footer)
   Tuned for iPad / tablet signing: larger type, 2-col field grid. */
html.waiver-public-page,
body.waiver-public-page {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    min-height: 100dvh;
    overflow-x: hidden;
    background: var(--wv-bg, #f4f4f5);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body.waiver-public-page #wpadminbar,
body.waiver-public-page .site-header,
body.waiver-public-page .site-footer,
body.waiver-public-page footer,
body.waiver-public-page header.site-header,
body.waiver-public-page .footer-widgets,
body.waiver-public-page .entry-header,
body.waiver-public-page .post-navigation,
body.waiver-public-page .comments-area {
    display: none !important;
}

body.waiver-public-page .waiver-app.waiver-public {
    --wv-sign-gap: 0.9rem 1.35rem;
    --wv-sign-pad: 1.35rem 1.5rem;
    --wv-sign-title: clamp(1.45rem, 2.4vw, 1.85rem);
    --wv-sign-subtitle: 1rem;
    --wv-sign-section: 1.15rem;
    --wv-sign-body: 1.05rem;
    --wv-sign-label: 0.82rem;
    --wv-sign-input: 1.05rem;
    --wv-sign-check: 1.05rem;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: calc(1rem + env(safe-area-inset-top, 0px))
        max(1.25rem, env(safe-area-inset-right, 0px))
        calc(1.35rem + env(safe-area-inset-bottom, 0px))
        max(1.25rem, env(safe-area-inset-left, 0px));
    border-radius: 0;
    box-sizing: border-box;
    background: var(--wv-bg);
}

body.waiver-public-page .waiver-sign-app {
    font-size: var(--wv-sign-body);
    line-height: 1.5;
    width: 100%;
}

body.waiver-public-page .waiver-wrap {
    width: 100%;
    max-width: min(72rem, 100%);
    margin: 0 auto;
    box-sizing: border-box;
}

body.waiver-public-page .waiver-public-header {
    margin: 0 0 1rem;
    padding: 0;
    gap: 0.9rem;
    background: transparent;
    border: none;
    position: static;
    align-items: center;
}

body.waiver-public-page .waiver-public-header > div:last-child {
    min-width: 0;
    flex: 1 1 auto;
}

body.waiver-public-page .waiver-public-header .waiver-title {
    font-size: var(--wv-sign-title);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

body.waiver-public-page .waiver-public-header .waiver-subtitle {
    font-size: var(--wv-sign-subtitle);
    margin-top: 0.25rem;
    line-height: 1.4;
}

body.waiver-public-page .waiver-icon {
    width: 3rem;
    height: 3rem;
    font-size: 1.25rem;
}

body.waiver-public-page .waiver-icon.has-logo {
    padding: 0.3rem;
}

body.waiver-public-page .waiver-form {
    margin: 0;
    width: 100%;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    background: transparent;
}

body.waiver-public-page .waiver-sign-document,
body.waiver-public-page .waiver-document {
    width: 100%;
    margin-bottom: 1rem;
    padding: var(--wv-sign-pad);
    background: var(--wv-card);
    border: 1px solid var(--wv-border);
    border-radius: 14px;
    box-sizing: border-box;
}

body.waiver-public-page .waiver-sign-document .waiver-dynamic-fields {
    margin-top: 1rem;
}

body.waiver-public-page .waiver-sign-document #waiver-template-body:empty + .waiver-dynamic-fields {
    margin-top: 0;
}

/* Two-column field grid on tablet/desktop; legal blocks stay full width. */
body.waiver-public-page .waiver-layout-form,
body.waiver-public-page .waiver-layout-stack,
body.waiver-public-page .waiver-dynamic-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--wv-sign-gap);
    align-items: start;
    width: 100%;
}

body.waiver-public-page .waiver-layout-row {
    display: contents;
}

body.waiver-public-page .waiver-layout-cell {
    min-width: 0;
}

body.waiver-public-page .waiver-layout-item,
body.waiver-public-page .waiver-dynamic-fields > .waiver-field-block,
body.waiver-public-page .waiver-dynamic-fields > .waiver-checks {
    min-width: 0;
    width: 100%;
    padding-bottom: 0;
}

body.waiver-public-page .waiver-layout-item.is-full,
body.waiver-public-page .waiver-layout-item:has(.waiver-section-text),
body.waiver-public-page .waiver-layout-item:has(.waiver-section-title),
body.waiver-public-page .waiver-layout-item:has(.waiver-signature-wrap),
body.waiver-public-page .waiver-layout-item:has(.waiver-checks),
body.waiver-public-page .waiver-layout-item:has(textarea),
body.waiver-public-page .waiver-layout-cell-full,
body.waiver-public-page .waiver-dynamic-fields > .waiver-section-title,
body.waiver-public-page .waiver-dynamic-fields > .waiver-field-block:has(.waiver-signature-wrap),
body.waiver-public-page .waiver-dynamic-fields > .waiver-field-block:has(textarea),
body.waiver-public-page .waiver-dynamic-fields > .waiver-checks {
    grid-column: 1 / -1;
}

body.waiver-public-page .waiver-shop-logo {
    grid-column: 1 / -1;
    margin: 0 0 0.35rem;
}

body.waiver-public-page #waiver-template-body {
    width: 100%;
}

body.waiver-public-page .waiver-section-title {
    font-size: var(--wv-sign-section);
    font-weight: 700;
    margin: 0.15rem 0 0.45rem;
    line-height: 1.3;
}

body.waiver-public-page .waiver-section-text {
    font-size: var(--wv-sign-body);
    line-height: 1.65;
    margin: 0 0 0.35rem;
}

body.waiver-public-page .waiver-label {
    font-size: var(--wv-sign-label);
    letter-spacing: 0.06em;
    margin: 0 0 0.4rem;
    line-height: 1.35;
}

body.waiver-public-page .waiver-field-block {
    margin: 0;
}

body.waiver-public-page .waiver-input,
body.waiver-public-page .waiver-textarea {
    /* 16px+ avoids iOS focus zoom; keeps tablet signing readable. */
    font-size: max(16px, var(--wv-sign-input));
    padding: 0.75rem 0.9rem;
    min-height: 2.85rem;
    border-radius: 12px;
    line-height: 1.35;
}

body.waiver-public-page .waiver-textarea {
    min-height: 6.5rem;
    resize: vertical;
}

body.waiver-public-page .waiver-hint {
    font-size: 0.95rem;
    line-height: 1.45;
    margin: 0 0 0.55rem;
}

body.waiver-public-page .waiver-checks {
    font-size: var(--wv-sign-check);
    line-height: 1.5;
    gap: 0.75rem;
}

body.waiver-public-page .waiver-checks label {
    gap: 0.7rem;
    align-items: flex-start;
    padding: 0.35rem 0;
}

body.waiver-public-page .waiver-checks input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
    accent-color: var(--wv-accent);
}

body.waiver-public-page .waiver-signature-wrap {
    padding: 0.9rem;
    border-radius: 12px;
}

body.waiver-public-page #waiver-signature-pad,
body.waiver-public-page #wv-print-signature {
    height: min(42vw, 240px);
    min-height: 200px;
    border-radius: 10px;
}

body.waiver-public-page .waiver-form-actions {
    margin: 0;
    padding: 0;
    width: 100%;
}

body.waiver-public-page .waiver-btn-lg {
    min-height: 3.15rem;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
}

.waiver-btn-block {
    width: 100%;
    display: block;
    text-align: center;
}

body.waiver-public-page .waiver-success {
    margin: 1rem auto;
    max-width: 32rem;
    border-radius: var(--wv-radius);
    padding: 2.25rem 1.5rem;
}

body.waiver-public-page .waiver-success h2 {
    font-size: 1.65rem;
}

body.waiver-public-page .waiver-empty {
    padding: 2.75rem 1rem;
    font-size: 1.05rem;
}

/* Large tablets / landscape iPad — more air, keep 2 columns. */
@media (min-width: 900px) {
    body.waiver-public-page .waiver-app.waiver-public {
        --wv-sign-gap: 1rem 1.6rem;
        --wv-sign-pad: 1.5rem 1.75rem;
        --wv-sign-body: 1.08rem;
        --wv-sign-section: 1.2rem;
    }

    body.waiver-public-page .waiver-wrap {
        max-width: min(78rem, 100%);
    }
}

/* Narrow phones only: single column. iPad portrait (~768–834) keeps 2 cols. */
@media (max-width: 639px) {
    body.waiver-public-page .waiver-app.waiver-public {
        --wv-sign-gap: 0.85rem;
        --wv-sign-pad: 1.05rem 1rem;
        --wv-sign-title: 1.35rem;
        --wv-sign-subtitle: 0.95rem;
        --wv-sign-section: 1.08rem;
        --wv-sign-body: 1.02rem;
        --wv-sign-label: 0.78rem;
        --wv-sign-input: 1.05rem;
        --wv-sign-check: 1.02rem;
        padding-left: max(0.85rem, env(safe-area-inset-left, 0px));
        padding-right: max(0.85rem, env(safe-area-inset-right, 0px));
    }

    body.waiver-public-page .waiver-layout-form,
    body.waiver-public-page .waiver-layout-stack,
    body.waiver-public-page .waiver-dynamic-fields {
        grid-template-columns: minmax(0, 1fr);
    }

    body.waiver-public-page .waiver-layout-item.is-full,
    body.waiver-public-page .waiver-layout-item:has(.waiver-section-text),
    body.waiver-public-page .waiver-layout-item:has(.waiver-section-title),
    body.waiver-public-page .waiver-layout-item:has(.waiver-signature-wrap),
    body.waiver-public-page .waiver-layout-item:has(.waiver-checks),
    body.waiver-public-page .waiver-layout-item:has(textarea),
    body.waiver-public-page .waiver-layout-cell-full,
    body.waiver-public-page .waiver-dynamic-fields > .waiver-section-title,
    body.waiver-public-page .waiver-dynamic-fields > .waiver-field-block:has(.waiver-signature-wrap),
    body.waiver-public-page .waiver-dynamic-fields > .waiver-field-block:has(textarea),
    body.waiver-public-page .waiver-dynamic-fields > .waiver-checks {
        grid-column: auto;
    }

    body.waiver-public-page .waiver-icon {
        width: 2.65rem;
        height: 2.65rem;
        font-size: 1.1rem;
    }

    body.waiver-public-page #waiver-signature-pad,
    body.waiver-public-page #wv-print-signature {
        height: 200px;
        min-height: 180px;
    }

    body.waiver-public-page .waiver-btn-lg {
        min-height: 3rem;
        font-size: 0.9rem;
    }
}

/* Short landscape phones: keep two columns but tighten vertical rhythm. */
@media (max-height: 480px) and (orientation: landscape) {
    body.waiver-public-page .waiver-app.waiver-public {
        --wv-sign-pad: 0.85rem 1rem;
        --wv-sign-gap: 0.65rem 1rem;
        padding-top: calc(0.55rem + env(safe-area-inset-top, 0px));
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    }

    body.waiver-public-page #waiver-signature-pad,
    body.waiver-public-page #wv-print-signature {
        height: 140px;
        min-height: 120px;
    }
}

@media (max-width: 1100px) {
    .wv-meta-save {
        margin-left: 0;
        width: 100%;
    }

    .wv-split-workspace,
    .wv-editor-columns {
        grid-template-columns: 1fr;
    }

    .wv-preview-panel {
        position: static;
        max-height: 32rem;
    }

    .wv-preview-frame {
        min-height: 22rem;
        max-height: 32rem;
    }

    body.tsp-waiver-active .wv-preview-panel,
    .tsp-view[data-view="forms"].active .wv-preview-panel {
        max-height: none;
        min-height: 0;
    }

    body.tsp-waiver-active .wv-preview-frame,
    .tsp-view[data-view="forms"].active .wv-preview-frame {
        min-height: 0;
        max-height: none;
    }

    body.tsp-waiver-active .wv-split-workspace,
    .tsp-view[data-view="forms"].active .wv-split-workspace {
        min-height: 0;
    }
}

/* Signed waivers list (Forms dashboard) — collapsible card grid */
.wv-signed-panel {
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
}

.wv-signed-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0;
}

.wv-signed-panel:not(.is-collapsed) .wv-signed-panel-head {
    margin-bottom: 0.75rem;
}

.wv-signed-panel-toggle {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0.15rem 0.2rem;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    font: inherit;
    border-radius: 8px;
}

.wv-signed-panel-toggle:hover {
    background: rgba(0, 0, 0, 0.03);
}

.wv-signed-panel-toggle__chevron {
    flex: 0 0 auto;
    width: 1.5rem;
    height: 1.5rem;
    margin-top: 0.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--wv-muted, #71717a);
    transition: transform 0.18s ease;
}

.wv-signed-panel.is-collapsed .wv-signed-panel-toggle__chevron {
    transform: rotate(-90deg);
}

.wv-signed-panel-toggle__text {
    min-width: 0;
}

.wv-signed-panel-head h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 650;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.wv-signed-panel-note {
    margin: 0.25rem 0 0;
}

.wv-signed-panel.is-collapsed .wv-signed-panel-note {
    display: none;
}

.wv-signed-panel-body {
    overflow: hidden;
}

.wv-signed-panel.is-collapsed .wv-signed-panel-body {
    display: none;
}

.wv-signed-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
    gap: 0.55rem;
    max-height: 18rem;
    overflow: auto;
    padding: 0.1rem;
}

.wv-signed-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--wv-border, #e4e4e7);
    background: var(--wv-bg, #f4f4f5);
    color: inherit;
    border-radius: 10px;
    min-width: 0;
    overflow: hidden;
    transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
}

.wv-signed-card:hover {
    border-color: var(--wv-accent, #e85d4c);
    background: var(--wv-card, #fff);
    box-shadow: 0 2px 8px rgb(0 0 0 / 0.06);
}

.wv-signed-card__main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    color: inherit;
    padding: 0.55rem 0.55rem 0.35rem;
    cursor: pointer;
    font: inherit;
    position: relative;
}

.wv-signed-card__icon {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--wv-accent-soft, #fde8e6);
    color: var(--wv-accent, #e85d4c);
    font-size: 0.85rem;
    margin-bottom: 0.15rem;
}

.wv-signed-card__name {
    font-weight: 650;
    font-size: 0.82rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    width: 100%;
}

.wv-signed-card__title {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--wv-muted, #71717a);
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    width: 100%;
}

.wv-signed-card__meta {
    font-size: 0.68rem;
    color: var(--wv-muted, #71717a);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    width: 100%;
    margin-top: 0.1rem;
}

.wv-signed-card__badges {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
}

.wv-signed-badge {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 0.12rem 0.35rem;
    border-radius: 999px;
    background: #e4e4e7;
    color: #3f3f46;
}

.wv-signed-card__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.1rem;
    padding: 0 0.3rem 0.3rem;
    border-top: 1px solid transparent;
}

.wv-signed-card:hover .wv-signed-card__actions {
    border-top-color: var(--wv-border, #e4e4e7);
}

.wv-signed-card__actions .tsp-btn {
    padding: 0.25rem 0.4rem;
    min-width: 1.75rem;
}

@media (max-width: 768px) {
    .wv-template-meta,
    .wv-field-builder,
    .wv-body-builder {
        grid-template-columns: 1fr;
    }

    .wv-builder-split {
        display: none;
    }

    .waiver-layout-row {
        flex-direction: column;
    }

    .waiver-layout-cell {
        flex: 1 1 100%;
    }

    .wv-signed-list {
        grid-template-columns: repeat(auto-fill, minmax(8.25rem, 1fr));
        max-height: 14rem;
    }
}