* {
    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;
}

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;
}

.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;
}

.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;
}

.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;
}

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);
}

.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-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: 3mm;
    width: 80mm;
    max-height: 150mm;
    padding: 4mm 4mm 5mm;
    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-name,
.print-phone {
    font-size: 11px;
    line-height: 1.3;
}

.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;
}

@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);
    }
}

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

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

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

.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;
}

.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);
}

.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(5, minmax(0, 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: 1.2fr 1fr 1fr 0.8fr auto auto;
    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: auto;
}

.entries-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1120px;
}

.entries-table th,
.entries-table td {
    padding: 13px 12px;
    border-bottom: 1px solid #ead8cc;
    text-align: left;
    vertical-align: top;
    font-size: 14px;
}

.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;
}

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

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

.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;
}

.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;
}

.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;
}

.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);
}

.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);
}

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

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

.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: 900px) {
    .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;
    }

    .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 {
        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%;
    }

    .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));
    }

    .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;
    }
}

@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;
    }
}
