.kac-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
.kac-shell {
    --kac-accent: #2563eb;
    --kac-bg: #fff;
    --kac-text: #0f172a;
    --kac-muted: #64748b;
    --kac-radius: 16px;
    --kac-timer-progress: 0%;
    box-sizing: border-box;
    width: 100%;
    margin: 20px 0;
    padding: 16px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: var(--kac-radius);
    background: var(--kac-bg);
    color: var(--kac-text);
    font-family: inherit;
    line-height: 1.5;
    overflow-wrap: anywhere;
    text-align: center;
}
.kac-shell *, .kac-shell *::before, .kac-shell *::after { box-sizing: border-box; }
.kac-shell[hidden], .kac-shell [hidden] { display: none !important; }
.kac-shell.has-shadow { box-shadow: 0 12px 32px rgba(15, 23, 42, .08); }
.kac-shell.has-animation { animation: kac-enter .28s ease both; }
.kac-theme-dark { --kac-muted: #cbd5e1; border-color: #334155; }
.kac-theme-dark .kac-progress,
.kac-theme-dark .kac-step-progress li,
.kac-theme-dark .kac-timer-bar-track { background: #334155; }
.kac-theme-dark .kac-ring { background: conic-gradient(var(--kac-accent) var(--kac-timer-progress), #334155 0); }
.kac-theme-gradient { background: linear-gradient(135deg, var(--kac-bg), color-mix(in srgb, var(--kac-accent) 10%, #fff)); }
.kac-theme-minimal { margin-block: 20px; padding: 8px 0 4px; overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none !important; }

.kac-topline { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.kac-shell .kac-badge { flex: 0 0 auto; padding: 4px 9px; border-radius: 999px; background: #eff6ff; color: #1d4ed8; font-size: 11px; font-weight: 800; line-height: 1.35; }
.kac-theme-dark .kac-badge { background: #1e3a5f; color: #bfdbfe; }
.kac-theme-minimal .kac-badge { padding: 3px 8px; border: 1px solid rgba(100, 116, 139, .28); background: transparent; color: var(--kac-muted); font-weight: 700; }
.kac-titles { display: flex; align-items: center; min-width: 0; flex-direction: column; text-align: center; }
.kac-shell .kac-title { color: var(--kac-muted); font-size: 11px; line-height: 1.35; }
.kac-shell .kac-article-title { max-width: 100%; overflow: hidden; font-size: 13px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }

.kac-progress { height: 7px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.kac-progress-bar { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--kac-accent); transition: width .25s linear; }
.kac-step-progress { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.kac-step-progress li { position: relative; flex: 1; height: 5px; border-radius: 999px; background: #e2e8f0; }
.kac-step-progress li span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.kac-step-progress .is-complete, .kac-step-progress .is-current { background: var(--kac-accent); }
.kac-step-progress .is-current { opacity: .65; }
.kac-progress-percent { display: flex; align-items: baseline; justify-content: center; gap: 4px; color: var(--kac-muted); font-size: 12px; }
.kac-progress-percent strong { color: var(--kac-accent); font-size: 18px; }
.kac-theme-minimal .kac-progress, .kac-theme-minimal .kac-step-progress li, .kac-theme-minimal .kac-timer-bar-track { background: rgba(148, 163, 184, .24); }

.kac-content { padding-top: 14px; text-align: center; }
.kac-timer-wrap { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; }
.kac-copy-area { width: 100%; max-width: min(100%, 620px); min-width: 0; flex: 0 1 auto; text-align: center; }
.kac-shell.kac-shell .kac-heading { margin: 0 0 4px; color: inherit; font-size: 17px; font-weight: 700; line-height: 1.35; letter-spacing: normal; }
.kac-shell.kac-shell .kac-message { margin: 0; color: var(--kac-muted); font-size: 14px; line-height: 1.45; }
.kac-ring { position: relative; display: grid; place-items: center; flex: 0 0 68px; width: 68px; height: 68px; border-radius: 50%; background: conic-gradient(var(--kac-accent) var(--kac-timer-progress), #e2e8f0 0); }
.kac-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--kac-bg); }
.kac-ring .kac-seconds { position: relative; z-index: 1; font-size: 21px; font-weight: 800; letter-spacing: -.5px; }
.kac-theme-minimal .kac-ring { background: transparent; }
.kac-theme-minimal .kac-ring::before {
    inset: 0;
    background: conic-gradient(var(--kac-accent) var(--kac-timer-progress), rgba(148, 163, 184, .28) 0);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 0);
    mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 0);
}
.kac-timer-bar { width: min(290px, 45vw); max-width: 100%; text-align: center; }
.kac-timer-bar-track { height: 10px; margin-bottom: 7px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.kac-timer-bar-fill { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--kac-accent); transition: width .25s linear; }
.kac-timer-bar strong { font-size: 19px; }
.kac-timer-bar small, .kac-timer-number small { color: var(--kac-muted); font-size: 12px; font-weight: 600; }
.kac-timer-number { min-width: 82px; text-align: center; }
.kac-timer-number .kac-seconds { display: block; color: var(--kac-accent); font-size: 36px; font-weight: 800; line-height: 1; letter-spacing: -1px; }
.kac-timer-progress-only { width: min(400px, 62vw); max-width: 100%; }
.kac-timer-progress-only .kac-timer-bar-track { height: 12px; margin: 0; }
.kac-timer-style-progress .kac-timer-wrap { align-items: center; flex-direction: column; }
.kac-timer-style-progress .kac-copy-area { text-align: center; }
.kac-timer-bookring { display: grid; place-items: center; flex: 0 0 58px; width: 58px; height: 58px; }
.kac-bookring-meter { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: conic-gradient(var(--kac-accent) var(--kac-timer-progress), #ddd6fe 0); }
.kac-bookring-core { width: 44px; height: 44px; border-radius: 50%; background: var(--kac-bg); }
.kac-theme-dark .kac-bookring-meter { background: conic-gradient(var(--kac-accent) var(--kac-timer-progress), #374151 0); }
.kac-theme-minimal .kac-bookring-core { background: var(--kac-bg, #fff); }

.kac-reading-notice { display: flex; width: fit-content; max-width: 100%; align-items: center; justify-content: center; gap: 10px; margin: 14px auto 0; padding: 11px 12px; border: 1px solid #fcd34d; border-radius: 11px; background: #fffbeb; color: #92400e; font-size: 13px; line-height: 1.45; text-align: center; }
.kac-reading-notice-icon { display: grid; place-items: center; flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; background: #fef3c7; color: #b45309; font-size: 16px; font-weight: 900; }
.kac-reading-notice.is-paused { border-color: #fb923c; background: #fff7ed; color: #9a3412; }
.kac-theme-dark .kac-reading-notice { border-color: #92400e; background: #2b2112; color: #fde68a; }
.kac-theme-minimal .kac-reading-notice { width: fit-content; max-width: 100%; margin-inline: auto; padding: 8px 11px; color: #4b5563; text-align: center; }

.kac-button, .kac-copy, .kac-retry { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 16px; border: 0; border-radius: 11px; background: var(--kac-accent); color: #fff !important; font: inherit; font-weight: 800; line-height: 1.35; text-align: center; text-decoration: none !important; cursor: pointer; touch-action: manipulation; transition: transform .15s ease, opacity .15s ease; }
.kac-button:hover, .kac-copy:hover, .kac-retry:hover { opacity: .92; transform: translateY(-1px); }
.kac-button:focus-visible, .kac-copy:focus-visible, .kac-retry:focus-visible, .kac-result:focus-visible { outline: 3px solid rgba(37, 99, 235, .35); outline-offset: 3px; }
.kac-button.is-loading { opacity: .72; }
.kac-button-arrow { font-size: 18px; line-height: 1; transition: transform .18s ease; }
.kac-next-button:hover .kac-button-arrow { transform: translateX(3px); }
.kac-next-button-simple { min-height: 42px; padding: 9px 18px; border: 1px solid var(--kac-simple-btn-border, #cbd5e1); border-radius: var(--kac-simple-btn-radius, 10px); background: var(--kac-simple-btn-bg, #fff); color: var(--kac-simple-btn-text, #334155) !important; font-size: 14px; box-shadow: none; }
.kac-simple-size-small .kac-next-button-simple { min-height: 36px; padding: 7px 14px; font-size: 13px; }
.kac-simple-size-large .kac-next-button-simple { min-height: 50px; padding: 13px 24px; font-size: 16px; }
.kac-next-button-simple:hover { border-color: var(--kac-simple-btn-border, #94a3b8); background: var(--kac-simple-btn-bg, #fff); color: var(--kac-simple-btn-text, #334155) !important; opacity: .88; transform: none; }
.kac-next-button-simple:focus-visible { outline: 3px solid rgba(71, 85, 105, .35); }

.kac-result { padding: 4px 0; text-align: center; outline: none; }
.kac-success-icon { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 9px; border-radius: 50%; background: #dcfce7; color: #15803d; font-size: 23px; font-weight: 900; }
.kac-shell.kac-shell .kac-result h3 { margin: 0 0 5px; color: inherit; font-size: 17px; line-height: 1.35; }
.kac-shell.kac-shell .kac-result p { margin: 0 0 12px; color: var(--kac-muted); font-size: 14px; line-height: 1.45; }
.kac-code-label { display: block; margin-bottom: 7px; color: var(--kac-muted); font-size: 13px; }
.kac-code-row { display: flex; align-items: center; justify-content: center; gap: 9px; flex-wrap: wrap; }
.kac-code { display: inline-flex; align-items: center; justify-content: center; min-width: 178px; max-width: 100%; min-height: 48px; padding: 11px 15px; overflow-wrap: anywhere; border: 1px dashed #94a3b8; border-radius: 10px; background: #f8fafc; color: var(--kac-text); font-size: 18px; font-weight: 900; letter-spacing: 1px; white-space: normal; }
.kac-result small { display: block; margin-top: 10px; color: var(--kac-muted); }
.kac-completed-row { display: flex; align-items: center; justify-content: center; gap: 11px; min-height: 42px; flex-wrap: wrap; text-align: center; }
.kac-completed-copy { min-width: 0; flex: 0 1 auto; text-align: center; }
.kac-completed-copy p { margin: 3px 0 0 !important; font-size: 12px; line-height: 1.35; }
.kac-is-completed, .kac-is-finished { padding-block: 12px; }
.kac-is-completed .kac-topline, .kac-is-completed > .kac-progress, .kac-is-completed > .kac-step-progress, .kac-is-completed > .kac-progress-percent,
.kac-is-finished .kac-topline, .kac-is-finished > .kac-progress, .kac-is-finished > .kac-step-progress, .kac-is-finished > .kac-progress-percent { display: none !important; }
.kac-is-completed .kac-content, .kac-is-finished .kac-content { padding-top: 0; }
.kac-is-completed .kac-success-icon { flex: 0 0 38px; width: 38px; height: 38px; margin: 0; font-size: 19px; }
.kac-next-button { flex: 0 0 auto; gap: 8px; white-space: nowrap; }
.kac-inline-error { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 12px; border: 1px solid #fecaca; border-radius: 12px; background: #fff7f7; color: #991b1b; font-size: 14px; }
.kac-retry { min-height: 36px; padding: 7px 12px; background: #b91c1c; }
.kac-error { border-color: #fecaca; }
.kac-diagnostic { display: block; margin-top: 8px; overflow-wrap: anywhere; font-size: 11px; opacity: .75; }
.kac-redirect-message { margin-top: 9px !important; font-size: 13px; }
.kac-theme-dark .kac-success-icon { background: #173d2a; color: #86efac; }
.kac-theme-dark .kac-code { background: #1f2937; }
.kac-theme-dark .kac-inline-error { border-color: #7f1d1d; background: #3b1515; color: #fecaca; }
.kac-theme-minimal .kac-code { background: transparent; }

/* Simple Mode keeps the existing timer and server flow, but removes all
   non-essential presentation around countdown, navigation, and final code. */
.kac-display-simple { margin-block: 20px; padding: 16px 0; overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none !important; }
.kac-display-simple .kac-content { padding: 0; }
.kac-display-simple .kac-timer-wrap { justify-content: center; flex-direction: column; gap: 0; min-height: 74px; text-align: center; }
.kac-display-simple .kac-copy-area { display: flex; align-items: center; justify-content: center; width: 100%; min-width: 0; flex: 0 1 auto; }
.kac-display-simple .kac-message { display: none; }
.kac-display-simple .kac-message.is-simple-notice { display: inline-flex; width: fit-content; max-width: min(100%, 420px); margin: 11px auto 0; padding: 7px 11px; border: 1px solid #e2e8f0; border-radius: 999px; background: #f8fafc; color: #64748b; font-size: 12px; line-height: 1.35; text-align: center; }
.kac-display-simple .kac-timer-bar,
.kac-display-simple .kac-timer-progress-only { width: min(100%, 320px); }
.kac-display-simple .kac-timer-bar strong { display: block; text-align: center; }
.kac-display-simple .kac-result { display: flex; align-items: center; justify-content: center; min-height: 50px; padding: 0; }
.kac-display-simple .kac-next-button { width: auto; min-width: 150px; margin: 0; flex: 0 0 auto; }
.kac-display-simple.kac-is-completed,
.kac-display-simple.kac-is-finished { padding-block: 16px; }
.kac-display-simple .kac-simple-final { display: grid; justify-items: center; gap: 10px; width: 100%; }
.kac-display-simple .kac-simple-final-text { max-width: 520px; margin: 0; color: var(--kac-text, #0f172a); font-size: 14px; line-height: 1.5; text-align: center; }
.kac-display-simple .kac-simple-code-row { width: 100%; }
.kac-display-simple .kac-code { min-width: min(100%, 220px); min-height: 52px; border-style: solid; background: var(--kac-bg, #fff); font-size: clamp(18px, 4vw, 24px); letter-spacing: 1.5px; }
.kac-display-simple.kac-is-initializing .kac-timer-wrap::before { top: 50%; }
.kac-display-simple.kac-error { padding-inline: 12px; border: 0; }

/* Scroll Flow is intentionally compact and manual: the instruction never
   scrolls the page, and the navigation action remains at the article bottom. */
.kac-shell.kac-display-scroll_flow { margin-block: 24px; padding: 16px 0; overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none; text-align: center; }
.kac-display-scroll_flow .kac-content { padding: 0; }
.kac-display-scroll_flow .kac-flow-status { display: flex; align-items: center; justify-content: center; gap: 10px; width: min(100%, 420px); min-height: 48px; margin: 0 auto 10px; padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 650; line-height: 1.5; }
.kac-display-scroll_flow .kac-flow-status.is-preparing { background: #eff6ff; background: color-mix(in srgb, var(--kac-accent) 9%, var(--kac-bg)); color: var(--kac-accent); }
.kac-display-scroll_flow .kac-flow-status.is-success { background: #ecfdf3; color: #15803d; }
.kac-theme-dark.kac-display-scroll_flow .kac-flow-status.is-preparing { background: #1e293b; color: var(--kac-text); }
.kac-theme-dark.kac-display-scroll_flow .kac-flow-status.is-success { background: #113526; color: #86efac; }
.kac-flow-check, .kac-flow-spinner { flex: 0 0 auto; }
.kac-flow-status-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; text-align: left; }
.kac-flow-status-note { display: block; margin: 0; color: var(--kac-muted); font-size: 13px; font-weight: 400; line-height: 1.5; }
.kac-flow-spinner { display: block; width: 20px; height: 20px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: kac-spin .8s linear infinite; }
.kac-display-scroll_flow .kac-timer-wrap { align-items: center; justify-content: center; min-height: 48px; gap: 0; text-align: center; }
.kac-display-scroll_flow .kac-copy-area { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: min(100%, 420px); min-width: 0; padding: 12px 16px; border-radius: 12px; }
.kac-display-scroll_flow .kac-copy-area.kac-flow-counting { background: #eff6ff; background: color-mix(in srgb, var(--kac-accent) 9%, var(--kac-bg)); }
.kac-display-scroll_flow.kac-theme-dark .kac-copy-area.kac-flow-counting { background: #1e293b; background: color-mix(in srgb, var(--kac-accent) 16%, var(--kac-bg)); }
.kac-shell.kac-display-scroll_flow .kac-message { display: inline-flex; align-items: center; justify-content: center; gap: 10px; max-width: 100%; margin: 0; color: var(--kac-text); font-size: 14px; font-weight: 600; line-height: 1.5; text-align: center; }
.kac-shell.kac-display-scroll_flow .kac-flow-counting .kac-message { color: var(--kac-accent); font-size: 18px; font-weight: 750; font-variant-numeric: tabular-nums; }
.kac-theme-dark.kac-display-scroll_flow .kac-flow-counting .kac-message { color: var(--kac-text); }
.kac-flow-clock, .kac-flow-next-arrow { flex: 0 0 auto; }
.kac-display-scroll_flow .kac-result { padding: 0; }
.kac-flow-intro, .kac-flow-scroll-prompt { display: flex; align-items: center; flex-direction: column; gap: 8px; width: min(100%, 420px); margin-inline: auto; }
.kac-shell.kac-display-scroll_flow .kac-flow-intro .kac-flow-eyebrow { margin: 0; color: var(--kac-accent); font-size: 12px; font-weight: 750; line-height: 1.5; letter-spacing: .04em; }
.kac-shell.kac-display-scroll_flow .kac-result .kac-flow-description, .kac-shell.kac-display-scroll_flow .kac-flow-waiting-note { margin: 0; color: var(--kac-muted); font-size: 13px; font-weight: 400; line-height: 1.6; }
.kac-flow-intro .kac-flow-gate { margin-top: 4px; }
.kac-flow-gate, .kac-flow-next { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: min(170px, 100%); max-width: 100%; border: 1px solid var(--kac-flow-btn-border, #1d4ed8); border-radius: var(--kac-flow-btn-radius, 10px); background: var(--kac-flow-btn-bg, #2563eb); color: var(--kac-flow-btn-text, #fff) !important; box-shadow: none; font-family: inherit; font-weight: 700; white-space: normal; overflow-wrap: anywhere; }
.kac-flow-gate:hover, .kac-flow-next:hover { border-color: var(--kac-flow-btn-border, #1d4ed8); background: var(--kac-flow-btn-bg, #2563eb); color: var(--kac-flow-btn-text, #fff) !important; }
.kac-flow-gate:disabled, .kac-flow-next:disabled { cursor: wait; opacity: .65; transform: none; }
.kac-flow-size-small .kac-flow-gate, .kac-flow-size-small .kac-flow-next { min-width: min(140px, 100%); min-height: 44px; padding: 9px 14px; font-size: 12px; }
.kac-flow-size-medium .kac-flow-gate, .kac-flow-size-medium .kac-flow-next { min-width: min(170px, 100%); min-height: 48px; padding: 11px 20px; font-size: 14px; }
.kac-flow-size-large .kac-flow-gate, .kac-flow-size-large .kac-flow-next { min-width: min(200px, 100%); min-height: 52px; padding: 13px 24px; font-size: 16px; }
.kac-flow-width-auto .kac-flow-gate, .kac-flow-width-auto .kac-flow-next { width: auto; max-width: 100%; }
.kac-flow-width-full .kac-flow-gate, .kac-flow-width-full .kac-flow-next { width: min(100%, 420px); min-width: 0; }
.kac-flow-arrow { color: var(--kac-accent); }
.kac-scroll-flow-instruction { margin: 0 !important; color: var(--kac-accent) !important; font-size: 14px !important; font-weight: 750; line-height: 1.5; letter-spacing: .04em; text-align: center; }
.kac-theme-dark .kac-flow-eyebrow, .kac-theme-dark .kac-scroll-flow-instruction { color: var(--kac-text) !important; }
.kac-scroll-flow-bottom { --kac-muted: #64748b; box-sizing: border-box; clear: both; width: 100%; margin: 28px auto 16px; padding: 8px 0; font-family: inherit; line-height: 1.5; overflow-wrap: anywhere; text-align: center; }
.kac-scroll-flow-bottom.kac-theme-dark { --kac-muted: #cbd5e1; }
.kac-scroll-flow-bottom *, .kac-scroll-flow-bottom *::before, .kac-scroll-flow-bottom *::after { box-sizing: border-box; }
.kac-scroll-flow-bottom[hidden], .kac-scroll-flow-bottom-result[hidden] { display: none !important; }
.kac-scroll-flow-bottom-result { display: grid; justify-items: center; gap: 12px; width: min(100%, 420px); margin-inline: auto; padding: 24px; border: 1px solid #e2e8f0; border-color: color-mix(in srgb, var(--kac-text, #0f172a) 12%, var(--kac-bg, #fff)); border-radius: min(var(--kac-radius, 14px), 16px); background: var(--kac-bg, #fff); color: var(--kac-text, #0f172a); }
.kac-scroll-flow-bottom-result.is-navigation-only { gap: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.kac-scroll-flow-bottom .kac-scroll-flow-bottom-result h3 { margin: 0; color: inherit; font-size: 18px; font-weight: 700; line-height: 1.5; letter-spacing: normal; }
.kac-scroll-flow-bottom .kac-scroll-flow-bottom-result p { margin: 0; color: var(--kac-muted); font-size: 13px; line-height: 1.6; }
.kac-scroll-flow-bottom-result .kac-code-label { margin: 0; color: var(--kac-muted); font-size: 13px; }
.kac-scroll-flow-bottom-result .kac-code-row { width: 100%; min-width: 0; }
.kac-scroll-flow-bottom-result .kac-code { width: 100%; min-width: 0; min-height: 56px; padding: 12px 16px; border: 0; border-radius: 10px; background: #f1f5f9; background: color-mix(in srgb, var(--kac-text, #0f172a) 5%, var(--kac-bg, #fff)); color: inherit; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: clamp(18px, 4vw, 26px); font-weight: 750; letter-spacing: .08em; }
.kac-scroll-flow-bottom-result small { display: block; max-width: 100%; margin: 0; color: var(--kac-muted); font-size: 12px; }
.kac-scroll-flow-bottom-result .kac-inline-error { width: 100%; }

.kac-notice, .kac-standalone-code { margin: 20px 0; padding: 14px 16px; border-left: 4px solid #2563eb; border-radius: 8px; background: #eff6ff; }
.kac-standalone-code { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.kac-standalone-code > div { display: flex; flex-direction: column; }
.kac-standalone-code span { color: #64748b; font-size: 12px; }
.kac-standalone-code strong { font-size: 18px; letter-spacing: 1px; }
.kac-standalone-code.kac-code-no-copy { justify-content: center; text-align: center; }
.kac-login { text-align: center; }
.kac-login h3 { margin-top: 0; }

.kac-is-initializing .kac-timer-visual { visibility: hidden; }
.kac-is-initializing .kac-timer-wrap { position: relative; }
.kac-is-initializing .kac-timer-wrap::before { content: ""; position: absolute; left: 50%; top: 34px; width: 16px; height: 16px; margin: -8px 0 0 -8px; border: 2px solid #cbd5e1; border-top-color: var(--kac-accent); border-radius: 50%; animation: kac-spin .7s linear infinite; }

@keyframes kac-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes kac-spin { to { transform: rotate(360deg); } }
@media (max-width: 782px) {
    .kac-shell { margin: 18px 0; padding: 14px; }
    .kac-timer-bar { width: min(300px, 52vw); }
    .kac-timer-progress-only { width: min(420px, 72vw); }
}
@media (max-width: 600px) {
    .kac-shell { margin: 16px 0; padding: 12px; border-radius: min(var(--kac-radius), 14px); }
    .kac-theme-minimal { margin-block: 16px; padding: 6px 0 3px; }
    .kac-topline { align-items: center; flex-direction: column; }
    .kac-titles { align-items: center; text-align: center; }
    .kac-timer-wrap { align-items: center; justify-content: center; gap: 11px; }
    .kac-ring { flex-basis: 60px; width: 60px; height: 60px; }
    .kac-timer-bookring, .kac-bookring-meter { flex-basis: 54px; width: 54px; height: 54px; }
    .kac-bookring-core { width: 41px; height: 41px; }
    .kac-timer-bar { width: min(52vw, 260px); }
    .kac-timer-progress-only { width: min(100%, 78vw); }
    .kac-shell.kac-shell .kac-heading { font-size: 15px; }
    .kac-code-row, .kac-standalone-code { align-items: stretch; flex-direction: column; }
    .kac-code, .kac-copy { width: 100%; }
    .kac-completed-row { align-items: center; justify-content: center; flex-wrap: wrap; }
    .kac-next-button { flex-basis: 100%; width: 100%; margin-top: 2px; }
    .kac-display-simple { margin-block: 16px; padding: 14px 0; }
    .kac-display-simple .kac-timer-wrap { align-items: center; min-height: 64px; }
    .kac-display-simple .kac-next-button { width: min(100%, 280px); flex-basis: auto; }
    .kac-display-simple .kac-code-row { align-items: center; }
    .kac-display-simple .kac-code { width: min(100%, 320px); }
    .kac-display-simple .kac-copy { width: min(100%, 220px); }
    .kac-shell.kac-display-scroll_flow { margin-block: 20px; padding: 12px 0; }
    .kac-scroll-flow-bottom-result { padding: 20px 16px; }
    .kac-flow-gate, .kac-flow-next { max-width: 100%; }
}
@media (max-width: 380px) {
    .kac-timer-number { min-width: 68px; }
    .kac-timer-number .kac-seconds { font-size: 32px; }
    .kac-shell.kac-shell .kac-message { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
    .kac-shell, .kac-shell * { animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
    .kac-shell, .kac-code, .kac-reading-notice, .kac-inline-error { border: 1px solid CanvasText; }
    .kac-button, .kac-copy, .kac-retry { border: 1px solid ButtonText; }
    .kac-progress-bar, .kac-timer-bar-fill, .kac-step-progress .is-complete, .kac-step-progress .is-current { background: Highlight; }
}
