.sptt-panel [hidden],
.sptt-sheet[hidden],
.sptt-sheet [hidden] { display: none !important; }

.sptt-dim {
    position: fixed; inset: 0; z-index: 900;
    background: rgba(15, 23, 42, .55);
    opacity: 0; pointer-events: none;
    transition: opacity .2s ease;
}
.sptt-dim.is-on { opacity: 1; pointer-events: auto; }

.sptt-ring {
    position: fixed; z-index: 901;
    border-radius: 14px;
    border: 4px solid #2563eb;
    box-shadow: 0 0 0 100vmax rgba(15, 23, 42, .55);
    box-sizing: border-box;
    opacity: 0; pointer-events: none;
    transition: opacity .2s ease;
}
.sptt-ring.is-on { opacity: 1; }
.sptt-ring::after {
    content: ''; position: absolute; inset: -7px;
    border-radius: 18px; border: 3px solid #60a5fa;
    animation: spttPulse 1.4s ease-in-out infinite;
}
.sptt-ring.is-nodim { box-shadow: none; }
.sptt-ring.is-ok { border-color: #16a34a; }
.sptt-ring.is-ok::after { border-color: #4ade80; animation: none; opacity: .5; }
@keyframes spttPulse {
    0%, 100% { opacity: .9; transform: scale(1); }
    50%      { opacity: .15; transform: scale(1.03); }
}

.sptt-panel {
    --sptt-scale: 1;
    position: fixed; z-index: 902;
    box-sizing: border-box;
    width: calc(100% - 20px); max-width: 400px;
    left: 10px; bottom: 10px;
    max-height: 58vh; max-height: 58dvh;
    display: flex; flex-direction: column; overflow: hidden;
    background: #fff; border-radius: 1.1rem;
    padding: 0;
    box-shadow: 0 18px 40px -10px rgba(15, 23, 42, .45), 0 0 0 2px rgba(37, 99, 235, .25);
    opacity: 0; transform: translateY(14px); pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    font-family: inherit;
    -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
}
.sptt-panel.is-on { opacity: 1; transform: none; pointer-events: auto; }

.sptt-panel.is-center {
    left: 50%; top: 50%; bottom: auto;
    width: min(360px, calc(100% - 2rem));
    transform: translate(-50%, -46%);
    text-align: center;
    max-height: 82vh; max-height: 82dvh;
}
.sptt-panel.is-center.is-on { transform: translate(-50%, -50%); }

.sptt-head {
    flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: .5rem;
    padding: .7rem 1rem .35rem;
}
.sptt-eyebrow {
    font-size: calc(13px * var(--sptt-scale)); font-weight: 500; color: #1d4ed8;
    flex: 1 1 auto; min-width: 0; line-height: 1.25;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sptt-tools { flex: 0 0 auto; display: flex; gap: .35rem; }
.sptt-min {
    flex: 0 0 auto; min-height: 36px; padding: .15rem .65rem; border: 0; border-radius: 999px;
    background: #f1f5f9; color: #334155; font-size: 13px; font-weight: 500; cursor: pointer;
    touch-action: manipulation;
}
.sptt-min:active { background: #e2e8f0; }
.sptt-aa { font-size: 15px; min-width: 40px; }
.sptt-panel.is-center .sptt-tools { display: none; }
.sptt-panel.is-center .sptt-head { justify-content: center; }

.sptt-bar {
    flex: 0 0 auto; height: 6px; border-radius: 999px; background: #dbeafe;
    overflow: hidden; margin: 0 1rem .55rem;
}
.sptt-bar > span {
    display: block; height: 100%; border-radius: 999px;
    background: #2563eb; transition: width .3s ease;
}

.sptt-bodywrap {
    position: relative; flex: 1 1 auto; min-height: 0;
    display: flex; flex-direction: column;
}
.sptt-body {
    flex: 1 1 auto; min-height: 0; overflow-y: auto;
    -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y;
    padding: 0 1rem .35rem;
}
.sptt-title {
    margin: 0 0 .35rem; font-size: calc(19px * var(--sptt-scale)); font-weight: 600;
    line-height: 1.3; color: #0f172a;
}
.sptt-text {
    margin: 0 0 .55rem; font-size: calc(16px * var(--sptt-scale)); line-height: 1.55; color: #1e293b;
}
.sptt-list {
    margin: .1rem 0 .65rem; padding-left: 1.5rem;
    font-size: calc(16px * var(--sptt-scale)); line-height: 1.5; color: #1e293b; text-align: left;
}
.sptt-list li { padding-left: .15rem; margin: .22rem 0; }
.sptt-list li::marker { font-weight: 600; color: #2563eb; }
.sptt-panel.is-center .sptt-list { width: fit-content; max-width: 100%; margin-left: auto; margin-right: auto; box-sizing: border-box; }

.sptt-hint {
    margin: 0 0 .45rem; padding: .6rem .75rem;
    font-size: calc(17px * var(--sptt-scale)); font-weight: 500; line-height: 1.35;
    color: #1e3a8a; background: #dbeafe; border-radius: .75rem;
}
.sptt-hint.is-wait { color: #92400e; background: #fef3c7; }

.sptt-panel.is-compact .sptt-text,
.sptt-panel.is-compact .sptt-list { display: none; }
.sptt-panel.is-compact.is-info .sptt-text {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
    overflow: hidden;
}

.sptt-panel.is-compact.is-info.is-big .sptt-text { display: none; }

.sptt-more {
    position: absolute; left: 0; right: 0; bottom: 0; height: 34px;
    display: flex; align-items: flex-end; justify-content: center; padding-bottom: 2px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 75%);
    font-size: 13px; font-weight: 500; color: #1d4ed8;
    opacity: 0; pointer-events: none; transition: opacity .15s ease;
}
.sptt-panel.has-more .sptt-more { opacity: 1; }

.sptt-actions {
    flex: 0 0 auto;
    display: flex; flex-direction: column; gap: .35rem;
    padding: .4rem 1rem .75rem;
}
.sptt-btn {
    width: 100%; min-height: 52px; border: 0; border-radius: .85rem;
    background: #2563eb; color: #fff; font-size: calc(17px * var(--sptt-scale)); font-weight: 600;
    cursor: pointer; touch-action: manipulation;
}
.sptt-btn:active { background: #1d4ed8; }
.sptt-row2 { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.sptt-ghost {
    flex: 1 1 auto; min-height: 46px; padding: .3rem .8rem; border: 2px solid #bfdbfe; border-radius: .8rem;
    background: #fff; color: #1d4ed8; font-size: calc(15px * var(--sptt-scale)); font-weight: 600;
    cursor: pointer; touch-action: manipulation;
}
.sptt-ghost:active { background: #eff6ff; }
.sptt-skip {
    flex: 0 0 auto; min-height: 46px; padding: .2rem .6rem;
    background: none; border: 0; cursor: pointer; touch-action: manipulation;
    font-size: calc(14px * var(--sptt-scale)); font-weight: 500; color: #475569;
    text-decoration: underline; text-underline-offset: 3px;
}
.sptt-row2 .sptt-skip:only-child { margin-left: auto; }
.sptt-panel.is-center .sptt-row2 { justify-content: center; }

.sptt-panel.is-min {
    width: auto !important; max-height: none !important; min-width: 0;
    border-radius: 999px; cursor: pointer;
    box-shadow: 0 8px 20px -4px rgba(15, 23, 42, .45), 0 0 0 2px #2563eb;
}
.sptt-panel.is-min .sptt-eyebrow,
.sptt-panel.is-min .sptt-bar,
.sptt-panel.is-min .sptt-bodywrap,
.sptt-panel.is-min .sptt-actions,
.sptt-panel.is-min .sptt-aa { display: none; }
.sptt-panel.is-min .sptt-head { padding: .3rem .4rem; }
.sptt-panel.is-min .sptt-min { background: #2563eb; color: #fff; min-height: 44px; padding: .2rem 1rem; font-size: 14px; }

.sptt-panel.is-ok { box-shadow: 0 18px 40px -10px rgba(22, 163, 74, .45), 0 0 0 3px #16a34a; }
.sptt-panel.is-ok .sptt-title { color: #15803d; }
.sptt-panel.is-ok .sptt-eyebrow { color: #16a34a; }
.sptt-panel.is-ok .sptt-bar > span { background: #16a34a; }

.sptt-sheet {
    --sptt-scale: 1;
    position: fixed; inset: 0; z-index: 904;
    display: flex; align-items: flex-end; justify-content: center;
    background: rgba(15, 23, 42, .6);
}
.sptt-sheet__card {
    box-sizing: border-box; width: 100%; max-width: 440px;
    max-height: 88vh; max-height: 88dvh;
    display: flex; flex-direction: column; gap: .6rem;
    background: #fff; border-radius: 1.25rem 1.25rem 0 0;
    padding: 1rem 1.1rem calc(1rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -12px 40px -8px rgba(15, 23, 42, .45);
}
.sptt-sheet__eyebrow { flex: 0 0 auto; font-size: calc(13px * var(--sptt-scale)); font-weight: 500; color: #1d4ed8; }
.sptt-sheet__body {
    flex: 1 1 auto; min-height: 0; overflow-y: auto;
    -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y;
}
.sptt-sheet__title { margin: 0 0 .5rem; font-size: calc(22px * var(--sptt-scale)); font-weight: 600; line-height: 1.3; color: #0f172a; }
.sptt-sheet__text  { margin: 0 0 .6rem; font-size: calc(19px * var(--sptt-scale)); line-height: 1.6; color: #0f172a; }
.sptt-sheet__list  { margin: 0 0 .4rem; padding-left: 1.6rem; font-size: calc(19px * var(--sptt-scale)); line-height: 1.55; color: #0f172a; }
.sptt-sheet__list li { margin: .35rem 0; padding-left: .15rem; }
.sptt-sheet__list li::marker { font-weight: 600; color: #2563eb; }
.sptt-sheet__tools { flex: 0 0 auto; display: flex; gap: .5rem; }
.sptt-sheet .sptt-btn { flex: 0 0 auto; }

.sptt-fab {
    position: fixed; right: 1rem; bottom: 5.25rem; z-index: 850;
    width: 3.1rem; height: 3.1rem; border-radius: 999px; border: 0;
    background: #0f172a; color: #fff; font-size: 20px; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 20px -4px rgba(15, 23, 42, .45); cursor: pointer;
}
.sptt-fab:active { transform: scale(.94); }
body.sptt-on .sptt-fab { display: none; }
body:has(input:focus, textarea:focus, select:focus) .sptt-fab { display: none; }

.sptt-toast {
    position: fixed; left: 50%; bottom: 6rem; z-index: 905;
    transform: translate(-50%, 8px); opacity: 0;
    max-width: 88vw; padding: .75rem 1.1rem; border-radius: 999px;
    background: #0f172a; color: #fff; font-size: 15px; text-align: center;
    box-shadow: 0 8px 20px -6px rgba(15, 23, 42, .4);
    transition: opacity .2s ease, transform .2s ease; pointer-events: none;
}
.sptt-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
    .sptt-ring::after { animation: none; }
    .sptt-panel, .sptt-ring, .sptt-dim { transition: none; }
}

.content { overflow-anchor: none; }

.sptt-ring.is-over  { z-index: 1301; }
.sptt-panel.is-over { z-index: 1302; }

.sptt-panel.is-tight .sptt-bar,
.sptt-panel.is-tight .sptt-text,
.sptt-panel.is-tight .sptt-list,
.sptt-panel.is-tight .sptt-more { display: none; }
.sptt-panel.is-tight .sptt-head { padding: .45rem .8rem .2rem; }
.sptt-panel.is-tight .sptt-eyebrow { font-size: calc(12px * var(--sptt-scale)); }
.sptt-panel.is-tight .sptt-min { min-height: 30px; padding: .1rem .55rem; font-size: 12px; }
.sptt-panel.is-tight .sptt-body { padding: 0 .8rem .15rem; }
.sptt-panel.is-tight .sptt-title { margin: 0 0 .2rem; font-size: calc(16px * var(--sptt-scale)); }
.sptt-panel.is-tight .sptt-hint { margin: 0 0 .2rem; padding: .35rem .6rem; font-size: calc(14.5px * var(--sptt-scale)); }
.sptt-panel.is-tight .sptt-actions { padding: .15rem .8rem .5rem; gap: .25rem; }
.sptt-panel.is-tight .sptt-btn { min-height: 42px; font-size: calc(15px * var(--sptt-scale)); }
.sptt-panel.is-tight .sptt-ghost { min-height: 38px; font-size: calc(14px * var(--sptt-scale)); }
.sptt-panel.is-tight .sptt-skip { min-height: 38px; }

body:has(.modal-backdrop:not([hidden]), .spp-modal-backdrop) .sptt-fab { display: none; }