* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bb-bg, #fffaf6);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--bb-ink, #111111);
    background: var(--bb-bg, #fffaf6);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

button,
input,
textarea,
select {
    font: inherit;
    letter-spacing: 0;
}

.autofill-trap {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    border: 0;
    white-space: nowrap;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: wait;
    opacity: 0.68;
}

.kiosk-body {
    overflow: hidden;
}

.brand-bar {
    position: fixed;
    top: 18px;
    left: 22px;
    right: auto;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0;
    pointer-events: none;
}

.brand-mark {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border: 1px solid var(--bb-gold, #b88935);
    border-radius: 50%;
    color: var(--bb-gold-dark, #8b6324);
    background: var(--bb-surface, #ffffff);
    font-weight: 800;
}

.brand-logo {
    width: 104px;
    max-height: 78px;
    object-fit: contain;
    opacity: 0.92;
}

.kiosk-policy-button {
    position: fixed;
    right: clamp(14px, 2vw, 28px);
    bottom: clamp(14px, 2vw, 24px);
    z-index: 120;
    min-height: 46px;
    max-width: min(300px, calc(100vw - 28px));
    padding: 0 18px;
    border: 1px solid rgba(184, 137, 53, 0.46);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--bb-ink, #111111);
    font-size: 15px;
    font-weight: 850;
    box-shadow: 0 14px 38px rgba(17, 17, 17, 0.14);
    backdrop-filter: blur(10px);
}

.kiosk-policy-button.policy-position-bottom-right {
    top: auto;
    right: clamp(14px, 2vw, 28px);
    bottom: clamp(14px, 2vw, 24px);
    left: auto;
}

.kiosk-policy-button.policy-position-bottom-left {
    top: auto;
    right: auto;
    bottom: clamp(14px, 2vw, 24px);
    left: clamp(14px, 2vw, 28px);
}

.kiosk-policy-button.policy-position-top-right {
    top: clamp(14px, 2vw, 28px);
    right: clamp(14px, 2vw, 28px);
    bottom: auto;
    left: auto;
}

.kiosk-policy-button.policy-position-top-left {
    top: clamp(92px, 8vw, 118px);
    right: auto;
    bottom: auto;
    left: clamp(14px, 2vw, 28px);
}

.kiosk-policy-button:hover,
.kiosk-policy-button:focus-visible {
    border-color: var(--bb-ink, #111111);
    outline: none;
}

.idle-carousel {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: block;
    padding: 0;
    overflow: hidden;
    background: #111111;
    cursor: pointer;
}

.idle-carousel[hidden] {
    display: none;
}

.idle-slide {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 0;
    overflow: hidden;
    opacity: 0;
    transform: scale(1.015);
    transition: opacity 520ms ease, transform 620ms ease;
}

.idle-slide.is-active {
    opacity: 1;
    transform: scale(1);
}

.idle-slide-image {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    object-position: center center;
    filter: none;
}

.idle-slide-copy {
    position: absolute;
    left: 50%;
    bottom: clamp(36px, 7vh, 86px);
    width: min(880px, calc(100vw - 56px));
    transform: translateX(-50%);
    text-align: center;
    color: #ffffff;
    text-shadow: 0 2px 22px rgba(0, 0, 0, 0.58);
}

.idle-slide-copy h2,
.idle-slide-copy p {
    margin: 0;
}

.idle-slide-copy h2 {
    color: #ffffff;
    font-size: clamp(34px, 5vw, 74px);
    line-height: 1;
    font-weight: 900;
}

.idle-slide-copy p {
    margin-top: 14px;
    color: #ffffff;
    font-size: clamp(18px, 2vw, 28px);
    font-weight: 850;
}

.brand-name,
.brand-subtitle {
    margin: 0;
}

.brand-name {
    font-size: 20px;
    font-weight: 800;
    display: none;
}

.brand-subtitle {
    color: var(--bb-muted, #6f665f);
    font-size: 13px;
    text-transform: uppercase;
    display: none;
}

.kiosk-app {
    display: grid;
    height: 100vh;
    height: 100svh;
    min-height: 100vh;
    min-height: 100svh;
    place-items: center;
    padding: 94px 28px 22px;
}

.step {
    width: min(980px, 100%);
    max-height: calc(100svh - 116px);
    animation: stepFade 220ms ease-out;
}

.step[hidden] {
    display: none;
}

@keyframes stepFade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.center-stack,
.form-shell,
.scratch-layout {
    display: grid;
    gap: 24px;
    width: 100%;
}

.center-stack {
    justify-items: center;
    text-align: center;
}

.narrow {
    max-width: 760px;
    margin: 0 auto;
}

.eyebrow {
    margin: 0;
    color: var(--bb-gold-dark, #8b6324);
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
}

.headline {
    max-width: 980px;
    margin: 0;
    font-size: 56px;
    line-height: 1.05;
    font-weight: 850;
}

.section-title {
    margin: 0;
    font-size: 40px;
    line-height: 1.12;
    font-weight: 830;
}

.thank-you-title {
    max-width: 900px;
    font-size: 52px;
    line-height: 1.08;
}

.lead {
    max-width: 760px;
    margin: 0;
    color: var(--bb-muted, #6f665f);
    font-size: 25px;
    line-height: 1.35;
}

.soft-note {
    margin: -8px 0 0;
    color: var(--bb-muted, #6f665f);
    font-size: 16px;
}

.rating-reward-note {
    margin: -8px 0 0;
    color: var(--bb-gold-dark, #8b6324);
    font-size: 20px;
    line-height: 1.3;
    font-weight: 760;
}

.rating-confirmation {
    gap: 18px;
}

.rating-confirm-stars {
    margin: -4px 0 0;
    color: var(--bb-gold, #b88935);
    font-size: 74px;
    line-height: 1;
    text-shadow: 0 14px 34px rgba(184, 137, 53, 0.18);
}

.rating-confirm-label {
    color: var(--bb-ink, #111111);
    font-size: 32px;
    font-weight: 850;
}

.review-qr-card {
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 18px;
    border: 1px solid rgba(184, 137, 53, 0.24);
    border-radius: 8px;
    background: var(--bb-surface, #ffffff);
    box-shadow: 0 18px 48px rgba(17, 17, 17, 0.06);
}

.review-qr-image {
    display: block;
    width: 210px;
    height: 210px;
    border-radius: 8px;
}

.review-qr-text {
    max-width: 460px;
    margin: 0;
    color: var(--bb-muted, #6f665f);
    font-size: 16px;
    line-height: 1.35;
}

.star-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
}

.star-button {
    display: grid;
    width: 112px;
    height: 112px;
    place-items: center;
    border: 2px solid var(--bb-nude, #ead8cc);
    border-radius: 8px;
    color: var(--bb-nude-dark, #c4a999);
    background: var(--bb-surface, #ffffff);
    box-shadow: 0 18px 44px rgba(17, 17, 17, 0.08);
    font-size: 72px;
    line-height: 1;
    transition: transform 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
    touch-action: manipulation;
}

.star-button:hover,
.star-button:focus-visible,
.star-button.is-selected {
    border-color: var(--bb-gold, #b88935);
    color: var(--bb-gold, #b88935);
    box-shadow: 0 22px 56px rgba(184, 137, 53, 0.2);
    transform: translateY(-3px);
    outline: none;
}

.form-shell {
    max-width: 820px;
    margin: 0 auto;
    padding: 28px 30px;
    border: 1px solid rgba(184, 137, 53, 0.22);
    border-radius: 8px;
    background: var(--bb-surface, #ffffff);
    box-shadow: 0 24px 80px rgba(17, 17, 17, 0.08);
}

body.has-onscreen-keyboard .step[data-step="feedback"].is-active,
body.has-onscreen-keyboard .step[data-step="details"].is-active {
    width: min(1460px, 100%);
}

body.has-onscreen-keyboard .step[data-step="feedback"].is-active .form-shell,
body.has-onscreen-keyboard .step[data-step="details"].is-active .form-shell {
    max-width: min(680px, calc(50vw - 56px));
    margin: 0 auto 0 0;
}

.form-heading {
    display: grid;
    gap: 8px;
}

.center-text {
    justify-items: center;
    text-align: center;
}

.policy-shell {
    width: min(980px, calc(100vw - 48px));
    max-height: calc(100svh - 120px);
    display: grid;
    gap: 18px;
    padding: clamp(24px, 3vw, 42px);
    border: 1px solid rgba(184, 137, 53, 0.24);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 22px 70px rgba(17, 17, 17, 0.08);
}

.policy-content {
    max-height: min(54svh, 520px);
    overflow-y: auto;
    padding: 18px 20px;
    border: 1px solid rgba(184, 137, 53, 0.18);
    border-radius: 8px;
    background: #fffdfb;
    color: var(--bb-ink, #111111);
    font-size: clamp(18px, 1.5vw, 22px);
    line-height: 1.65;
    text-align: left;
}

.policy-content br {
    display: block;
    content: "";
    margin-top: 0.55em;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.field-block {
    display: grid;
    gap: 8px;
}

.new-customer-fields {
    display: grid;
    gap: 16px;
}

.new-customer-fields[hidden] {
    display: none;
}

.known-customer-panel {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid rgba(35, 107, 78, 0.24);
    border-radius: 8px;
    background: #eef8f3;
}

.known-customer-panel[hidden] {
    display: none;
}

.customer-status-label,
.known-customer-name,
.known-customer-email {
    margin: 0;
}

.customer-status-label {
    color: var(--bb-success, #236b4e);
    font-size: 14px;
    font-weight: 850;
    text-transform: uppercase;
}

.known-customer-name {
    color: var(--bb-ink, #111111);
    font-size: 24px;
    line-height: 1.2;
    font-weight: 900;
}

.known-customer-email {
    color: var(--bb-muted, #6f665f);
    font-size: 16px;
    line-height: 1.3;
}

.optional-email-panel {
    display: grid;
    gap: 14px;
}

.optional-email-panel[hidden] {
    display: none;
}

.email-prompt-note {
    margin: 0;
    color: var(--bb-gold-dark, #8b6324);
    font-size: 16px;
    line-height: 1.4;
    font-weight: 700;
}

.review-share-panel {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(184, 137, 53, 0.24);
    border-radius: 8px;
    background: #fffdfb;
}

.compact-review-qr {
    width: 104px;
    height: 104px;
}

.review-share-copy {
    display: grid;
    justify-items: start;
    gap: 10px;
}

.inline-message {
    min-height: 0;
    margin: 0;
}

.success-message {
    color: var(--bb-success, #236b4e);
}

.field-label,
.chip-fieldset legend {
    color: var(--bb-ink, #111111);
    font-size: 16px;
    font-weight: 780;
}

.field-hint {
    margin: 0;
    color: var(--bb-muted, #6f665f);
    font-size: 13px;
    line-height: 1.35;
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="file"],
textarea,
select {
    width: 100%;
    min-height: 56px;
    border: 1px solid var(--bb-nude-dark, #c4a999);
    border-radius: 8px;
    color: var(--bb-ink, #111111);
    background: #fffdfb;
    font-size: 20px;
    outline: none;
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="file"],
select {
    padding: 0 18px;
}

input[type="file"] {
    display: flex;
    align-items: center;
    padding-top: 15px;
    font-size: 17px;
}

textarea {
    min-height: 126px;
    padding: 14px 16px;
    resize: none;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--bb-gold, #b88935);
    box-shadow: 0 0 0 4px rgba(184, 137, 53, 0.16);
}

.chip-fieldset {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    border: 0;
}

.chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.choice-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice-chip span {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 1px solid var(--bb-nude-dark, #c4a999);
    border-radius: 8px;
    background: #fffdfb;
    color: var(--bb-ink, #111111);
    font-size: 16px;
    font-weight: 760;
}

.choice-chip input:checked + span {
    border-color: var(--bb-gold, #b88935);
    color: #ffffff;
    background: var(--bb-gold, #b88935);
}

.choice-chip input:focus-visible + span {
    box-shadow: 0 0 0 4px rgba(184, 137, 53, 0.18);
}

.consent-row {
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 12px;
    align-items: start;
    color: var(--bb-muted, #6f665f);
    font-size: 16px;
    line-height: 1.4;
}

.consent-row input {
    width: 26px;
    height: 26px;
    margin: 3px 0 0;
    accent-color: var(--bb-gold, #b88935);
}

.keyboard-toggle {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 35;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 0 16px;
    border: 1px solid rgba(184, 137, 53, 0.28);
    border-radius: 8px;
    color: var(--bb-ink, #111111);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 46px rgba(17, 17, 17, 0.12);
    font-size: 17px;
    font-weight: 820;
    backdrop-filter: blur(10px);
}

.keyboard-toggle[hidden] {
    display: none !important;
}

.keyboard-toggle.is-active {
    color: #ffffff;
    background: var(--bb-ink, #111111);
}

.keyboard-toggle-icon {
    font-size: 24px;
    line-height: 1;
}

.onscreen-keyboard {
    position: fixed;
    top: 50%;
    left: calc(50vw + clamp(14px, 1.8vw, 26px));
    right: auto;
    z-index: 34;
    width: min(720px, calc(50vw - 42px));
    max-height: calc(100svh - 124px);
    transform: translateY(-50%);
}

.onscreen-keyboard[hidden] {
    display: none !important;
}

.onscreen-keyboard-shell {
    padding: 14px 14px 12px;
    border: 1px solid rgba(184, 137, 53, 0.24);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 24px 70px rgba(17, 17, 17, 0.16);
    backdrop-filter: blur(12px);
    overflow-x: hidden;
    overflow-y: auto;
    max-height: calc(100svh - 124px);
}

.onscreen-keyboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.onscreen-keyboard-copy {
    display: grid;
    gap: 4px;
}

.keyboard-mode-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border: 1px solid rgba(184, 137, 53, 0.2);
    border-radius: 8px;
    background: #fffaf6;
}

.keyboard-mode-switch[hidden] {
    display: none !important;
}

.keyboard-mode-button {
    min-width: 48px;
    min-height: 36px;
    padding: 0 8px;
    border: 0;
    border-radius: 6px;
    color: var(--bb-muted, #6f665f);
    background: transparent;
    font-size: 15px;
    font-weight: 820;
}

.keyboard-mode-button[hidden] {
    display: none !important;
}

.keyboard-mode-button.is-active {
    color: #ffffff;
    background: var(--bb-ink, #111111);
}

.onscreen-keyboard-title,
.onscreen-keyboard-subtitle {
    margin: 0;
}

.onscreen-keyboard-title {
    font-size: 18px;
    font-weight: 850;
}

.onscreen-keyboard-subtitle {
    color: var(--bb-muted, #6f665f);
    font-size: 14px;
    font-weight: 700;
}

.keyboard-minimize-button {
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--bb-nude-dark, #c4a999);
    border-radius: 8px;
    color: var(--bb-ink, #111111);
    background: #fffdfb;
    font-size: 14px;
    font-weight: 780;
}

.onscreen-keyboard-grid {
    display: grid;
    gap: 8px;
}

.keyboard-row {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(var(--keyboard-columns, 10), minmax(0, 1fr));
}

.keyboard-key {
    min-height: 44px;
    padding: 0 6px;
    border: 1px solid var(--bb-nude-dark, #c4a999);
    border-radius: 8px;
    color: var(--bb-ink, #111111);
    background: #fffdfb;
    font-size: 21px;
    font-weight: 820;
    touch-action: manipulation;
    user-select: none;
}

.keyboard-key.is-action {
    font-size: 14px;
}

.keyboard-key:hover,
.keyboard-key:focus-visible {
    border-color: var(--bb-gold, #b88935);
    box-shadow: 0 0 0 4px rgba(184, 137, 53, 0.14);
    outline: none;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 14px;
}

.primary-button,
.secondary-button,
.danger-button {
    display: inline-flex;
    min-height: 56px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 0 22px;
    font-size: 18px;
    font-weight: 820;
    text-decoration: none;
    touch-action: manipulation;
}

.primary-button {
    border: 1px solid var(--bb-ink, #111111);
    color: #ffffff;
    background: var(--bb-ink, #111111);
}

.primary-button:hover,
.primary-button:focus-visible {
    border-color: var(--bb-gold-dark, #8b6324);
    background: var(--bb-gold-dark, #8b6324);
    outline: none;
}

.secondary-button {
    border: 1px solid var(--bb-nude-dark, #c4a999);
    color: var(--bb-ink, #111111);
    background: var(--bb-surface, #ffffff);
}

.secondary-button:hover,
.secondary-button:focus-visible {
    border-color: var(--bb-gold, #b88935);
    color: var(--bb-gold-dark, #8b6324);
    outline: none;
}

.danger-button {
    border: 1px solid var(--bb-danger, #9d2f2f);
    color: #ffffff;
    background: var(--bb-danger, #9d2f2f);
}

.danger-button:hover,
.danger-button:focus-visible {
    border-color: #7f2525;
    background: #7f2525;
    outline: none;
}

.large-button {
    min-width: 300px;
    min-height: 64px;
    font-size: 20px;
}

.form-message {
    min-height: 28px;
    margin: -6px 0 0;
    color: var(--bb-danger, #9d2f2f);
    font-size: 16px;
    font-weight: 750;
}

.participation-note {
    margin: -4px 0 0;
    color: var(--bb-ink, #111111);
    font-size: 14px;
    line-height: 1.45;
    font-weight: 820;
    text-align: center;
}

.step[data-step="feedback"] .participation-note {
    display: none;
}

.step[data-step="details"] .participation-note {
    display: block;
    max-width: 760px;
    margin: 2px auto 0;
}

.step[data-step="scratch"] {
    width: min(920px, 100%);
    align-self: start;
    max-height: calc(100svh - 96px);
}

.step[data-step="scratch"].has-revealed-coupon {
    width: min(1240px, calc(100vw - 56px));
    max-height: calc(100svh - 82px);
}

.scratch-layout {
    justify-items: center;
    justify-content: start;
    align-content: start;
    gap: 6px;
    max-width: 820px;
    margin: 0 auto;
    padding-top: 0;
    margin-top: -56px;
}

.scratch-layout .form-heading {
    gap: 4px;
}

.scratch-layout .section-title,
.scratch-layout .eyebrow,
.scratch-layout .scratch-customer {
    text-align: center;
}

.step[data-step="scratch"] .eyebrow {
    display: none;
}

.scratch-card {
    position: relative;
    width: min(760px, 94vw);
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid rgba(184, 137, 53, 0.52);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(251, 244, 231, 0.96) 26%, rgba(244, 232, 209, 0.98) 100%);
    box-shadow:
        0 24px 72px rgba(17, 17, 17, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.82),
        inset 0 0 0 1px rgba(255, 255, 255, 0.34);
    --scratch-light-x: 50%;
    --scratch-light-y: 50%;
    --scratch-light-opacity: 0;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.scratch-card::before,
.scratch-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.scratch-card::before {
    z-index: 1;
    background:
        linear-gradient(118deg, transparent 20%, rgba(255, 255, 255, 0.26) 34%, rgba(255, 255, 255, 0.06) 45%, transparent 56%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 34%, rgba(139, 99, 36, 0.05) 100%);
    transform: translateX(-34%);
    opacity: 0.54;
    animation: scratch-shimmer 5.2s linear infinite;
}

.scratch-card::after {
    z-index: 4;
    background:
        radial-gradient(circle at var(--scratch-light-x) var(--scratch-light-y), rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.12) 20%, transparent 40%);
    opacity: var(--scratch-light-opacity);
    transition: opacity 140ms ease;
}

.scratch-card.is-scratching {
    transform: translateY(-1px) scale(1.003);
    border-color: rgba(184, 137, 53, 0.56);
    box-shadow:
        0 28px 86px rgba(17, 17, 17, 0.14),
        0 0 0 1px rgba(216, 183, 119, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.prize-reveal {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    gap: 12px;
    padding: 28px;
    text-align: center;
    z-index: 0;
}

.prize-label,
.coupon-label {
    margin: 0;
    color: var(--bb-gold-dark, #8b6324);
    font-size: 18px;
    font-weight: 850;
    text-transform: uppercase;
}

.scratch-customer,
.coupon-customer {
    margin: 0;
    color: var(--bb-muted, #6f665f);
    font-size: 18px;
    line-height: 1.3;
    font-weight: 760;
}

.coupon-customer {
    display: none;
}

.prize-title {
    max-width: 620px;
    margin: 0;
    color: var(--bb-ink, #111111);
    font-size: 34px;
    line-height: 1.12;
    font-weight: 850;
    text-wrap: balance;
}

#scratchCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    touch-action: none;
    z-index: 3;
}

.scratch-card.is-revealed #scratchCanvas {
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease-out;
}

.scratch-card.is-revealed::before,
.scratch-card.is-revealed::after {
    opacity: 0;
    animation: none;
}

.scratch-feedback-panel {
    display: none;
}

.scratch-card.is-revealed + .scratch-feedback-panel {
    display: none;
}

.scratch-progress {
    display: grid;
    gap: 8px;
    width: min(420px, 76vw);
}

.scratch-progress-track {
    position: relative;
    height: 12px;
    overflow: hidden;
    border: 1px solid rgba(184, 137, 53, 0.32);
    border-radius: 999px;
    background: rgba(184, 137, 53, 0.12);
    box-shadow: inset 0 1px 2px rgba(17, 17, 17, 0.08);
}

.scratch-progress-fill {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, #b88935 0%, #f1d8a6 50%, #b88935 100%);
    box-shadow: 0 0 16px rgba(184, 137, 53, 0.34);
    transition: width 140ms ease;
}

.scratch-progress-text,
.scratch-hint {
    margin: 0;
    text-align: center;
}

.scratch-progress-text {
    display: none;
}

.scratch-hint {
    color: var(--bb-muted, #6f665f);
    font-size: 17px;
    line-height: 1.35;
    font-weight: 720;
    transition: opacity 180ms ease;
}

.scratch-feedback-panel.is-complete .scratch-hint {
    opacity: 0.75;
}

@keyframes scratch-shimmer {
    0% {
        transform: translateX(-42%);
    }

    100% {
        transform: translateX(42%);
    }
}

.coupon-result {
    display: grid;
    justify-items: center;
    gap: 10px;
    width: min(760px, 94vw);
    margin: 0 auto;
    text-align: center;
}

.coupon-result[hidden] {
    display: none;
}

.coupon-instructions {
    max-width: 720px;
    margin: 0;
    color: var(--bb-ink, #111111);
    font-size: 20px;
    line-height: 1.35;
    font-weight: 830;
}

.coupon-instructions.muted {
    color: var(--bb-muted, #6f665f);
    font-size: 17px;
    font-weight: 720;
}

.coupon-code {
    margin: 0;
    padding: 14px 20px;
    border: 1px solid var(--bb-gold, #b88935);
    border-radius: 8px;
    background: var(--bb-surface, #ffffff);
    color: var(--bb-ink, #111111);
    font-size: 36px;
    line-height: 1;
    font-weight: 900;
}

.coupon-expiry {
    margin: -2px 0 0;
    color: var(--bb-gold-dark, #8b6324);
    font-size: 17px;
    line-height: 1.25;
    font-weight: 850;
}

.coupon-expiry[hidden] {
    display: none;
}

.coupon-fresha {
    display: grid;
    gap: 3px;
    max-width: 560px;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid rgba(184, 137, 53, 0.25);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--bb-ink, #111111);
    font-size: 15px;
    line-height: 1.25;
    font-weight: 760;
}

.coupon-fresha[hidden] {
    display: none;
}

.coupon-fresha p {
    margin: 0;
}

.coupon-barcode-wrap {
    display: grid;
    place-items: center;
    width: min(440px, 100%);
    padding: 10px 12px;
    border: 1px solid rgba(184, 137, 53, 0.2);
    border-radius: 8px;
    background: #ffffff;
}

.coupon-barcode-wrap[hidden] {
    display: none;
}

.coupon-barcode-image {
    display: block;
    width: 100%;
    max-width: 420px;
    height: auto;
}

.coupon-email-panel {
    display: grid;
    gap: 6px;
    width: min(680px, 100%);
    margin: 2px auto 0;
    padding: 8px 10px;
    border: 1px solid rgba(184, 137, 53, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
}

.coupon-email-panel[hidden] {
    display: none;
}

.coupon-email-note {
    margin: 0;
    color: var(--bb-muted, #6f665f);
    font-size: 15px;
    line-height: 1.3;
    font-weight: 720;
}

.coupon-email-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    align-items: center;
}

.coupon-email-action-row {
    grid-template-columns: minmax(150px, 1.15fr) repeat(3, minmax(112px, 1fr));
}

.coupon-email-row input {
    grid-column: 1 / -1;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid var(--bb-nude-dark, #c9aa98);
    border-radius: 8px;
    background: #ffffff;
    color: var(--bb-ink, #111111);
    font: inherit;
    font-size: 18px;
}

.coupon-email-action-row input {
    grid-column: auto;
    min-width: 0;
}

.coupon-email-row button {
    width: 100%;
    min-height: 44px;
    padding: 8px 10px;
    font-size: 15px;
    line-height: 1.1;
    white-space: nowrap;
}

.coupon-email-action-row button {
    min-width: 0;
}

.coupon-email-panel .form-message {
    min-height: 0;
    margin: 0;
    font-size: 13px;
    line-height: 1.2;
}

.coupon-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.coupon-print-area {
    display: none;
    width: 80mm;
    background: #ffffff;
}

.print-coupon {
    display: grid;
    gap: 2mm;
    width: 80mm;
    max-height: 150mm;
    padding: 3.5mm 4mm 4mm;
    border: 0.35mm solid #111111;
    color: #111111;
    background: #ffffff;
    text-align: center;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    page-break-inside: avoid;
    break-inside: avoid;
}

.print-logo {
    display: block;
    max-width: 38mm;
    max-height: 14mm;
    object-fit: contain;
    margin: 0 auto 1mm;
    image-rendering: crisp-edges;
}

.print-shop,
.print-code,
.print-prize,
.print-intro,
.print-instruction,
.print-validity,
.print-name,
.print-phone {
    margin: 0;
}

.print-shop {
    font-size: 17px;
    font-weight: 900;
    text-transform: uppercase;
}

.print-intro {
    font-size: 14px;
    font-weight: 850;
    line-height: 1.25;
}

.print-instruction,
.print-validity,
.print-fresha,
.print-name,
.print-phone {
    font-size: 11px;
    line-height: 1.3;
}

.print-validity {
    font-weight: 850;
}

.print-fresha {
    display: grid;
    gap: 0.7mm;
    padding: 1.2mm;
    border: 0.25mm solid #111111;
    font-size: 9.5px;
}

.print-fresha[hidden] {
    display: none;
}

.print-fresha p {
    margin: 0;
}

.print-prize {
    padding: 2mm 0 1mm;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.15;
}

.print-code {
    padding: 2.4mm;
    border: 0.35mm solid #111111;
    font-size: 19px;
    font-weight: 950;
    letter-spacing: 0;
}

.print-barcode-wrap {
    display: grid;
    justify-items: center;
    padding-top: 1mm;
}

.print-barcode-wrap[hidden] {
    display: none;
}

.print-barcode {
    display: block;
    width: 100%;
    max-width: 60mm;
    height: auto;
}

@media (max-height: 820px) and (min-width: 901px) {
    .brand-bar {
        top: 12px;
        left: 16px;
    }

    .brand-logo {
        width: 88px;
        max-height: 64px;
    }

    .kiosk-app {
        padding-top: 78px;
        padding-bottom: 16px;
    }

    .step {
        max-height: calc(100svh - 94px);
    }

    .center-stack,
    .form-shell,
    .scratch-layout {
        gap: 18px;
    }

    .headline {
        font-size: 48px;
    }

    .section-title {
        font-size: 34px;
    }

    .form-shell {
        padding: 22px 24px;
    }

    .field-grid,
    .new-customer-fields,
    .optional-email-panel {
        gap: 12px;
    }

    .review-share-panel {
        grid-template-columns: 96px minmax(0, 1fr);
        padding: 12px;
    }

    .compact-review-qr {
        width: 96px;
        height: 96px;
    }

    input[type="text"],
    input[type="tel"],
    input[type="email"],
    input[type="file"],
    textarea,
    select {
        min-height: 52px;
        font-size: 18px;
    }

    textarea {
        min-height: 108px;
    }

    .primary-button,
    .secondary-button,
    .danger-button {
        min-height: 50px;
        font-size: 17px;
    }

    .onscreen-keyboard {
        width: min(650px, calc(50vw - 36px));
        max-height: calc(100svh - 96px);
    }

    .onscreen-keyboard-shell {
        max-height: calc(100svh - 96px);
    }

    .keyboard-key {
        min-height: 40px;
        font-size: 19px;
    }

    .coupon-code {
        font-size: 32px;
    }

    .scratch-card {
        width: min(620px, 70vw);
    }
}

body.scratch-coupon-visible .kiosk-policy-button {
    display: none;
}

@media (min-width: 980px) {
    .scratch-layout.has-revealed-coupon {
        grid-template-columns: minmax(420px, 620px) minmax(260px, 320px);
        grid-template-areas:
            "heading heading"
            "card result";
        align-items: start;
        justify-content: center;
        gap: 6px 18px;
        width: 100%;
        max-width: none;
        margin-top: -70px;
    }

    .scratch-layout.has-revealed-coupon .form-heading {
        grid-area: heading;
        gap: 2px;
    }

    .scratch-layout.has-revealed-coupon .scratch-card {
        grid-area: card;
        width: min(620px, 49vw);
    }

    .scratch-layout.has-revealed-coupon .coupon-result {
        grid-area: result;
        align-self: start;
        align-content: start;
        justify-items: stretch;
        gap: 6px;
        width: 100%;
        margin: 0;
        padding: 8px;
        border: 1px solid rgba(184, 137, 53, 0.22);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.72);
        text-align: left;
        box-shadow: 0 18px 44px rgba(17, 17, 17, 0.07);
    }

    .scratch-layout.has-revealed-coupon .coupon-instructions {
        max-width: none;
        font-size: 15px;
        line-height: 1.22;
        text-align: center;
    }

    .scratch-layout.has-revealed-coupon .coupon-instructions.muted {
        display: none;
    }

    .scratch-layout.has-revealed-coupon .coupon-label {
        font-size: 13px;
        text-align: center;
    }

    .scratch-layout.has-revealed-coupon .coupon-code {
        width: 100%;
        padding: 8px 10px;
        font-size: 24px;
        text-align: center;
        overflow-wrap: anywhere;
    }

    .scratch-layout.has-revealed-coupon .coupon-expiry {
        font-size: 14px;
        text-align: center;
    }

    .scratch-layout.has-revealed-coupon .coupon-barcode-wrap {
        width: 100%;
        padding: 7px 8px;
    }

    .scratch-layout.has-revealed-coupon .coupon-barcode-image {
        max-width: 260px;
    }

    .scratch-layout.has-revealed-coupon .coupon-email-panel {
        width: 100%;
        padding: 6px;
    }

    .scratch-layout.has-revealed-coupon .coupon-email-note {
        font-size: 13px;
    }

    .scratch-layout.has-revealed-coupon .coupon-email-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .scratch-layout.has-revealed-coupon .coupon-email-action-row {
        grid-template-columns: minmax(0, 1.05fr) repeat(3, minmax(0, 0.9fr));
    }

    .scratch-layout.has-revealed-coupon .coupon-email-row input {
        grid-column: 1 / -1;
        min-height: 38px;
        padding: 7px 9px;
        font-size: 14px;
    }

    .scratch-layout.has-revealed-coupon .coupon-email-action-row input {
        grid-column: auto;
        min-width: 0;
    }

    .scratch-layout.has-revealed-coupon .coupon-email-row button {
        min-height: 38px;
        padding: 7px 8px;
        font-size: 12px;
    }

    .scratch-layout.has-revealed-coupon .coupon-actions {
        display: grid;
        grid-template-columns: 1fr;
        position: fixed;
        top: clamp(230px, 56svh, 560px);
        right: clamp(18px, 2.2vw, 34px);
        z-index: 130;
        width: clamp(220px, 18vw, 260px);
        gap: 8px;
        padding: 8px;
        border: 1px solid rgba(184, 137, 53, 0.26);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.94);
        box-shadow: 0 18px 48px rgba(17, 17, 17, 0.16);
        transform: translateY(-50%);
    }

    .scratch-layout.has-revealed-coupon .coupon-actions .primary-button,
    .scratch-layout.has-revealed-coupon .coupon-actions .secondary-button {
        width: 100%;
        min-height: 46px;
        padding: 9px 12px;
        font-size: 15px;
    }
}

@media (min-width: 980px) and (max-height: 820px) {
    .scratch-layout.has-revealed-coupon {
        grid-template-columns: minmax(430px, 560px) minmax(280px, 330px);
        gap: 6px 18px;
        margin-top: -56px;
    }

    .scratch-layout.has-revealed-coupon .section-title {
        font-size: clamp(30px, 4.2vh, 38px);
    }

    .scratch-layout.has-revealed-coupon .scratch-customer {
        font-size: 15px;
    }

    .scratch-layout.has-revealed-coupon .scratch-card {
        width: min(560px, 52vw);
    }

    .scratch-layout.has-revealed-coupon .prize-reveal {
        gap: 6px;
        padding: 18px;
    }

    .scratch-layout.has-revealed-coupon .prize-title {
        font-size: clamp(24px, 4vh, 30px);
    }

    .scratch-layout.has-revealed-coupon .coupon-result {
        gap: 6px;
        padding: 8px;
    }

    .scratch-layout.has-revealed-coupon .coupon-code {
        font-size: 22px;
    }

    .scratch-layout.has-revealed-coupon .coupon-barcode-image {
        max-width: 240px;
    }

    .scratch-layout.has-revealed-coupon .coupon-actions {
        top: clamp(210px, 58svh, 480px);
        right: 18px;
        width: clamp(210px, 20vw, 250px);
    }
}

@media (max-width: 979px) {
    .step[data-step="scratch"].has-revealed-coupon {
        width: min(760px, calc(100vw - 20px));
        max-height: none;
    }

    .scratch-layout.has-revealed-coupon {
        gap: 2px;
        width: 100%;
        max-width: 720px;
        margin-top: -96px;
        padding-bottom: 12px;
    }

    .scratch-layout.has-revealed-coupon .form-heading {
        gap: 0;
    }

    .scratch-layout.has-revealed-coupon .section-title {
        font-size: clamp(28px, 5.6vw, 36px);
        line-height: 1;
    }

    .scratch-layout.has-revealed-coupon .scratch-customer {
        font-size: 14px;
        line-height: 1.15;
    }

    .scratch-layout.has-revealed-coupon .scratch-card {
        width: min(620px, 90vw);
        aspect-ratio: 16 / 6;
        max-height: 250px;
    }

    .scratch-layout.has-revealed-coupon .prize-reveal {
        gap: 4px;
        padding: 14px;
    }

    .scratch-layout.has-revealed-coupon .prize-label {
        font-size: 13px;
    }

    .scratch-layout.has-revealed-coupon .prize-title {
        font-size: clamp(24px, 5vw, 31px);
        line-height: 1.05;
    }

    .scratch-layout.has-revealed-coupon .coupon-result {
        gap: 3px;
        margin-top: 0;
        padding-bottom: 2px;
    }

    .scratch-layout.has-revealed-coupon .coupon-customer {
        display: none;
    }

    .scratch-layout.has-revealed-coupon .coupon-instructions {
        max-width: 560px;
        font-size: 14px;
        line-height: 1.18;
    }

    .scratch-layout.has-revealed-coupon .coupon-instructions.muted {
        display: none;
    }

    .scratch-layout.has-revealed-coupon .coupon-label {
        font-size: 12px;
        line-height: 1.1;
    }

    .scratch-layout.has-revealed-coupon .coupon-code {
        padding: 6px 12px;
        font-size: clamp(23px, 5.8vw, 31px);
        line-height: 1.04;
    }

    .scratch-layout.has-revealed-coupon .coupon-expiry {
        font-size: 12px;
        line-height: 1.15;
    }

    .scratch-layout.has-revealed-coupon .coupon-barcode-wrap {
        width: min(420px, 82vw);
        padding: 5px 8px;
    }

    .scratch-layout.has-revealed-coupon .coupon-barcode-image {
        max-width: min(340px, 76vw);
        max-height: 82px;
        object-fit: contain;
    }

    .scratch-layout.has-revealed-coupon .coupon-email-panel {
        width: min(660px, 94vw);
        gap: 4px;
        padding: 6px;
    }

    .scratch-layout.has-revealed-coupon .coupon-email-note {
        font-size: 12px;
        line-height: 1.2;
    }

    .scratch-layout.has-revealed-coupon .coupon-email-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 5px;
    }

    .scratch-layout.has-revealed-coupon .coupon-email-action-row {
        grid-template-columns: minmax(120px, 1fr) repeat(3, minmax(94px, 0.95fr));
        gap: 5px;
    }

    .scratch-layout.has-revealed-coupon .coupon-email-row input {
        grid-column: 1 / -1;
        min-height: 34px;
        padding: 6px 8px;
        font-size: 13px;
    }

    .scratch-layout.has-revealed-coupon .coupon-email-action-row input {
        grid-column: auto;
        min-width: 0;
        min-height: 32px;
        padding: 5px 7px;
        font-size: 12px;
    }

    .scratch-layout.has-revealed-coupon .coupon-email-row button {
        min-height: 36px;
        padding: 6px 7px;
        font-size: 12px;
    }

    .scratch-layout.has-revealed-coupon .coupon-email-action-row button {
        min-height: 34px;
        padding: 5px 6px;
        font-size: 11px;
        white-space: normal;
    }

    .scratch-layout.has-revealed-coupon .coupon-actions {
        position: fixed;
        left: 50%;
        bottom: max(10px, env(safe-area-inset-bottom));
        z-index: 160;
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: min(520px, calc(100vw - 28px));
        gap: 8px;
        padding: 7px;
        border: 1px solid rgba(184, 137, 53, 0.26);
        border-radius: 8px;
        background: rgba(255, 253, 251, 0.98);
        box-shadow: 0 16px 44px rgba(17, 17, 17, 0.18);
        transform: translateX(-50%);
    }

    .scratch-layout.has-revealed-coupon .coupon-actions .primary-button,
    .scratch-layout.has-revealed-coupon .coupon-actions .secondary-button {
        width: 100%;
        min-height: 42px;
        padding: 8px 10px;
        font-size: 14px;
    }
}

@media (max-width: 979px) and (max-height: 860px) {
    .scratch-layout.has-revealed-coupon {
        margin-top: -144px;
        padding-bottom: 8px;
    }

    .scratch-layout.has-revealed-coupon .scratch-card {
        width: min(610px, 88vw);
        aspect-ratio: 16 / 5.2;
        max-height: 210px;
    }

    .scratch-layout.has-revealed-coupon .coupon-instructions {
        font-size: 13px;
    }

    .scratch-layout.has-revealed-coupon .coupon-code {
        font-size: clamp(22px, 5.4vw, 28px);
    }

    .scratch-layout.has-revealed-coupon .coupon-email-panel {
        padding: 6px;
    }

    .scratch-layout.has-revealed-coupon .coupon-actions {
        bottom: max(8px, env(safe-area-inset-bottom));
    }
}

@media (max-width: 620px) {
    .coupon-email-action-row,
    .scratch-layout.has-revealed-coupon .coupon-email-action-row {
        grid-template-columns: 1fr 1fr;
    }

    .coupon-email-action-row input,
    .scratch-layout.has-revealed-coupon .coupon-email-action-row input {
        grid-column: 1 / -1;
    }
}

.admin-body {
    min-height: 100vh;
    background: #f7f2ed;
}

.admin-shell {
    width: min(1680px, calc(100% - 24px));
    margin: 0 auto;
    padding: 34px 0 56px;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.admin-topbar-logo {
    display: inline-grid;
    place-items: center;
    width: 112px;
    min-width: 112px;
    height: 74px;
}

.admin-topbar-logo img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.admin-title {
    margin: 0;
    font-size: 34px;
    line-height: 1.1;
}

.small-title {
    font-size: 26px;
}

.admin-subtitle {
    margin: 8px 0 0;
    color: var(--bb-muted, #6f665f);
}

.admin-card {
    margin-bottom: 20px;
    padding: 22px;
    border: 1px solid rgba(184, 137, 53, 0.2);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 16px 48px rgba(17, 17, 17, 0.06);
}

.admin-card-heading,
.customer-import-form {
    display: grid;
    gap: 20px;
}

.settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: center;
}

.two-column-settings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.policy-settings-form .settings-grid {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
    align-items: end;
}

.policy-settings-form .two-column-settings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.policy-button-position-row {
    display: grid;
    grid-template-columns: minmax(320px, 420px) minmax(280px, 1fr);
    gap: 18px;
    align-items: start;
    margin: 18px 0;
}

.policy-position-preview {
    width: 100%;
}

.policy-position-preview-screen {
    position: relative;
    min-height: 190px;
    border: 1px solid rgba(184, 137, 53, 0.22);
    border-radius: 18px;
    background: linear-gradient(180deg, #fffdfb 0%, #f7efe6 100%);
    overflow: hidden;
    box-shadow: 0 16px 34px rgba(17, 17, 17, 0.06);
}

.policy-position-preview-label {
    padding: 14px 16px;
    color: var(--bb-muted, #6f665f);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.policy-position-preview-button {
    position: absolute;
    min-height: 42px;
    max-width: calc(100% - 32px);
    padding: 10px 16px;
    border: none;
    border-radius: 12px;
    background: #ffffff;
    color: var(--bb-ink, #111111);
    box-shadow: 0 10px 24px rgba(17, 17, 17, 0.12);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    pointer-events: none;
}

.policy-position-preview-button.is-bottom-right {
    right: 16px;
    bottom: 16px;
}

.policy-position-preview-button.is-bottom-left {
    left: 16px;
    bottom: 16px;
}

.policy-position-preview-button.is-top-right {
    right: 16px;
    top: 16px;
}

.policy-position-preview-button.is-top-left {
    left: 16px;
    top: 16px;
}

.policy-settings-textarea {
    min-height: 320px;
    resize: vertical;
}

.policy-format-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) repeat(2, minmax(120px, auto));
    gap: 14px;
    align-items: end;
    margin: 18px 0;
}

.policy-format-option {
    min-height: 52px;
    align-items: center;
    padding: 10px 0;
}

.settings-tab-nav {
    position: sticky;
    top: 0;
    z-index: 8;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
    padding: 12px;
    border: 1px solid rgba(184, 137, 53, 0.18);
    border-radius: 8px;
    background: rgba(255, 250, 246, 0.96);
    box-shadow: 0 12px 36px rgba(17, 17, 17, 0.05);
    backdrop-filter: blur(10px);
}

.settings-tab-button {
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid rgba(184, 137, 53, 0.42);
    border-radius: 8px;
    background: #ffffff;
    color: var(--bb-ink, #111111);
    font-size: 15px;
    font-weight: 850;
    cursor: pointer;
}

.settings-tab-button.is-active {
    border-color: var(--bb-ink, #111111);
    background: var(--bb-ink, #111111);
    color: #ffffff;
}

.settings-tab-panel {
    display: none;
}

.settings-tab-panel.is-active {
    display: block;
}

.qr-panel {
    display: grid;
    justify-items: center;
    gap: 14px;
}

.review-url-text {
    margin: 0;
    padding: 12px;
    border: 1px solid #ead8cc;
    border-radius: 8px;
    background: #fffdfb;
    color: var(--bb-ink, #111111);
    font-size: 15px;
    overflow-wrap: anywhere;
}

.prize-settings-table input,
.prize-settings-table select {
    min-height: 44px;
    font-size: 15px;
}

.prize-settings-table input[type="checkbox"] {
    width: 24px;
    height: 24px;
    accent-color: var(--bb-gold, #b88935);
}

.prize-code-cell {
    min-width: 260px;
}

.prize-code-field {
    display: grid;
    gap: 8px;
}

.prize-code-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.prize-code-input {
    min-width: 148px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0;
}

.prize-frequency-input {
    width: 112px;
}

.prize-barcode-preview {
    display: block;
    width: 100%;
    max-width: 220px;
    height: auto;
    padding: 5px;
    border: 1px solid rgba(184, 137, 53, 0.24);
    border-radius: 6px;
    background: #ffffff;
}

.prize-barcode-preview[hidden] {
    display: none;
}

.idle-settings-table input,
.idle-settings-table textarea {
    min-height: 44px;
    font-size: 15px;
}

.idle-settings-table textarea {
    width: 100%;
    min-width: 280px;
    resize: vertical;
}

.idle-settings-table input[type="checkbox"] {
    width: 24px;
    height: 24px;
    accent-color: var(--bb-gold, #b88935);
}

.idle-settings-preview {
    display: block;
    width: 160px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border: 1px solid rgba(184, 137, 53, 0.24);
    border-radius: 8px;
    background: #fffaf6;
}

.idle-settings-table [data-idle-sort-row] {
    cursor: grab;
    transition: background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.idle-settings-table [data-idle-sort-row].is-drag-over {
    background: rgba(184, 137, 53, 0.08);
    box-shadow: inset 0 0 0 2px rgba(184, 137, 53, 0.28);
}

.idle-settings-table [data-idle-sort-row].is-dragging {
    opacity: 0.52;
}

.idle-sort-order-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-right: 10px;
    border-radius: 999px;
    background: var(--bb-ink, #111111);
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
    vertical-align: top;
    box-shadow: 0 8px 20px rgba(17, 17, 17, 0.14);
}

.idle-sort-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    margin-bottom: 8px;
    padding: 0 14px;
    border: 1px solid rgba(17, 17, 17, 0.88);
    border-radius: 8px;
    background: var(--bb-ink, #111111);
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0;
    user-select: none;
    box-shadow: 0 10px 24px rgba(17, 17, 17, 0.12);
}

.idle-sort-help {
    max-width: 820px;
    color: var(--bb-ink, #111111);
    font-weight: 760;
}

.option-check {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    color: var(--bb-muted, #6f665f);
    font-size: 16px;
    line-height: 1.35;
}

.option-check input[type="checkbox"] {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    accent-color: var(--bb-gold, #b88935);
}

.settings-actions {
    margin-top: 20px;
}

.admin-help {
    margin: 0;
    color: var(--bb-muted, #6f665f);
    font-size: 16px;
    line-height: 1.45;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.stat-box {
    padding: 18px;
    border: 1px solid #ead8cc;
    border-radius: 8px;
    background: #fffdfb;
}

.stat-label {
    margin: 0 0 8px;
    color: var(--bb-muted, #6f665f);
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
}

.stat-value {
    margin: 0;
    font-size: 30px;
    font-weight: 900;
}

.filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    align-items: end;
}

.filter-form input,
.filter-form select {
    min-height: 48px;
    font-size: 16px;
}

.filter-form .field-label {
    font-size: 14px;
}

.table-wrap {
    overflow-x: visible;
}

.entries-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 0;
    table-layout: fixed;
}

.entries-table th,
.entries-table td {
    padding: 11px 10px;
    border-bottom: 1px solid #ead8cc;
    text-align: left;
    vertical-align: top;
    font-size: 13px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.entries-table th {
    color: var(--bb-muted, #6f665f);
    font-size: 12px;
    text-transform: uppercase;
}

.rating-pill,
.status-pill {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    border-radius: 999px;
    padding: 0 10px;
    font-weight: 850;
}

.rating-pill {
    color: var(--bb-gold-dark, #8b6324);
    background: #f7eadb;
}

.status-pill {
    color: var(--bb-success, #236b4e);
    background: #e8f4ef;
    white-space: nowrap;
}

.status-pill.pending {
    color: var(--bb-danger, #9d2f2f);
    background: #f9e8e8;
}

.status-pill.open {
    color: var(--bb-gold-dark, #8b6324);
    background: #f7eadb;
}

.status-pill.expired {
    color: var(--bb-danger, #9d2f2f);
    background: #f9e8e8;
}

.status-pill.expiring {
    color: var(--bb-gold-dark, #8b6324);
    background: #fff3cf;
}

.status-pill.redeemed {
    color: var(--bb-success, #236b4e);
    background: #e8f4ef;
}

.status-pill.completed {
    color: var(--bb-muted, #6f665f);
    background: #f1ece7;
}

.redeem-state,
.redeem-state-date {
    display: block;
    margin-top: 6px;
    color: var(--bb-muted, #6f665f);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.25;
    white-space: nowrap;
}

.redeem-state.is-redeemed {
    color: var(--bb-success, #236b4e);
}

.redeem-state.is-not-redeemed {
    color: var(--bb-danger, #9d2f2f);
}

.redeem-state-date {
    font-weight: 700;
}

.entry-history {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.entry-history-line {
    margin: 0;
    color: var(--bb-muted, #6f665f);
    font-size: 13px;
    line-height: 1.35;
}

.entry-history-label {
    color: var(--bb-ink, #111111);
    font-weight: 800;
}

.inline-form {
    display: inline-flex;
}

.small-button {
    min-height: 38px;
    padding: 0 12px;
    font-size: 13px;
}

.table-actions-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.table-actions-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.table-actions-note {
    margin: 0;
    color: var(--bb-muted, #6f665f);
    font-size: 14px;
}

.table-link {
    color: var(--bb-ink, #111111);
    font-weight: 850;
    text-decoration: underline;
    text-decoration-color: rgba(184, 137, 53, 0.42);
    text-underline-offset: 3px;
}

.fresha-sync-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    padding: 18px 20px;
    border: 1px solid rgba(184, 137, 53, 0.22);
    border-radius: 8px;
    background: #fffdfb;
}

.fresha-sync-panel h2 {
    margin: 0 0 6px;
    font-size: 24px;
    line-height: 1.1;
}

.fresha-sync-panel p {
    margin: 0;
    color: var(--bb-muted, #6f665f);
}

.fresha-sync-panel code {
    color: var(--bb-ink, #111111);
    font-weight: 850;
}

.fresha-sync-status {
    margin-top: 10px !important;
    font-size: 13px;
    font-weight: 850;
}

.fresha-sync-status.is-success {
    color: var(--bb-success, #236b4e);
}

.fresha-sync-status.is-error {
    color: var(--bb-danger, #9d2f2f);
}

.admin-health-bar {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 16px;
    padding: 10px;
    border: 1px solid rgba(184, 137, 53, 0.24);
    border-left: 5px solid var(--bb-success, #236b4e);
    border-radius: 8px;
    background: #fffdfb;
    box-shadow: 0 10px 26px rgba(17, 17, 17, 0.05);
}

.admin-health-bar.is-warning {
    border-left-color: var(--bb-gold, #b88935);
}

.admin-health-bar.is-danger {
    border-left-color: var(--bb-danger, #9d2f2f);
}

.admin-health-overall,
.admin-health-item {
    color: var(--bb-ink, #111111);
    text-decoration: none;
}

.admin-health-overall {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 150px;
    padding: 10px 12px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
}

.admin-health-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--bb-success, #236b4e);
    box-shadow: 0 0 0 4px rgba(35, 107, 78, 0.12);
}

.admin-health-bar.is-warning .admin-health-dot {
    background: var(--bb-gold, #b88935);
    box-shadow: 0 0 0 4px rgba(184, 137, 53, 0.14);
}

.admin-health-bar.is-danger .admin-health-dot {
    background: var(--bb-danger, #9d2f2f);
    box-shadow: 0 0 0 4px rgba(157, 47, 47, 0.13);
}

.admin-health-items {
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    gap: 8px;
    flex: 1;
}

.admin-health-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 8px;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid rgba(184, 137, 53, 0.18);
    border-radius: 7px;
    background: #ffffff;
}

.admin-health-item strong,
.admin-health-item span,
.admin-health-item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-health-item strong {
    color: var(--bb-muted, #6f665f);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.admin-health-item span {
    color: var(--bb-success, #236b4e);
    font-size: 13px;
    font-weight: 900;
    text-align: right;
}

.admin-health-item.is-warning span {
    color: var(--bb-gold-dark, #8a5f1d);
}

.admin-health-item.is-danger span {
    color: var(--bb-danger, #9d2f2f);
}

.admin-health-item small {
    grid-column: 1 / -1;
    color: var(--bb-muted, #6f665f);
    font-size: 11px;
    font-weight: 700;
}

.two-column-admin {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.stack-form {
    display: grid;
    gap: 12px;
}

.stack-form .settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.profile-meta-grid,
.segment-grid,
.automation-grid,
.health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
}

.profile-meta-grid > div,
.segment-card,
.automation-card,
.health-card {
    padding: 16px;
    border: 1px solid rgba(184, 137, 53, 0.22);
    border-radius: 8px;
    background: #fffdfb;
}

.profile-meta-grid span,
.segment-card span,
.health-card p {
    display: block;
    margin: 0 0 8px;
    color: var(--bb-muted, #6f665f);
    font-size: 13px;
    font-weight: 850;
    text-transform: uppercase;
}

.profile-meta-grid strong,
.segment-card strong,
.health-card strong {
    display: block;
    color: var(--bb-ink, #111111);
    font-size: 22px;
    line-height: 1.15;
}

.segment-card {
    color: inherit;
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.segment-card:hover,
.segment-card.is-active {
    border-color: var(--bb-gold, #b88935);
    box-shadow: 0 12px 32px rgba(17, 17, 17, 0.08);
    transform: translateY(-1px);
}

.segment-card small,
.health-card span {
    display: block;
    margin-top: 8px;
    color: var(--bb-muted, #6f665f);
    font-size: 13px;
    line-height: 1.35;
}

.automation-card {
    display: grid;
    gap: 12px;
}

.automation-card h3,
.automation-card p {
    margin: 0;
}

.automation-card h3 {
    font-size: 20px;
}

.automation-card p {
    color: var(--bb-muted, #6f665f);
    line-height: 1.45;
}

.compact-stats {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.timeline-list {
    display: grid;
    gap: 12px;
}

.timeline-item {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border-left: 4px solid var(--bb-gold, #b88935);
    border-radius: 8px;
    background: #fffaf6;
}

.timeline-item > div {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
}

.timeline-item strong {
    font-size: 16px;
}

.timeline-item span,
.timeline-item p {
    margin: 0;
    color: var(--bb-muted, #6f665f);
    font-size: 13px;
    line-height: 1.4;
}

.health-card {
    border-left: 5px solid var(--bb-muted, #6f665f);
}

.health-card.is-ok {
    border-left-color: var(--bb-success, #236b4e);
}

.health-card.is-warning {
    border-left-color: var(--bb-gold, #b88935);
}

.health-card.is-danger {
    border-left-color: var(--bb-danger, #9d2f2f);
}

.health-backup-list {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}

.health-backup-list p {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    margin: 0;
    padding: 12px;
    border: 1px solid #ead8cc;
    border-radius: 8px;
    background: #fffdfb;
}

.admin-refresh-status {
    margin: 0 0 12px;
    color: var(--bb-muted, #6f665f);
    font-size: 13px;
    font-weight: 750;
}

.admin-refresh-status.is-error {
    color: var(--bb-danger, #9d2f2f);
}

.redeem-check-form {
    align-items: end;
}

.redeem-check-result {
    display: grid;
    gap: 20px;
}

.redeem-check-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.redeem-check-box,
.redeem-check-barcode {
    padding: 14px;
    border: 1px solid var(--bb-nude, #e5d1bf);
    border-radius: 12px;
    background: rgba(255, 250, 246, 0.72);
}

.redeem-check-box span,
.redeem-check-barcode span {
    display: block;
    margin-bottom: 6px;
    color: var(--bb-muted, #6f665f);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.redeem-check-box strong,
.redeem-check-barcode strong {
    color: var(--bb-ink, #111111);
    font-size: 1.05rem;
    overflow-wrap: anywhere;
}

.redeem-check-barcode {
    display: grid;
    gap: 8px;
    justify-items: start;
}

.redeem-check-barcode img {
    max-width: min(100%, 360px);
    height: auto;
}

.redeem-check-actions {
    justify-content: flex-start;
}

.report-toolbar {
    display: grid;
    gap: 18px;
}

.report-range-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.range-pill {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 1px solid rgba(184, 137, 53, 0.24);
    border-radius: 999px;
    color: var(--bb-muted, #6f665f);
    background: #fffaf6;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.range-pill.is-active {
    border-color: var(--bb-ink, #111111);
    color: #ffffff;
    background: var(--bb-ink, #111111);
}

.report-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.roi-kpi-grid,
.quality-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.roi-positive {
    color: var(--bb-success, #147a4d);
}

.roi-negative {
    color: var(--bb-danger, #b12a2a);
}

.compact-money-input {
    width: 110px;
    min-width: 0;
    padding: 10px;
    font-size: 15px;
}

.roi-settings-table th,
.roi-settings-table td,
.quality-table th,
.quality-table td {
    vertical-align: top;
}

.quality-issue-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quality-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(184, 137, 53, 0.12);
    color: var(--bb-gold-dark, #8d641e);
    font-weight: 800;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
}

.quality-pill.success {
    background: rgba(38, 128, 85, 0.12);
    color: var(--bb-success, #147a4d);
}

.quality-pill.warning {
    background: rgba(184, 137, 53, 0.14);
    color: var(--bb-gold-dark, #8d641e);
}

.quality-pill.danger {
    background: rgba(177, 42, 42, 0.12);
    color: var(--bb-danger, #b12a2a);
}

.quality-group-list {
    display: grid;
    gap: 6px;
}

.quality-group-list span {
    display: block;
    padding: 7px 10px;
    border: 1px solid rgba(184, 137, 53, 0.16);
    border-radius: 6px;
    background: rgba(255, 250, 246, 0.55);
}

.report-chart-wrap {
    overflow-x: auto;
    padding-bottom: 8px;
}

.report-chart {
    display: grid;
    gap: 18px;
    min-width: max(100%, 760px);
}

.report-chart-area {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    min-height: 260px;
    padding: 18px 0 6px;
    border-bottom: 1px solid rgba(184, 137, 53, 0.2);
}

.report-chart-group {
    display: grid;
    flex: 1 0 44px;
    gap: 10px;
    min-width: 44px;
}

.report-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    min-height: 220px;
}

.report-bar {
    width: 12px;
    min-height: 2px;
    border-radius: 8px 8px 0 0;
}

.report-bar.participants {
    background: var(--bb-ink, #111111);
}

.report-bar.details {
    background: var(--bb-gold, #b88935);
}

.report-bar.emails {
    background: var(--bb-success, #236b4e);
}

.coupon-chart-area {
    min-height: 260px;
}

.coupon-bars {
    gap: 5px;
}

.report-bar.coupon-issued {
    background: var(--bb-ink, #111111);
}

.report-bar.coupon-redeemed {
    background: var(--bb-gold, #b88935);
}

.report-bar.coupon-expired {
    background: var(--bb-danger, #9d2f2f);
}

.report-chart-label {
    color: var(--bb-muted, #6f665f);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}

.report-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.report-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--bb-muted, #6f665f);
    font-size: 14px;
    font-weight: 700;
}

.report-legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 4px;
}

.report-legend-swatch.participants {
    background: var(--bb-ink, #111111);
}

.report-legend-swatch.details {
    background: var(--bb-gold, #b88935);
}

.report-legend-swatch.emails {
    background: var(--bb-success, #236b4e);
}

.report-line-chart-wrap {
    overflow-x: auto;
    padding: 4px 0 12px;
}

.report-line-chart {
    display: block;
    width: 100%;
    min-width: 760px;
    height: auto;
    overflow: visible;
}

.report-line-axis {
    stroke: rgba(184, 137, 53, 0.24);
    stroke-width: 2;
}

.report-line {
    fill: none;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.report-line.issued {
    stroke: var(--bb-ink, #111111);
}

.report-line.redeemed {
    stroke: var(--bb-success, #236b4e);
}

.report-line-dot {
    stroke: #fffaf6;
    stroke-width: 3;
}

.report-line-dot.issued {
    fill: var(--bb-ink, #111111);
}

.report-line-dot.redeemed {
    fill: var(--bb-success, #236b4e);
}

.report-line-label {
    fill: var(--bb-muted, #6f665f);
    font-size: 25px;
    font-weight: 800;
    text-anchor: middle;
}

.report-legend-swatch.coupons-issued {
    background: var(--bb-ink, #111111);
}

.report-legend-swatch.coupons-redeemed {
    background: var(--bb-gold, #b88935);
}

.report-legend-swatch.coupons-expired {
    background: var(--bb-danger, #9d2f2f);
}

.stat-note {
    margin: 8px 0 0;
    color: var(--bb-muted, #6f665f);
    font-size: 12px;
    font-weight: 700;
}

.block-muted {
    display: block;
    margin-top: 4px;
    color: var(--bb-muted, #6f665f);
    font-size: 12px;
    line-height: 1.3;
}

.email-report-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.email-report-chart-wrap {
    overflow-x: auto;
    padding-bottom: 10px;
}

.email-report-chart {
    display: flex;
    min-width: max(100%, 840px);
    min-height: 250px;
    align-items: flex-end;
    gap: 10px;
    padding: 18px 0 8px;
    border-bottom: 1px solid rgba(184, 137, 53, 0.22);
}

.email-report-chart-day {
    display: grid;
    flex: 1 0 34px;
    min-width: 34px;
    align-items: end;
    gap: 8px;
}

.email-report-bars {
    display: flex;
    height: 210px;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
}

.email-report-bar {
    width: 8px;
    min-height: 2px;
    border-radius: 8px 8px 0 0;
}

.email-report-bar.sent,
.report-legend-swatch.email-sent {
    background: var(--bb-ink, #111111);
}

.email-report-bar.opened,
.report-legend-swatch.email-opened {
    background: var(--bb-success, #236b4e);
}

.email-report-bar.clicked,
.report-legend-swatch.email-clicked {
    background: var(--bb-gold, #b88935);
}

.email-report-bar.failed,
.report-legend-swatch.email-failed {
    background: var(--bb-danger, #9d2f2f);
}

.email-report-table th:nth-child(1),
.email-report-table td:nth-child(1) {
    width: 110px;
}

.email-report-table th:nth-child(2),
.email-report-table td:nth-child(2) {
    width: 130px;
}

.email-report-table th:nth-child(5),
.email-report-table td:nth-child(5) {
    width: 120px;
}

.email-report-table th:nth-child(6),
.email-report-table td:nth-child(6),
.email-report-table th:nth-child(7),
.email-report-table td:nth-child(7) {
    width: 92px;
}

.select-cell {
    width: 42px;
    text-align: center;
}

.col-date {
    width: 86px;
}

.col-rating {
    width: 70px;
}

.col-customer {
    width: 140px;
}

.col-phone {
    width: 108px;
}

.col-email {
    width: 148px;
}

.col-feedback {
    width: 176px;
}

.col-feedback.has-low-rating-feedback {
    background: rgba(157, 47, 47, 0.035);
}

.feedback-alert-title {
    margin-bottom: 6px;
    color: var(--bb-danger, #9d2f2f);
    font-size: 11px;
    line-height: 1.2;
    font-weight: 900;
    text-transform: uppercase;
}

.feedback-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 6px;
}

.feedback-label {
    display: block;
    width: 100%;
    color: var(--bb-muted, #6f6660);
    font-size: 11px;
    line-height: 1.2;
    font-weight: 800;
}

.feedback-chip {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 7px;
    border: 1px solid rgba(184, 137, 53, 0.28);
    border-radius: 999px;
    background: rgba(184, 137, 53, 0.1);
    color: var(--bb-ink, #111111);
    font-size: 11px;
    line-height: 1.2;
    font-weight: 800;
}

.feedback-text {
    color: var(--bb-ink, #111111);
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.col-prize {
    width: 126px;
}

.col-code {
    width: 252px;
}

.col-consent {
    width: 72px;
}

.col-history {
    width: 138px;
}

.col-status {
    width: 118px;
    overflow-wrap: normal;
    word-break: normal;
}

.col-actions {
    width: 110px;
}

.select-cell input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--bb-gold, #b88935);
}

.coupon-code-cell {
    display: grid;
    gap: 6px;
}

.admin-coupon-code {
    display: block;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 900;
}

.admin-fresha-code {
    display: grid;
    gap: 2px;
    max-width: 190px;
    padding: 6px 7px;
    border: 1px solid rgba(184, 137, 53, 0.25);
    border-radius: 6px;
    background: rgba(255, 250, 246, 0.8);
    color: var(--bb-ink, #111111);
    font-size: 12px;
    line-height: 1.15;
    user-select: text;
    -webkit-user-select: text;
}

.admin-fresha-code strong {
    font-size: 13px;
    overflow-wrap: anywhere;
}

.admin-fresha-code small {
    color: var(--bb-muted, #6f665f);
    font-size: 11px;
    line-height: 1.2;
}

.admin-coupon-barcode {
    display: block;
    width: 100%;
    max-width: 156px;
    height: auto;
}

.coupon-code-tools {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
}

.code-tool-button {
    min-height: 34px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 800;
    gap: 6px;
    white-space: nowrap;
}

.button-icon {
    font-size: 14px;
    line-height: 1;
}

.copy-code-feedback {
    min-height: 16px;
    color: var(--bb-success, #236b4e);
    font-size: 12px;
    font-weight: 800;
}

.admin-login {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(460px, 100%);
}

.flash-message {
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid #d6bfae;
    border-radius: 8px;
    color: var(--bb-success, #236b4e);
    background: #fffdfb;
    font-weight: 750;
}

.error-message {
    color: var(--bb-danger, #9d2f2f);
}

@media (max-width: 1540px) {
    .admin-shell {
        width: min(100%, calc(100% - 20px));
    }

    .entries-table th,
    .entries-table td {
        padding: 10px 8px;
        font-size: 12px;
    }

    .entries-table th {
        font-size: 11px;
    }

    .admin-coupon-code {
        font-size: 13px;
    }

    .admin-coupon-barcode {
        max-width: 142px;
    }
}

@media (max-width: 1280px) {
    .admin-health-bar {
        flex-direction: column;
    }

    .admin-health-items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .table-wrap {
        overflow-x: auto;
    }

    .entries-table {
        min-width: 1120px;
    }
}

@media (max-width: 900px) {
    .two-column-admin,
    .stack-form .settings-grid,
    .policy-settings-form .settings-grid,
    .policy-button-position-row,
    .two-column-settings {
        grid-template-columns: 1fr;
    }

    .admin-health-items {
        grid-template-columns: 1fr;
    }

    .brand-bar {
        top: 14px;
        left: 16px;
        right: 16px;
    }

    .brand-mark {
        width: 46px;
        height: 46px;
        font-size: 14px;
    }

    .brand-logo {
        width: 56px;
        max-height: 42px;
    }

    .brand-name {
        font-size: 17px;
    }

    .kiosk-app {
        padding: 98px 18px 32px;
    }

    .policy-shell {
        width: calc(100vw - 36px);
        max-height: calc(100svh - 110px);
        padding: 22px;
    }

    .policy-content {
        max-height: 50svh;
        font-size: 18px;
    }

    .headline {
        font-size: 44px;
    }

    .section-title {
        font-size: 34px;
    }

    .thank-you-title {
        font-size: 44px;
    }

    .lead {
        font-size: 22px;
    }

    .rating-reward-note {
        font-size: 20px;
    }

    .star-button {
        width: 88px;
        height: 88px;
        font-size: 58px;
    }

    .form-shell {
        padding: 24px;
    }

    body.has-onscreen-keyboard .step[data-step="feedback"].is-active,
    body.has-onscreen-keyboard .step[data-step="details"].is-active {
        width: min(1080px, 100%);
    }

    body.has-onscreen-keyboard .step[data-step="feedback"].is-active .form-shell,
    body.has-onscreen-keyboard .step[data-step="details"].is-active .form-shell {
        max-width: 900px;
        margin: 0 auto;
    }

    .field-grid,
    .filter-form,
    .stats-grid,
    .review-share-panel,
    .settings-grid,
    .policy-format-grid {
        grid-template-columns: 1fr;
    }

    .review-share-copy {
        justify-items: stretch;
    }

    .compact-review-qr {
        justify-self: center;
    }

    .button-row {
        justify-content: stretch;
    }

    .button-row .primary-button,
    .button-row .secondary-button {
        width: 100%;
    }

    .coupon-email-row {
        grid-template-columns: 1fr;
    }

    .keyboard-toggle {
        right: 16px;
        bottom: 16px;
        min-height: 56px;
        padding: 0 16px;
    }

    body.has-onscreen-keyboard .kiosk-app {
        padding-bottom: 420px;
    }

    .onscreen-keyboard {
        top: auto;
        right: auto;
        left: 50%;
        bottom: 10px;
        width: calc(100vw - 20px);
        max-height: none;
        transform: translateX(-50%);
    }

    .onscreen-keyboard-shell {
        padding: 14px;
        max-height: none;
    }

    .onscreen-keyboard-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .keyboard-mode-switch {
        width: 100%;
        justify-content: stretch;
    }

    .keyboard-mode-button {
        flex: 1 1 0;
    }

    .keyboard-minimize-button {
        width: 100%;
    }

    .keyboard-key {
        min-height: 48px;
        font-size: 18px;
    }

    .report-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .redeem-check-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .coupon-code {
        width: 100%;
        font-size: 32px;
        overflow-wrap: anywhere;
    }

    .prize-title {
        font-size: 31px;
    }

    .admin-topbar {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .brand-subtitle {
        display: none;
    }

    .headline {
        font-size: 36px;
    }

    .section-title {
        font-size: 29px;
    }

    .thank-you-title {
        font-size: 34px;
    }

    .rating-reward-note {
        font-size: 18px;
    }

    .star-grid {
        gap: 10px;
    }

    .star-button {
        width: 70px;
        height: 70px;
        font-size: 46px;
    }

    input[type="text"],
    input[type="tel"],
    input[type="email"],
    input[type="file"],
    textarea,
    select {
        font-size: 20px;
    }

    .primary-button,
    .secondary-button {
        width: 100%;
        padding: 0 18px;
        font-size: 18px;
    }

    body.has-onscreen-keyboard .kiosk-app {
        padding-bottom: 470px;
    }

    .keyboard-toggle {
        right: 12px;
        left: 12px;
        bottom: 12px;
        justify-content: center;
    }

    .keyboard-toggle-text {
        font-size: 16px;
    }

    .keyboard-key {
        min-height: 48px;
        font-size: 18px;
    }

    .keyboard-key.is-action {
        font-size: 15px;
    }

    .report-summary-grid {
        grid-template-columns: 1fr;
    }

    .redeem-check-grid {
        grid-template-columns: 1fr;
    }

    .kiosk-policy-button {
        right: 14px;
        bottom: 12px;
        min-height: 44px;
        font-size: 14px;
    }

    .kiosk-policy-button.policy-position-bottom-right {
        top: auto;
        right: 14px;
        bottom: 12px;
        left: auto;
    }

    .kiosk-policy-button.policy-position-bottom-left {
        top: auto;
        right: auto;
        bottom: 12px;
        left: 14px;
    }

    .kiosk-policy-button.policy-position-top-right {
        top: 12px;
        right: 14px;
        bottom: auto;
        left: auto;
    }

    .kiosk-policy-button.policy-position-top-left {
        top: 82px;
        right: auto;
        bottom: auto;
        left: 14px;
    }

    .policy-shell {
        width: calc(100vw - 28px);
        max-height: calc(100svh - 96px);
        padding: 20px;
    }

    .policy-content {
        max-height: 50svh;
        font-size: 17px;
    }

    .two-column-settings {
        grid-template-columns: 1fr;
    }
}

@media print {
    @page {
        size: 80mm 150mm;
        margin: 0;
    }

    html,
    body {
        width: 80mm !important;
        min-height: 0 !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        overflow: hidden !important;
    }

    body > * {
        display: none !important;
    }

    body > .coupon-print-area {
        display: block !important;
    }

    .coupon-print-area {
        position: static !important;
        width: 80mm !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
    }

    .print-coupon {
        min-height: 0 !important;
        max-height: 150mm !important;
        box-shadow: none;
    }
}

/* Final coupon screen compact override for short kiosk/tablet viewports. */
.step[data-step="scratch"].has-revealed-coupon {
    justify-content: flex-start !important;
    padding-top: clamp(2px, 0.8vh, 10px) !important;
    padding-bottom: 0 !important;
    overflow: hidden !important;
}

.scratch-layout.has-revealed-coupon {
    gap: 1px !important;
    margin-top: -170px !important;
    padding-bottom: 0 !important;
}

.scratch-layout.has-revealed-coupon .form-heading {
    gap: 0 !important;
    margin: 0 !important;
}

.scratch-layout.has-revealed-coupon .eyebrow {
    margin-bottom: 0 !important;
    font-size: 0.72rem !important;
    line-height: 1 !important;
}

.scratch-layout.has-revealed-coupon .section-title {
    font-size: clamp(1.35rem, 3.2vh, 2rem) !important;
    line-height: 0.96 !important;
    margin: 0 !important;
}

.scratch-layout.has-revealed-coupon .scratch-customer {
    margin: 0 !important;
    font-size: clamp(0.72rem, 1.35vh, 0.95rem) !important;
    line-height: 1 !important;
}

.scratch-layout.has-revealed-coupon .scratch-card {
    width: min(640px, 76vw) !important;
    min-height: 116px !important;
    max-height: 18vh !important;
    aspect-ratio: 16 / 3.6 !important;
    margin: 0 auto !important;
}

.scratch-layout.has-revealed-coupon .prize-reveal {
    min-height: 76px !important;
    padding: 4px 10px !important;
    gap: 2px !important;
}

.scratch-layout.has-revealed-coupon .prize-label {
    margin-bottom: 0 !important;
    font-size: 0.72rem !important;
    line-height: 1 !important;
}

.scratch-layout.has-revealed-coupon .prize-title {
    font-size: clamp(1.1rem, 2.3vh, 1.55rem) !important;
    line-height: 1 !important;
}

.scratch-layout.has-revealed-coupon .coupon-result {
    gap: 1px !important;
    margin-top: 0 !important;
    padding-bottom: 0 !important;
}

.scratch-layout.has-revealed-coupon .coupon-customer,
.scratch-layout.has-revealed-coupon .coupon-instructions.muted {
    display: none !important;
}

.scratch-layout.has-revealed-coupon .coupon-instructions {
    margin: 0 !important;
    line-height: 1.04 !important;
    font-size: clamp(0.7rem, 1.25vh, 0.88rem) !important;
}

.scratch-layout.has-revealed-coupon .coupon-label {
    margin-top: 0 !important;
    font-size: 0.68rem !important;
    line-height: 1 !important;
}

.scratch-layout.has-revealed-coupon .coupon-code {
    font-size: clamp(1rem, 2.3vh, 1.45rem) !important;
    padding: 3px 10px !important;
    line-height: 1 !important;
}

.scratch-layout.has-revealed-coupon .coupon-expiry {
    margin: 0 !important;
    font-size: 0.72rem !important;
    line-height: 1 !important;
}

.scratch-layout.has-revealed-coupon .coupon-barcode-wrap {
    margin: 1px auto !important;
    padding: 1px 8px !important;
}

.scratch-layout.has-revealed-coupon .coupon-barcode-image {
    max-width: min(340px, 58vw) !important;
    max-height: 34px !important;
    object-fit: contain !important;
}

.scratch-layout.has-revealed-coupon .coupon-email-panel {
    width: 100% !important;
    margin-top: 2px !important;
    padding: 4px 6px !important;
    gap: 2px !important;
    box-sizing: border-box !important;
}

.scratch-layout.has-revealed-coupon .coupon-email-note {
    margin: 0 !important;
    font-size: 10px !important;
    line-height: 1 !important;
}

.scratch-layout.has-revealed-coupon .coupon-email-action-row {
    display: grid !important;
    grid-template-columns: minmax(120px, 1fr) minmax(168px, 1.18fr) minmax(138px, 0.96fr) minmax(118px, 0.82fr) !important;
    gap: 5px !important;
    align-items: stretch !important;
}

.scratch-layout.has-revealed-coupon .coupon-email-action-row input,
.scratch-layout.has-revealed-coupon .coupon-email-action-row button {
    min-height: 28px !important;
    height: 28px !important;
    padding: 3px 7px !important;
    font-size: clamp(0.62rem, 0.86vw, 0.76rem) !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

.scratch-layout.has-revealed-coupon .coupon-email-action-row input {
    grid-column: auto !important;
}

@media (max-height: 760px) {
    .scratch-layout.has-revealed-coupon {
        margin-top: -210px !important;
    }

    .scratch-layout.has-revealed-coupon .scratch-card {
        min-height: 86px !important;
        max-height: 13vh !important;
    }

    .scratch-layout.has-revealed-coupon .prize-reveal {
        min-height: 56px !important;
    }

    .scratch-layout.has-revealed-coupon .coupon-barcode-image {
        max-height: 24px !important;
    }

    .scratch-layout.has-revealed-coupon .coupon-email-action-row input,
    .scratch-layout.has-revealed-coupon .coupon-email-action-row button {
        min-height: 24px !important;
        height: 24px !important;
        font-size: 0.56rem !important;
    }
}

@media (max-width: 700px) {
    .scratch-layout.has-revealed-coupon {
        margin-top: -145px !important;
    }

    .scratch-layout.has-revealed-coupon .coupon-email-action-row {
        grid-template-columns: 1fr 1fr !important;
    }

    .scratch-layout.has-revealed-coupon .coupon-email-action-row input {
        grid-column: 1 / -1 !important;
    }
}

/* Final scratch actions fix */
.scratch-layout.has-revealed-coupon {
    margin-top: -165px !important;
    gap: 6px !important;
    padding-bottom: 4px !important;
}

.scratch-layout.has-revealed-coupon .coupon-result {
    gap: 4px !important;
}

.scratch-layout.has-revealed-coupon .coupon-email-panel {
    width: 100% !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 6px 8px !important;
    box-sizing: border-box !important;
}

.scratch-layout.has-revealed-coupon .coupon-email-note {
    margin-bottom: 4px !important;
}

.scratch-layout.has-revealed-coupon .coupon-email-action-row {
    grid-template-columns: minmax(175px, 1.4fr) minmax(175px, 1fr) minmax(175px, 1fr) minmax(155px, 0.9fr) !important;
    gap: 6px !important;
}

.scratch-layout.has-revealed-coupon .coupon-email-action-row input,
.scratch-layout.has-revealed-coupon .coupon-email-action-row button {
    min-height: 34px !important;
    height: 34px !important;
    padding: 4px 10px !important;
    font-size: clamp(0.66rem, 0.84vw, 0.8rem) !important;
}

@media (max-height: 900px) {
    .scratch-layout.has-revealed-coupon {
        margin-top: -210px !important;
    }
}

@media (max-height: 820px) {
    .scratch-layout.has-revealed-coupon {
        margin-top: -270px !important;
    }
}

@media (max-width: 980px) {
    .scratch-layout.has-revealed-coupon .coupon-email-action-row {
        grid-template-columns: 1fr 1fr !important;
    }

    .scratch-layout.has-revealed-coupon .coupon-email-action-row input {
        grid-column: 1 / -1 !important;
    }
}

/* Final kiosk polish patch: scratch buttons, policy corners, idle reorder */
.scratch-layout.has-revealed-coupon {
    margin-top: -355px !important;
    gap: 3px !important;
    padding-bottom: 0 !important;
    align-content: start !important;
}

.scratch-layout.has-revealed-coupon .scratch-card {
    min-height: 96px !important;
    max-height: 15vh !important;
}

.scratch-layout.has-revealed-coupon .coupon-result {
    gap: 2px !important;
    margin-top: 0 !important;
    padding-bottom: 0 !important;
}

.scratch-layout.has-revealed-coupon .coupon-instructions,
.scratch-layout.has-revealed-coupon .coupon-expiry,
.scratch-layout.has-revealed-coupon .coupon-email-note {
    margin: 0 !important;
    line-height: 1.05 !important;
}

.scratch-layout.has-revealed-coupon .coupon-barcode-wrap {
    margin: 0 auto !important;
    padding: 0 8px !important;
}

.scratch-layout.has-revealed-coupon .coupon-email-panel {
    width: 100% !important;
    margin: 0 !important;
    padding: 4px 6px !important;
    gap: 2px !important;
    box-sizing: border-box !important;
}

.scratch-layout.has-revealed-coupon .coupon-email-note {
    font-size: 10px !important;
}

.scratch-layout.has-revealed-coupon .coupon-email-action-row {
    display: grid !important;
    grid-template-columns: minmax(210px, 1.45fr) minmax(180px, 1fr) minmax(180px, 1fr) minmax(170px, 0.92fr) !important;
    gap: 6px !important;
    align-items: center !important;
}

.scratch-layout.has-revealed-coupon .coupon-email-action-row input,
.scratch-layout.has-revealed-coupon .coupon-email-action-row button {
    min-height: 32px !important;
    height: 32px !important;
    padding: 4px 10px !important;
    font-size: clamp(0.64rem, 0.82vw, 0.78rem) !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    margin: 0 !important;
}

.scratch-layout.has-revealed-coupon .coupon-email-action-row input {
    grid-column: auto !important;
}

.scratch-layout.has-revealed-coupon .coupon-actions {
    display: none !important;
}

@media (max-height: 980px) {
    .scratch-layout.has-revealed-coupon {
        margin-top: -390px !important;
    }
}

@media (max-height: 900px) {
    .scratch-layout.has-revealed-coupon {
        margin-top: -445px !important;
    }
}

@media (max-width: 1100px) {
    .scratch-layout.has-revealed-coupon .coupon-email-action-row {
        grid-template-columns: 1fr 1fr !important;
    }

    .scratch-layout.has-revealed-coupon .coupon-email-action-row input {
        grid-column: 1 / -1 !important;
    }
}

.kiosk-policy-button.policy-position-bottom-right {
    right: 18px !important;
    bottom: 18px !important;
    left: auto !important;
    top: auto !important;
}

.kiosk-policy-button.policy-position-bottom-left {
    left: 18px !important;
    bottom: 18px !important;
    right: auto !important;
    top: auto !important;
}

.kiosk-policy-button.policy-position-top-right {
    right: 18px !important;
    top: 18px !important;
    left: auto !important;
    bottom: auto !important;
}

.kiosk-policy-button.policy-position-top-left {
    left: 18px !important;
    top: 18px !important;
    right: auto !important;
    bottom: auto !important;
}

.policy-position-preview-screen {
    position: relative;
    min-height: 180px !important;
}

.policy-position-preview-button.is-bottom-right {
    right: 16px !important;
    bottom: 16px !important;
    left: auto !important;
    top: auto !important;
}

.policy-position-preview-button.is-bottom-left {
    left: 16px !important;
    bottom: 16px !important;
    right: auto !important;
    top: auto !important;
}

.policy-position-preview-button.is-top-right {
    right: 16px !important;
    top: 16px !important;
    left: auto !important;
    bottom: auto !important;
}

.policy-position-preview-button.is-top-left {
    left: 16px !important;
    top: 16px !important;
    right: auto !important;
    bottom: auto !important;
}

.idle-settings-table [data-idle-sort-row] {
    cursor: move !important;
    transition: background 0.15s ease, box-shadow 0.15s ease !important;
}

.idle-settings-table [data-idle-sort-row]:hover {
    background: #fff8ef !important;
}

.idle-settings-table [data-idle-sort-row].is-dragging {
    opacity: 0.68 !important;
    background: #fff1db !important;
    box-shadow: inset 0 0 0 2px #c69233 !important;
}

.idle-sort-handle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 130px !important;
    padding: 8px 12px !important;
    border: 1px dashed #c69233 !important;
    border-radius: 999px !important;
    background: #fff8ef !important;
    color: #8c5d11 !important;
    font-weight: 700 !important;
    cursor: grab !important;
    user-select: none !important;
}

.idle-sort-handle:active {
    cursor: grabbing !important;
}

/* Emergency scratch final-screen hotfix - 2026-08-07 */
.step[data-step="scratch"].has-revealed-coupon {
    min-height: 100svh !important;
    height: 100svh !important;
    overflow: hidden !important;
    align-items: flex-start !important;
    justify-content: center !important;
    padding: clamp(4px, 0.7svh, 10px) clamp(10px, 1.5vw, 22px) !important;
}

.scratch-layout.has-revealed-coupon {
    width: min(760px, calc(100vw - 24px)) !important;
    height: auto !important;
    max-height: calc(100svh - 10px) !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: clamp(3px, 0.6svh, 8px) !important;
    align-items: stretch !important;
    overflow-y: auto !important;
    transform: none !important;
}

.scratch-layout.has-revealed-coupon .form-heading {
    margin: 0 !important;
    gap: 0 !important;
}

.scratch-layout.has-revealed-coupon .eyebrow {
    margin: 0 0 1px !important;
}

.scratch-layout.has-revealed-coupon .section-title {
    font-size: clamp(24px, 4svh, 42px) !important;
    line-height: 0.98 !important;
    margin: 0 !important;
}

.scratch-layout.has-revealed-coupon .scratch-customer {
    margin: 2px 0 0 !important;
    font-size: clamp(12px, 1.7svh, 16px) !important;
    line-height: 1.1 !important;
}

.scratch-layout.has-revealed-coupon .scratch-card {
    width: 100% !important;
    max-width: 760px !important;
    height: clamp(170px, 39svh, 360px) !important;
    min-height: 0 !important;
    margin: 0 !important;
}

.scratch-layout.has-revealed-coupon .scratch-card.is-revealed #scratchCanvas {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.scratch-layout.has-revealed-coupon .scratch-card.is-revealed .prize-reveal {
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 5 !important;
    background: linear-gradient(180deg, rgba(255, 251, 242, 0.98), rgba(247, 232, 198, 0.98)) !important;
}

.scratch-layout.has-revealed-coupon .prize-title {
    font-size: clamp(22px, 3.6svh, 34px) !important;
    line-height: 1.04 !important;
}

.scratch-layout.has-revealed-coupon .coupon-result {
    align-self: stretch !important;
    width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    gap: clamp(3px, 0.6svh, 7px) !important;
    padding: clamp(5px, 0.8svh, 10px) !important;
    margin: 0 !important;
    background: rgba(255, 250, 246, 0.96) !important;
    border: 1px solid #edd7c6 !important;
    border-radius: 10px !important;
}

.coupon-result[hidden] {
    display: none !important;
}

.scratch-layout.has-revealed-coupon .coupon-customer,
.scratch-layout.has-revealed-coupon .coupon-copy,
.scratch-layout.has-revealed-coupon .coupon-expiry,
.scratch-layout.has-revealed-coupon .coupon-label,
.scratch-layout.has-revealed-coupon .coupon-email-panel p {
    margin: 0 !important;
    line-height: 1.1 !important;
}

.scratch-layout.has-revealed-coupon .coupon-title {
    font-size: clamp(15px, 2svh, 18px) !important;
    line-height: 1.08 !important;
    margin: 0 !important;
}

.scratch-layout.has-revealed-coupon .coupon-code {
    font-size: clamp(21px, 3.4svh, 34px) !important;
    line-height: 1 !important;
    padding: clamp(5px, 0.8svh, 8px) !important;
    margin: 0 !important;
}

.scratch-layout.has-revealed-coupon .coupon-barcode-wrap,
.scratch-layout.has-revealed-coupon .coupon-email-panel {
    padding: clamp(4px, 0.7svh, 8px) !important;
    margin: 0 !important;
}

.scratch-layout.has-revealed-coupon .coupon-barcode-image,
.scratch-layout.has-revealed-coupon .coupon-barcode {
    max-height: clamp(48px, 9svh, 82px) !important;
    width: 100% !important;
    object-fit: contain !important;
}

.scratch-layout.has-revealed-coupon .coupon-email-action-row,
.scratch-layout.has-revealed-coupon .coupon-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    align-items: stretch !important;
    margin-top: 3px !important;
}

.scratch-layout.has-revealed-coupon .coupon-email-action-row input {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 34px !important;
    font-size: clamp(12px, 1.6svh, 15px) !important;
    padding: 6px 8px !important;
}

.scratch-layout.has-revealed-coupon .coupon-email-action-row button,
.scratch-layout.has-revealed-coupon .coupon-actions button {
    width: 100% !important;
    min-height: 34px !important;
    padding: 6px 9px !important;
    font-size: clamp(11px, 1.5svh, 14px) !important;
    line-height: 1.08 !important;
    border-radius: 8px !important;
    white-space: normal !important;
}

.scratch-layout.has-revealed-coupon .coupon-email-message,
.scratch-layout.has-revealed-coupon .muted,
.scratch-layout.has-revealed-coupon .small-note {
    font-size: clamp(10px, 1.3svh, 13px) !important;
    line-height: 1.1 !important;
    margin: 0 !important;
}

.scratch-layout.has-revealed-coupon .coupon-result > button[data-reset] {
    width: 100% !important;
    min-height: 34px !important;
    padding: 6px 9px !important;
    font-size: clamp(11px, 1.5svh, 14px) !important;
    line-height: 1.08 !important;
    border-radius: 8px !important;
    margin-top: 3px !important;
}

@media (max-height: 760px), (max-width: 900px) {
    .step[data-step="scratch"].has-revealed-coupon {
        padding: 3px 8px !important;
    }

    .scratch-layout.has-revealed-coupon {
        width: calc(100vw - 16px) !important;
        gap: 3px 8px !important;
    }

    .scratch-layout.has-revealed-coupon .scratch-card {
        height: clamp(145px, 30svh, 220px) !important;
    }

    .scratch-layout.has-revealed-coupon .section-title {
        font-size: clamp(22px, 3.5svh, 34px) !important;
    }

    .scratch-layout.has-revealed-coupon .coupon-code {
        font-size: clamp(19px, 3svh, 29px) !important;
    }

    .scratch-layout.has-revealed-coupon .coupon-email-action-row button,
    .scratch-layout.has-revealed-coupon .coupon-actions button {
        font-size: clamp(10px, 1.45svh, 12px) !important;
        padding: 5px 6px !important;
    }
}

@media (max-width: 620px) {
    .step[data-step="scratch"].has-revealed-coupon {
        height: auto !important;
        min-height: 100svh !important;
        overflow: auto !important;
    }

    .scratch-layout.has-revealed-coupon {
        display: flex !important;
        flex-direction: column !important;
        max-height: none !important;
        height: auto !important;
    }
}
