/* Kiosk helper (Wave 2a). Scoped under .kh-* so page styles are untouched. */
.kh-root, .kh-root * { box-sizing: border-box; }

.kh-button {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 2147483000;
    min-width: 280px;
    min-height: 76px;
    padding: 10px 26px 10px 14px;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    border: 3px solid #ffffff;
    border-radius: 999px;
    background: #9A3412;
    color: #ffffff;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.15;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.35);
    -webkit-tap-highlight-color: transparent;
}
.kh-button:focus-visible { outline: 4px solid #fde68a; outline-offset: 3px; }
.kh-button:active { background: #7c2d12; }
.kh-icon {
    flex: 0 0 auto;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #ffffff;
    color: #9A3412;
    font-size: 34px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}
.kh-button-text { display: flex; flex-direction: column; }
.kh-button-text .kh-sub { font-size: 18px; font-weight: 600; }

@keyframes kh-pulse {
    0% { box-shadow: 0 0 0 0 rgba(154, 52, 18, 0.65), 0 8px 24px rgba(15, 23, 42, 0.35); }
    70% { box-shadow: 0 0 0 22px rgba(154, 52, 18, 0), 0 8px 24px rgba(15, 23, 42, 0.35); }
    100% { box-shadow: 0 0 0 0 rgba(154, 52, 18, 0), 0 8px 24px rgba(15, 23, 42, 0.35); }
}
.kh-button.kh-pulse { animation: kh-pulse 1.6s ease-out 4; }
@media (prefers-reduced-motion: reduce) {
    .kh-button.kh-pulse { animation: none; }
}

.kh-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2147483001;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.kh-backdrop[hidden] { display: none; }

.kh-panel {
    width: min(94vw, 760px);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: #ffffff;
    color: #1f2937;
    border-radius: 22px;
    border-top: 10px solid #9A3412;
    padding: 28px 32px 30px;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 26px;
    line-height: 1.4;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
}
.kh-panel h2 {
    margin: 0 0 18px;
    font-size: 32px;
    line-height: 1.2;
    color: #7c2d12;
}
.kh-message { margin: 0 0 20px; font-size: 26px; }
.kh-message.kh-strong { font-weight: 700; }
.kh-choices { display: flex; flex-direction: column; gap: 14px; }
.kh-btn {
    min-height: 64px;
    width: 100%;
    padding: 12px 22px;
    border-radius: 14px;
    border: 2px solid #9A3412;
    background: #fff7ed;
    color: #7c2d12;
    font: inherit;
    font-size: 25px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}
.kh-btn:focus-visible { outline: 4px solid #2563eb; outline-offset: 2px; }
.kh-btn.kh-primary { background: #9A3412; color: #ffffff; text-align: center; }
.kh-btn.kh-plain { background: #ffffff; border-color: #6b7280; color: #1f2937; text-align: center; }
.kh-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}
.kh-footer .kh-btn { width: auto; flex: 1 1 220px; text-align: center; }
.kh-checks { list-style: none; margin: 0 0 18px; padding: 0; }
.kh-checks li { display: flex; align-items: center; gap: 14px; margin: 8px 0; font-size: 24px; }
.kh-dot {
    width: 28px; height: 28px; border-radius: 50%;
    border: 3px solid #9ca3af; flex: 0 0 auto;
}
.kh-checks li[data-state="running"] .kh-dot { border-color: #9A3412; border-top-color: transparent; animation: kh-spin 1s linear infinite; }
.kh-checks li[data-state="done"] .kh-dot { background: #15803d; border-color: #15803d; }
.kh-checks li[data-state="failed"] .kh-dot { background: #b91c1c; border-color: #b91c1c; }
@keyframes kh-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .kh-checks li[data-state="running"] .kh-dot { animation: none; border-top-color: #9A3412; }
}
.kh-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.kh-highlight {
    outline: 5px solid #9A3412 !important;
    outline-offset: 6px !important;
    box-shadow: 0 0 0 12px rgba(154, 52, 18, 0.18) !important;
    border-radius: 6px;
}

/* Off the kiosk: a small phone line in the same spot. */
.kh-phone {
    position: fixed;
    left: 12px;
    bottom: 12px;
    z-index: 2147483000;
    max-width: calc(100vw - 24px);
    padding: 10px 16px;
    border-radius: 999px;
    background: #9A3412;
    color: #ffffff;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.3);
}
.kh-phone a { color: #ffffff; font-weight: 800; text-decoration: underline; white-space: nowrap; }
