/* ╔════════════════════════════════════════════════════════════════════════╗
   ║  PF_EntWheel.css – Shell + Interaktion                                 ║
   ║  Autor: Franz PFuisi  |  PFWS-System: 1.4.1.3.32                       ║
   ║  Aktualisiert: 2026-05-08  |  Breakpoint: nur max-width: 768px         ║
   ╚════════════════════════════════════════════════════════════════════════╝ */

.pf-entwheel-layout-wrapper {
    --pf-entwheel-bg: #f4f8fc;
    --pf-entwheel-surface: rgba(255, 255, 255, 0.92);
    --pf-entwheel-surface-strong: rgba(255, 255, 255, 0.98);
    --pf-entwheel-surface-soft: rgba(15, 23, 42, 0.05);
    --pf-entwheel-border: rgba(148, 163, 184, 0.24);
    --pf-entwheel-text: #0f172a;
    --pf-entwheel-text-soft: #475569;
    --pf-entwheel-accent: #38bdf8;
    --pf-entwheel-accent-strong: #f59e0b;
    --pf-entwheel-success: #22c55e;
    --pf-entwheel-danger: #ef4444;
    --pf-entwheel-shell-from: #FF5A5F;
    --pf-entwheel-shell-to: #FFB300;
    --pf-entwheel-shell-gradient: linear-gradient(135deg, #FF5A5F 0%, #FF7A3D 42%, #FFB300 100%);
    position: relative;
    width: 100%;
    display: block;
}

.pf-entwheel-topnav-spacer {
    height: var(--pf-dashboard-topnav-height, 60px);
    margin-top: 0;
    width: 100%;
    pointer-events: none;
    flex-shrink: 0;
}

.pf-entwheel-box {
    position: relative;
    width: 100%;
    max-width: min(1600px, 95vw);
    margin: 0 auto;
    border-radius: 28px;
    overflow: hidden;
}

.pf-entwheel-box.overlay-mode {
    /* Größe & border-radius kommen vom Overlay-Framework (.pf-module-shell .overlay-mode) */
    margin: 0;
}

.pf-entwheel-app,
.pf-entwheel-module {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.pf-entwheel-box.overlay-mode .pf-entwheel-app,
.pf-entwheel-box.overlay-mode .pf-entwheel-module {
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.pf-entwheel-header,
.pf-entwheel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 18px;
    position: relative;
    z-index: 5;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.96);
    overflow: hidden;
    transition: transform 0.24s ease, opacity 0.24s ease, padding 0.24s ease;
}

.pf-entwheel-header {
    position: sticky;
    top: 0;
    background: var(--pf-entwheel-shell-gradient);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: none;
    overflow: visible;
}

.pf-entwheel-header-compact-logo {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.14) 100%);
    box-shadow: 0 6px 14px rgba(8, 17, 31, 0.25);
    cursor: pointer;
    position: absolute;
    left: auto;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
}

.pf-entwheel-header-compact-logo-image {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    object-fit: contain;
}

.pf-entwheel-tooltip-anchor {
    position: relative;
}

.pf-entwheel-tooltip-anchor::after {
    content: attr(data-pf-tooltip);
    position: absolute;
    left: 50%;
    top: calc(100% + 8px);
    transform: translateX(-50%) translateY(-4px);
    padding: 7px 10px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.94);
    color: #f8fafc;
    font-size: 0.74rem;
    font-weight: 700;
    white-space: normal;
    min-width: 84px;
    max-width: min(220px, calc(100vw - 24px));
    text-align: center;
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 40;
}

.pf-entwheel-tooltip-anchor::before {
    content: '';
    position: absolute;
    left: 50%;
    top: calc(100% + 3px);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid rgba(15, 23, 42, 0.94);
    transform: translateX(-50%) translateY(-4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 40;
}

.pf-entwheel-tooltip-left::after {
    left: 0;
    right: auto;
    transform: translateY(-4px);
}

.pf-entwheel-tooltip-left::before {
    left: 14px;
    transform: translateY(-4px);
}

.pf-entwheel-tooltip-right::after {
    left: auto;
    right: 0;
    transform: translateY(-4px);
}

.pf-entwheel-tooltip-right::before {
    left: auto;
    right: 14px;
    transform: translateY(-4px);
}

.pf-entwheel-tooltip-anchor:hover::after,
.pf-entwheel-tooltip-anchor:focus-visible::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.pf-entwheel-tooltip-anchor:hover::before,
.pf-entwheel-tooltip-anchor:focus-visible::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.pf-entwheel-tooltip-left:hover::after,
.pf-entwheel-tooltip-left:focus-visible::after,
.pf-entwheel-tooltip-right:hover::after,
.pf-entwheel-tooltip-right:focus-visible::after {
    transform: translateY(0);
}

.pf-entwheel-tooltip-left:hover::before,
.pf-entwheel-tooltip-left:focus-visible::before,
.pf-entwheel-tooltip-right:hover::before,
.pf-entwheel-tooltip-right:focus-visible::before {
    transform: translateY(0);
}

/* Fine-tuned header tooltip offsets */
.pf-entwheel-tooltip-drag::after {
    left: 0;
    right: auto;
    min-width: 126px;
    text-align: left;
}

.pf-entwheel-tooltip-info::after {
    left: 0;
    right: auto;
    min-width: 98px;
    text-align: left;
}

.pf-entwheel-tooltip-profile::after {
    left: auto;
    right: 0;
    min-width: 92px;
}

.pf-entwheel-tooltip-dashboard::after {
    left: auto;
    right: 0;
    min-width: 138px;
}

.pf-entwheel-tooltip-reveal::after {
    left: auto;
    right: 0;
    top: calc(100% + 10px);
    min-width: 156px;
}

@media (hover: none) {
    .pf-entwheel-tooltip-anchor::before,
    .pf-entwheel-tooltip-anchor::after {
        display: none;
    }
}

.pf-entwheel-footer {
    position: sticky;
    bottom: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr);
    background: var(--pf-entwheel-shell-gradient);
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 -8px 22px rgba(255, 122, 61, 0.22);
    margin-top: auto;
    flex: 0 0 auto;
    padding: 8px 18px;
    overflow: hidden;
}

/* ── Header/Footer pseudo-element animations ───────────────────────────── */
/* ::before — Farbwelle via background-position */
.pf-entwheel-header::before,
.pf-entwheel-footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(135deg, #FF5A5F 0%, #FF7A3D 40%, #FFB300 75%, #FF5A5F 100%);
    background-size: 300% 300%;
    background-position: 0% 50%;
    z-index: -1;
    pointer-events: none;
    animation: pf-entwheel-wave 9s ease-in-out infinite;
}

/* ::after — Shimmer-Glanzlicht, nur opacity */
.pf-entwheel-header::after,
.pf-entwheel-footer::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.pf-entwheel-header::after {
    background: radial-gradient(ellipse 80% 120% at 20% 30%, rgba(255, 255, 255, 0.58) 0%, rgba(255, 255, 255, 0.18) 50%, transparent 72%);
    animation: pf-entwheel-shimmer 7s ease-in-out infinite;
}

.pf-entwheel-footer::after {
    background: radial-gradient(ellipse 70% 140% at 78% 60%, rgba(255, 255, 255, 0.36) 0%, rgba(255, 255, 255, 0.10) 48%, transparent 70%);
    animation: pf-entwheel-shimmer 7s ease-in-out infinite reverse;
}

@keyframes pf-entwheel-wave {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pf-entwheel-shimmer {
    0%, 100% { opacity: 0.45; }
    50%       { opacity: 1; }
}

/* ── FX-Ausschalter — satt, nicht blass ─────────────────────────────────── */
.pf-entwheel-box.is-footer-fx-off .pf-entwheel-header,
.pf-entwheel-box.is-footer-fx-off .pf-entwheel-footer {
    background: linear-gradient(135deg, #FF3040 0%, #FF5E00 45%, #FFA800 100%);
}

.pf-entwheel-box.is-footer-fx-off .pf-entwheel-header::before,
.pf-entwheel-box.is-footer-fx-off .pf-entwheel-footer::before {
    animation: none !important;
}

.pf-entwheel-box.is-footer-fx-off .pf-entwheel-header::after,
.pf-entwheel-box.is-footer-fx-off .pf-entwheel-footer::after {
    animation: none !important;
    opacity: 0.7;
}

.pf-entwheel-header-left,
.pf-entwheel-header-right,
.pf-entwheel-footer-left,
.pf-entwheel-footer-right {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
    min-width: 0;
}

.pf-entwheel-footer-center {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    position: relative;
    z-index: 1;
    font-weight: 600;
    text-align: center;
}

.pf-entwheel-drag-handle,
.pf-entwheel-icon-wrapper,
.pf-entwheel-footer-icon,
.pf-entwheel-button-icon,
.pf-entwheel-section-icon,
.pf-entwheel-stat-icon,
.pf-entwheel-inline-icon,
.pf-entwheel-meta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pf-entwheel-drag-handle,
.pf-entwheel-icon-wrapper {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.1) 100%);
    border: 1px solid rgba(255, 255, 255, 0.32);
    box-shadow: 0 3px 10px rgba(125, 41, 24, 0.18);
}

.pf-entwheel-icon-wrapper {
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 2px 6px rgba(125, 41, 24, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.pf-entwheel-icon-wrapper:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, rgba(255,255,255,0.34) 0%, rgba(255,255,255,0.16) 100%);
}

.pf-entwheel-drag-handle svg,
.pf-entwheel-icon svg,
.pf-entwheel-footer-icon svg,
.pf-entwheel-button-icon svg,
.pf-entwheel-section-icon svg,
.pf-entwheel-stat-icon svg,
.pf-entwheel-inline-icon svg,
.pf-entwheel-meta-icon svg {
    width: 20px;
    height: 20px;
}

.pf-entwheel-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    line-height: 0;
}

.pf-entwheel-icon svg {
    width: 28px;
    height: 28px;
}

.pf-entwheel-title-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pf-entwheel-title {
    margin: 0;
    color: #ffffff;
    font-size: clamp(1.05rem, 1.3vw, 1.35rem);
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.2;
    padding-bottom: 0.06em;
}

.pf-entwheel-meta,
.pf-entwheel-user-name {
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.8rem;
}

.pf-entwheel-user-pill,
.pf-entwheel-footer-module,
.pf-entwheel-footer-meta,
.pf-entwheel-eyebrow,
.pf-entwheel-hero-stat {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.pf-entwheel-user-pill {
    padding: 3px 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 100%);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 1px 4px rgba(8, 17, 31, 0.12);
    cursor: pointer;
}

.pf-entwheel-user-avatar {
    position: relative;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    overflow: hidden;
    background: #ffffff;
    color: #08111f;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9), 0 1px 4px rgba(8, 17, 31, 0.16);
    cursor: pointer;
}

.pf-entwheel-user-avatar.is-fallback {
    background: linear-gradient(135deg, #38bdf8 0%, #f59e0b 100%);
}

.pf-entwheel-avatar-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.2);
    transform-origin: center;
}

.pf-entwheel-avatar-fallback {
    position: relative;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.pf-entwheel-user-avatar.is-fallback .pf-entwheel-avatar-image {
    display: none;
}

.pf-entwheel-user-avatar.is-fallback .pf-entwheel-avatar-fallback {
    opacity: 1;
}

.pf-entwheel-bubu-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 7px;
    border-radius: 999px;
    font-size: 0.74rem;
    line-height: 1;
    color: rgba(255, 255, 255, 0.96);
    background: linear-gradient(135deg, rgba(233, 71, 150, 0.42) 0%, rgba(102, 126, 234, 0.32) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.pf-entwheel-bubu-icon {
    font-size: 0.82rem;
}

.pf-entwheel-bubu-value {
    min-width: 0.9em;
}

.pf-entwheel-btn,
.pf-entwheel-action-btn,
.pf-entwheel-spin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 14px;
    padding: 11px 16px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.pf-entwheel-btn:hover,
.pf-entwheel-action-btn:hover,
.pf-entwheel-spin-btn:hover {
    transform: translateY(-1px);
}

.pf-entwheel-btn-small {
    min-height: 34px;
    padding: 6px 10px;
    gap: 8px;
}

.pf-entwheel-btn-dashboard {
    color: rgba(255, 255, 255, 0.93);
    background: rgba(8, 17, 31, 0.28);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px) saturate(130%);
    -webkit-backdrop-filter: blur(8px) saturate(130%);
    transition: background 0.22s ease, border-color 0.22s ease;
}

.pf-entwheel-btn-dashboard:hover {
    background: rgba(8, 17, 31, 0.42);
    border-color: rgba(255, 255, 255, 0.34);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.pf-entwheel-dashboard-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.pf-entwheel-dashboard-trigger {
    min-width: 0;
}

.pf-entwheel-dashboard-submenu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 210px;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.34);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 14px 30px rgba(8, 17, 31, 0.24);
    z-index: 48;
}

.pf-entwheel-dashboard-submenu::before,
.pf-entwheel-dashboard-submenu::after {
    content: '';
    position: absolute;
    right: 18px;
    width: 0;
    height: 0;
    pointer-events: none;
}

.pf-entwheel-dashboard-submenu::before {
    top: -9px;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 9px solid rgba(148, 163, 184, 0.34);
}

.pf-entwheel-dashboard-submenu::after {
    top: -8px;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 8px solid rgba(255, 255, 255, 0.98);
}

.pf-entwheel-dashboard-submenu-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 9px 11px;
    border-radius: 9px;
    text-decoration: none;
    color: #0f172a;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    transition: background 0.16s ease, color 0.16s ease;
}

.pf-entwheel-dashboard-submenu-item:hover,
.pf-entwheel-dashboard-submenu-item:focus-visible {
    background: linear-gradient(135deg, rgba(255, 122, 61, 0.16) 0%, rgba(255, 179, 0, 0.24) 100%);
    color: #9a3412;
}

.pf-entwheel-dashboard-submenu-switch {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    background: rgba(248, 250, 252, 0.72);
    cursor: pointer;
}

.pf-entwheel-dashboard-submenu-switch-label {
    font-weight: 700;
}

.pf-entwheel-dashboard-submenu-switch-ui {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pf-entwheel-dashboard-submenu-switch-state {
    min-width: 30px;
    text-align: center;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    border-radius: 999px;
    padding: 2px 7px;
    color: #065f46;
    background: rgba(16, 185, 129, 0.2);
}

.pf-entwheel-dashboard-submenu-switch-track {
    width: 34px;
    height: 18px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.2);
    background: rgba(148, 163, 184, 0.28);
    padding: 2px;
    display: inline-flex;
    align-items: center;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.pf-entwheel-dashboard-submenu-switch-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
    transform: translateX(0);
    transition: transform 0.22s ease;
}

.pf-entwheel-dashboard-submenu-switch[aria-checked="true"] .pf-entwheel-dashboard-submenu-switch-track {
    background: rgba(16, 185, 129, 0.28);
    border-color: rgba(5, 150, 105, 0.5);
}

.pf-entwheel-dashboard-submenu-switch[aria-checked="true"] .pf-entwheel-dashboard-submenu-switch-dot {
    transform: translateX(16px);
}

.pf-entwheel-box.is-footer-fx-off .pf-entwheel-dashboard-submenu-switch-state {
    color: #9f1239;
    background: rgba(244, 63, 94, 0.18);
}

.pf-entwheel-box.is-footer-fx-off .pf-entwheel-dashboard-submenu-switch-track {
    background: rgba(244, 63, 94, 0.16);
    border-color: rgba(190, 24, 93, 0.48);
}

.pf-entwheel-box.is-footer-fx-off .pf-entwheel-dashboard-submenu-switch-dot {
    transform: translateX(0);
}

.pf-entwheel-dashboard-menu.is-open .pf-entwheel-btn-dashboard {
    background: rgba(8, 17, 31, 0.42);
    border-color: rgba(255, 179, 0, 0.48);
    box-shadow: 0 0 0 2px rgba(255, 179, 0, 0.32), 0 4px 14px rgba(8, 17, 31, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.pf-entwheel-dashboard-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    overflow: visible;
}

.pf-entwheel-dashboard-logo {
    display: block;
    width: 18px;
    height: 18px;
    object-fit: contain;
    transform: scale(1);
    transform-origin: center;
    filter: drop-shadow(0 1px 2px rgba(8, 17, 31, 0.22));
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.25s ease;
}

.pf-entwheel-btn-dashboard:hover .pf-entwheel-dashboard-logo {
    transform: scale(1.25) rotate(18deg);
    filter: drop-shadow(0 2px 6px rgba(255, 179, 0, 0.55));
}

.pf-entwheel-dashboard-label,
.pf-entwheel-user-name {
    font-size: 0.75rem;
    line-height: 1.1;
}

.pf-entwheel-info-section {
    padding: 24px;
    background: linear-gradient(180deg, rgba(243, 248, 253, 0.98) 0%, rgba(236, 244, 252, 0.96) 100%);
    border-bottom: 1px solid rgba(203, 213, 225, 0.9);
    max-height: min(48vh, 420px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #FFB300 rgba(245, 158, 11, 0.08);
}

.pf-entwheel-info-section[hidden] {
    display: none !important;
}

.pf-entwheel-info-section::-webkit-scrollbar {
    width: 8px;
}

.pf-entwheel-info-section::-webkit-scrollbar-track {
    background: rgba(245, 158, 11, 0.08);
    border-radius: 999px;
}

.pf-entwheel-info-section::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #FFB300 0%, #FF7A3D 100%);
    border-radius: 999px;
    border: 2px solid rgba(238, 244, 251, 0.9);
}

.pf-entwheel-stage-toolbar,
.pf-entwheel-stage-actions,
.pf-entwheel-settings-layout,
.pf-entwheel-pointer-switch {
    display: flex;
    gap: 14px;
}

.pf-entwheel-stage-card-focus {
    max-width: 100%;
    margin: 0 auto;
    padding: 16px;
}

.pf-entwheel-stage-editor {
    display: grid;
    grid-template-columns: minmax(260px, 1.15fr) minmax(320px, 1.45fr) minmax(180px, 0.7fr);
    gap: 12px;
    margin-bottom: 14px;
}

.pf-entwheel-stage-step {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: start;
    min-height: 96px;
    padding: 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(203, 213, 225, 0.82);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.pf-entwheel-stage-step-index {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #9a3412;
    font-weight: 900;
    background: linear-gradient(135deg, rgba(255, 122, 61, 0.14) 0%, rgba(255, 179, 0, 0.2) 100%);
    border: 1px solid rgba(251, 191, 36, 0.22);
}

.pf-entwheel-stage-step-content {
    display: grid;
    gap: 5px;
}

.pf-entwheel-stage-step-head,
.pf-entwheel-stage-status-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.pf-entwheel-step-help {
    position: relative;
    width: 20px;
    height: 20px;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 122, 61, 0.12);
    color: #9a3412;
    font: inherit;
    font-size: 0.7rem;
    font-weight: 800;
    cursor: help;
}

.pf-entwheel-step-tooltip {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(260px, 72vw);
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.94);
    color: #f8fafc;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.45;
    text-align: left;
    box-shadow: 0 18px 34px rgba(2, 6, 23, 0.28);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 8;
}

.pf-entwheel-step-help:hover .pf-entwheel-step-tooltip,
.pf-entwheel-step-help:focus-visible .pf-entwheel-step-tooltip {
    opacity: 1;
    transform: translateY(0);
}

.pf-entwheel-stage-question-template-shell,
.pf-entwheel-stage-answer-shell {
    min-width: 0;
}

.pf-entwheel-stage-question-shell {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 4px 6px 4px 8px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(203, 213, 225, 0.9);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.pf-entwheel-stage-template-trigger {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 0 12px 12px 0;
    background: linear-gradient(135deg, #38bdf8 0%, #f59e0b 100%);
    color: #08111f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.pf-entwheel-stage-template-trigger:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 10px 20px rgba(14, 165, 233, 0.18);
    color: #08111f;
}

.pf-entwheel-stage-template-trigger:focus-visible {
    outline: none;
    color: #08111f;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.22), 0 10px 20px rgba(14, 165, 233, 0.18);
}

.pf-entwheel-stage-template-trigger .pf-entwheel-step-tooltip {
    position: absolute;
    left: calc(100% + 10px);
    right: auto;
    top: 50%;
    min-width: 240px;
    max-width: min(300px, calc(100vw - 24px));
    z-index: 30;
    pointer-events: none;
    transform: translateX(-6px) translateY(-50%);
}

.pf-entwheel-stage-template-trigger:hover .pf-entwheel-step-tooltip,
.pf-entwheel-stage-template-trigger:focus-visible .pf-entwheel-step-tooltip {
    opacity: 1;
    transform: translateX(0) translateY(-50%);
}

@media (max-width: 768px) {
    .pf-entwheel-stage-template-trigger .pf-entwheel-step-tooltip {
        left: auto;
        right: 0;
        top: calc(100% + 8px);
        min-width: 230px;
        max-width: min(280px, calc(100vw - 20px));
        transform: translateY(-4px);
    }

    .pf-entwheel-stage-template-trigger:hover .pf-entwheel-step-tooltip,
    .pf-entwheel-stage-template-trigger:focus-visible .pf-entwheel-step-tooltip {
        transform: translateY(0);
    }
}

.pf-entwheel-stage-question-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 12px;
    color: #9a3412;
    background: linear-gradient(135deg, rgba(255, 122, 61, 0.12) 0%, rgba(255, 179, 0, 0.18) 100%);
}

.pf-entwheel-stage-inline-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #9a3412;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1;
}

.pf-entwheel-stage-question-input {
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--pf-entwheel-text);
    font: inherit;
    font-size: 0.94rem;
    font-weight: 600;
}

.pf-entwheel-stage-question-input:focus {
    outline: none;
}

.pf-entwheel-stage-question-input::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.pf-entwheel-stage-question-hint {
    margin: 0;
    color: var(--pf-entwheel-text-soft);
    font-size: 0.98rem;
    line-height: 1.4;
}

.pf-entwheel-stage-title,
.pf-entwheel-panel-dialog-title {
    margin: 0;
    color: var(--pf-entwheel-text);
    font-size: clamp(1.3rem, 1.6vw, 1.8rem);
    line-height: 1.1;
}

.pf-entwheel-stage-subtitle,
.pf-entwheel-pointer-hint {
    color: var(--pf-entwheel-text-soft);
    line-height: 1.6;
}

.pf-entwheel-stage-actions {
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
}

.pf-entwheel-stage-step-action .pf-entwheel-stage-step-content {
    gap: 8px;
    height: 100%;
}

.pf-entwheel-stage-step-action .pf-entwheel-stage-actions,
.pf-entwheel-stage-step-action .pf-entwheel-spin-btn {
    height: 100%;
}

.pf-entwheel-stage-step-action .pf-entwheel-spin-btn {
    width: 100%;
    min-height: 100%;
    min-height: 44px;
    font-size: 0.96rem;
}

.pf-entwheel-stage-main {
    display: block;
    width: 100%;
    grid-column: 1 / -1;
    margin-bottom: 12px;
}

.pf-entwheel-stage-actions .pf-entwheel-spin-btn {
    color: #ffffff;
    background: linear-gradient(135deg, #ff7a3d 0%, #ff9f1c 46%, #ffb300 100%);
    box-shadow: 0 18px 32px rgba(255, 122, 61, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.pf-entwheel-stage-actions .pf-entwheel-spin-btn:hover {
    box-shadow: 0 22px 36px rgba(255, 122, 61, 0.34);
}

.pf-entwheel-panel-toggle {
    color: var(--pf-entwheel-text);
    background: rgba(248, 250, 252, 0.98);
    border: 1px solid rgba(203, 213, 225, 0.9);
}

.pf-entwheel-panel-overlay {
    position: fixed;
    inset: 0;
    z-index: 420;
    display: grid;
    place-items: center;
    padding: 24px;
}

.pf-entwheel-panel-overlay[hidden] {
    display: none !important;
}

.pf-entwheel-result-overlay {
    position: fixed;
    inset: 0;
    z-index: 430;
    display: grid;
    place-items: center;
    padding: 24px;
    opacity: 1;
    transition: opacity 0.2s ease-in;
}

.pf-entwheel-app.is-result-open .pf-entwheel-result-overlay,
.pf-entwheel-app.is-result-open .pf-entwheel-result-overlay .pf-entwheel-panel-backdrop {
    opacity: 1;
}

.pf-entwheel-app.is-result-open .pf-entwheel-result-dialog {
    opacity: 0;
    transform: scale(0.5);
    animation: pf-entwheel-result-dialog-pop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.pf-entwheel-result-overlay[hidden] {
    display: none !important;
}

.pf-entwheel-panel-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 14, 26, 0.64);
    backdrop-filter: blur(42px) saturate(0.9) contrast(0.78) brightness(0.52);
    -webkit-backdrop-filter: blur(42px) saturate(0.9) contrast(0.78) brightness(0.52);
}

.pf-entwheel-panel-backdrop::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.08), transparent 46%),
        radial-gradient(circle at 82% 88%, rgba(148, 163, 184, 0.12), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(2, 6, 14, 0.14));
}

/* Auch im Overlay-Mode sollen alle EntWheel-Overlays ihren eigenen Frost-Backdrop haben. */
.pf-entwheel-box.overlay-mode .pf-entwheel-panel-overlay .pf-entwheel-panel-backdrop,
.pf-entwheel-box.overlay-mode .pf-entwheel-result-overlay .pf-entwheel-panel-backdrop {
    background: rgba(8, 14, 26, 0.64);
    backdrop-filter: blur(42px) saturate(0.9) contrast(0.78) brightness(0.52);
    -webkit-backdrop-filter: blur(42px) saturate(0.9) contrast(0.78) brightness(0.52);
}

.pf-entwheel-panel-dialog {
    position: relative;
    z-index: 1;
    width: min(1040px, 100%);
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 28px 64px rgba(15, 23, 42, 0.22);
}

.pf-entwheel-result-dialog {
    width: min(720px, 100%);
    border-radius: 26px;

    box-shadow: 0 32px 88px rgba(15, 23, 42, 0.26);
}

.pf-entwheel-panel-dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px 0;
}

.pf-entwheel-panel-dialog-copy {
    display: grid;
    gap: 10px;
}

.pf-entwheel-result-dialog .pf-entwheel-panel-dialog-copy {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.pf-entwheel-result-dialog .pf-entwheel-panel-dialog-copy .pf-entwheel-eyebrow {
    grid-column: auto;
}

.pf-entwheel-result-dialog .pf-entwheel-panel-dialog-copy .pf-entwheel-result-loader {
    width: 26px;
    height: 26px;
}

.pf-entwheel-result-dialog .pf-entwheel-panel-dialog-copy .pf-entwheel-result-loader-core,
.pf-entwheel-result-dialog .pf-entwheel-panel-dialog-copy .pf-entwheel-result-loader-ring,
.pf-entwheel-result-dialog .pf-entwheel-panel-dialog-copy .pf-entwheel-result-loader-ring svg {
    width: 26px;
    height: 26px;
}

.pf-entwheel-result-dialog .pf-entwheel-panel-dialog-copy .pf-entwheel-result-loader-check {
    font-size: 14px;
}

.pf-entwheel-panel-dialog-body {
    padding: 24px;
    overflow: auto;
    background:
        radial-gradient(circle at top left, rgba(224, 242, 254, 0.58), rgba(255, 255, 255, 0.98) 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(248, 250, 252, 0.96) 100%);
}

.pf-entwheel-result-dialog .pf-entwheel-panel-dialog-body {
    overflow-x: hidden;
    overflow-y: auto;
}

.pf-entwheel-panel-dialog-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 24px;
    border-top: 1px solid rgba(203, 213, 225, 0.76);
    color: #475569;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.pf-entwheel-panel-overlay .pf-entwheel-panel-dialog-header,
.pf-entwheel-result-overlay .pf-entwheel-panel-dialog-header {
    border-bottom: 0;
    background: linear-gradient(135deg, #ea580c 0%, #f97316 56%, #fb923c 100%);
}

.pf-entwheel-panel-overlay .pf-entwheel-panel-dialog-title,
.pf-entwheel-result-overlay .pf-entwheel-panel-dialog-title {
    color: #ffffff;
    line-height: 1.2;
    text-shadow: 0 1px 0 rgba(124, 45, 18, 0.24);
}

.pf-entwheel-panel-overlay .pf-entwheel-eyebrow,
.pf-entwheel-result-overlay .pf-entwheel-eyebrow {
    color: #fff7ed;
}

.pf-entwheel-panel-overlay .pf-entwheel-eyebrow .pf-entwheel-section-icon,
.pf-entwheel-panel-overlay .pf-entwheel-eyebrow .pf-entwheel-section-icon svg,
.pf-entwheel-result-overlay .pf-entwheel-eyebrow .pf-entwheel-section-icon,
.pf-entwheel-result-overlay .pf-entwheel-eyebrow .pf-entwheel-section-icon svg {
    color: #ffffff;
}

.pf-entwheel-panel-overlay .pf-entwheel-panel-close,
.pf-entwheel-result-overlay .pf-entwheel-panel-close {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.26) 0%, rgba(255, 255, 255, 0.14) 100%);
    border: 1px solid rgba(255, 255, 255, 0.52);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(124, 45, 18, 0.22);
}

.pf-entwheel-panel-overlay .pf-entwheel-panel-close:hover,
.pf-entwheel-result-overlay .pf-entwheel-panel-close:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0.22) 100%);
    border-color: rgba(255, 255, 255, 0.78);
    box-shadow: 0 11px 22px rgba(124, 45, 18, 0.28);
}

.pf-entwheel-panel-overlay .pf-entwheel-panel-dialog-footer,
.pf-entwheel-result-overlay .pf-entwheel-panel-dialog-footer {
    background: linear-gradient(135deg, #ea580c 0%, #f97316 56%, #fb923c 100%);
    border-top: 0;
    color: #fff7ed;
}

.pf-entwheel-panel-overlay .pf-entwheel-panel-dialog-footer span,
.pf-entwheel-result-overlay .pf-entwheel-panel-dialog-footer span {
    color: #fff7ed;
}

.pf-entwheel-templates-dialog {
    width: min(960px, 100%);
    border-radius: 24px;
    border: 1px solid rgba(251, 191, 36, 0.34);
    box-shadow: 0 34px 92px rgba(15, 23, 42, 0.24);
}

.pf-entwheel-templates-dialog .pf-entwheel-panel-dialog-header {
    align-items: center;
    padding: 12px 20px;
    border-bottom: 0;
    background: linear-gradient(135deg, #ea580c 0%, #f97316 56%, #fb923c 100%);
}

.pf-entwheel-templates-dialog .pf-entwheel-panel-dialog-body {
    padding-top: 20px;
    scrollbar-width: thin;
    scrollbar-color: #FFB300 rgba(245, 158, 11, 0.12);
}

.pf-entwheel-templates-dialog .pf-entwheel-panel-dialog-body::-webkit-scrollbar {
    width: 8px;
}

.pf-entwheel-templates-dialog .pf-entwheel-panel-dialog-body::-webkit-scrollbar-track {
    background: rgba(245, 158, 11, 0.12);
    border-radius: 999px;
}

.pf-entwheel-templates-dialog .pf-entwheel-panel-dialog-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #FFB300 0%, #FF7A3D 100%);
    border-radius: 999px;
    border: 2px solid rgba(255, 250, 241, 0.98);
}

.pf-entwheel-templates-dialog .pf-entwheel-panel-dialog-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #f59e0b 0%, #FF5A5F 100%);
}

.pf-entwheel-templates-footer {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 247, 237, 0.82) 100%);
    color: #7c2d12;
}

.pf-entwheel-settings-dialog {
    width: min(980px, 100%);
    box-shadow: 0 34px 92px rgba(15, 23, 42, 0.22);
}

.pf-entwheel-settings-dialog .pf-entwheel-panel-dialog-header {
    align-items: center;
    padding: 12px 20px;
    border-bottom: 0;
    background: linear-gradient(135deg, #ea580c 0%, #f97316 56%, #fb923c 100%);
}

.pf-entwheel-templates-dialog .pf-entwheel-eyebrow,
.pf-entwheel-settings-dialog .pf-entwheel-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    line-height: 1;
    font-size: 0.96rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.pf-entwheel-templates-dialog .pf-entwheel-eyebrow .pf-entwheel-section-icon,
.pf-entwheel-settings-dialog .pf-entwheel-eyebrow .pf-entwheel-section-icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pf-entwheel-templates-dialog .pf-entwheel-eyebrow .pf-entwheel-section-icon svg,
.pf-entwheel-settings-dialog .pf-entwheel-eyebrow .pf-entwheel-section-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

.pf-entwheel-templates-dialog .pf-entwheel-panel-close {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pf-entwheel-settings-dialog .pf-entwheel-panel-dialog-body {
    padding-top: 20px;
    background:
        radial-gradient(circle at top left, rgba(191, 219, 254, 0.52), rgba(255, 255, 255, 0.98) 44%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(239, 246, 255, 0.95) 100%);
}

.pf-entwheel-settings-footer {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(224, 242, 254, 0.56) 100%);
    color: #0c4a6e;
}

.pf-entwheel-history-dialog {
    width: min(960px, 100%);
    border-radius: 20px;
    border: 0;
    box-shadow: 0 34px 92px rgba(124, 45, 18, 0.2);
}

.pf-entwheel-history-dialog .pf-entwheel-panel-dialog-header {
    align-items: center;
    padding: 12px 20px;
    border-bottom: 0;
    background: linear-gradient(135deg, #ea580c 0%, #f97316 56%, #fb923c 100%);
}

.pf-entwheel-history-dialog .pf-entwheel-panel-dialog-body {
    padding-top: 20px;
    border-left: 4px solid rgba(234, 88, 12, 0.95);
    border-right: 4px solid rgba(234, 88, 12, 0.55);
    background:
        radial-gradient(circle at top left, rgba(255, 237, 213, 0.62), rgba(255, 255, 255, 0.98) 44%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(255, 247, 237, 0.95) 100%);
}

.pf-entwheel-history-footer {
    background: linear-gradient(135deg, #ea580c 0%, #f97316 56%, #fb923c 100%);
    border-top: 0;
    color: #fff7ed;
}

.pf-entwheel-history-dialog .pf-entwheel-eyebrow {
    color: #fff7ed;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    line-height: 1;
    font-size: 0.96rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.pf-entwheel-history-dialog .pf-entwheel-panel-dialog-title {
    color: #ffffff;
    line-height: 1.2;
    text-shadow: 0 1px 0 rgba(124, 45, 18, 0.24);
}

.pf-entwheel-history-dialog .pf-entwheel-panel-close {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.26) 0%, rgba(255, 255, 255, 0.14) 100%);
    border: 1px solid rgba(255, 255, 255, 0.52);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(124, 45, 18, 0.22);
}

.pf-entwheel-history-dialog .pf-entwheel-panel-close:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0.22) 100%);
    border-color: rgba(255, 255, 255, 0.78);
    box-shadow: 0 11px 22px rgba(124, 45, 18, 0.28);
}

.pf-entwheel-history-dialog .pf-entwheel-eyebrow .pf-entwheel-section-icon,
.pf-entwheel-history-dialog .pf-entwheel-eyebrow .pf-entwheel-section-icon svg {
    color: #ffffff;
}

.pf-entwheel-history-dialog .pf-entwheel-eyebrow .pf-entwheel-section-icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pf-entwheel-history-dialog .pf-entwheel-eyebrow .pf-entwheel-section-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

.pf-entwheel-result-dialog .pf-entwheel-panel-dialog-header {
    align-items: center;
    padding: 12px 20px;
}

.pf-entwheel-result-dialog .pf-entwheel-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    line-height: 1;
    font-size: 0.96rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.pf-entwheel-result-dialog .pf-entwheel-eyebrow .pf-entwheel-section-icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pf-entwheel-result-dialog .pf-entwheel-eyebrow .pf-entwheel-section-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

.pf-entwheel-history-dialog .pf-entwheel-panel-close {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pf-entwheel-history-footer span {
    color: #fff7ed;
}

.pf-entwheel-panel-close {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 245, 249, 0.96) 100%);
    color: #ffffff;
    font-family: inherit;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
    transition: transform 0.22s ease, background 0.15s, color 0.15s, box-shadow 0.18s ease, border-color 0.18s ease;
}

.pf-entwheel-panel-close:hover {
    transform: rotate(90deg) scale(1.1);
    border-color: rgba(148, 163, 184, 0.46);
    box-shadow: 0 11px 22px rgba(15, 23, 42, 0.2);
}

/* EntWheel close button must be self-contained and not rely on pseudo-content from other stylesheets. */
.pf-entwheel-module .pf-entwheel-panel-close::before,
.pf-entwheel-app .pf-entwheel-panel-close::before {
    content: none !important;
    display: none !important;
}

.pf-entwheel-panel-close:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.46), 0 0 0 6px rgba(249, 115, 22, 0.34), 0 11px 22px rgba(15, 23, 42, 0.2);
}

.pf-entwheel-panel-close:focus-visible::before {
    transform: scale(1.06);
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

.pf-entwheel-result-spotlight {
    position: relative;
    display: grid;
    gap: 20px;
    justify-items: center;
    text-align: center;
    padding: 8px 8px 4px;
}

.pf-entwheel-result-spotlight::before {
    content: '';
    position: absolute;
    inset: -20px -14px auto;
    height: 180px;
    border-radius: 999px;
    background: radial-gradient(circle at center, rgba(251, 191, 36, 0.2) 0%, rgba(56, 189, 248, 0.12) 46%, transparent 78%);
    filter: blur(6px);
    z-index: 0;
    pointer-events: none;
}

.pf-entwheel-result-spotlight > * {
    position: relative;
    z-index: 1;
}

.pf-entwheel-result-confetti {
    position: absolute;
    inset: -6px 12% auto;
    height: 140px;
    pointer-events: none;
    overflow: visible;
    z-index: 2;
}

.pf-entwheel-result-confetti-piece {
    position: absolute;
    top: 58px;
    left: 50%;
    width: 8px;
    height: 14px;
    border-radius: 3px;
    opacity: 0;
    transform: translate(-50%, 0) rotate(0deg);
    box-shadow: 0 3px 7px rgba(15, 23, 42, 0.16);
}

.pf-entwheel-result-confetti-piece:nth-child(4n + 1) {
    background: #f97316;
}

.pf-entwheel-result-confetti-piece:nth-child(4n + 2) {
    background: #fbbf24;
}

.pf-entwheel-result-confetti-piece:nth-child(4n + 3) {
    background: #22c55e;
}

.pf-entwheel-result-confetti-piece:nth-child(4n) {
    background: #38bdf8;
}

.pf-entwheel-app.is-result-open .pf-entwheel-result-confetti-piece {
    animation: pf-entwheel-result-confetti-burst 1.05s cubic-bezier(0.2, 0.75, 0.2, 1) forwards;
}

.pf-entwheel-app.is-result-open .pf-entwheel-result-confetti-piece:nth-child(1) { --pf-entwheel-cx: -128px; --pf-entwheel-cy: -42px; --pf-entwheel-cr: -290deg; animation-delay: 0.02s; }
.pf-entwheel-app.is-result-open .pf-entwheel-result-confetti-piece:nth-child(2) { --pf-entwheel-cx: -112px; --pf-entwheel-cy: -58px; --pf-entwheel-cr: -250deg; animation-delay: 0.04s; }
.pf-entwheel-app.is-result-open .pf-entwheel-result-confetti-piece:nth-child(3) { --pf-entwheel-cx: -95px; --pf-entwheel-cy: -36px; --pf-entwheel-cr: -190deg; animation-delay: 0.06s; }
.pf-entwheel-app.is-result-open .pf-entwheel-result-confetti-piece:nth-child(4) { --pf-entwheel-cx: -78px; --pf-entwheel-cy: -62px; --pf-entwheel-cr: -150deg; animation-delay: 0.09s; }
.pf-entwheel-app.is-result-open .pf-entwheel-result-confetti-piece:nth-child(5) { --pf-entwheel-cx: -62px; --pf-entwheel-cy: -30px; --pf-entwheel-cr: -120deg; animation-delay: 0.1s; }
.pf-entwheel-app.is-result-open .pf-entwheel-result-confetti-piece:nth-child(6) { --pf-entwheel-cx: -44px; --pf-entwheel-cy: -52px; --pf-entwheel-cr: -80deg; animation-delay: 0.13s; }
.pf-entwheel-app.is-result-open .pf-entwheel-result-confetti-piece:nth-child(7) { --pf-entwheel-cx: -24px; --pf-entwheel-cy: -28px; --pf-entwheel-cr: -40deg; animation-delay: 0.15s; }
.pf-entwheel-app.is-result-open .pf-entwheel-result-confetti-piece:nth-child(8) { --pf-entwheel-cx: -10px; --pf-entwheel-cy: -60px; --pf-entwheel-cr: -10deg; animation-delay: 0.18s; }
.pf-entwheel-app.is-result-open .pf-entwheel-result-confetti-piece:nth-child(9) { --pf-entwheel-cx: 10px; --pf-entwheel-cy: -35px; --pf-entwheel-cr: 20deg; animation-delay: 0.2s; }
.pf-entwheel-app.is-result-open .pf-entwheel-result-confetti-piece:nth-child(10) { --pf-entwheel-cx: 26px; --pf-entwheel-cy: -58px; --pf-entwheel-cr: 55deg; animation-delay: 0.22s; }
.pf-entwheel-app.is-result-open .pf-entwheel-result-confetti-piece:nth-child(11) { --pf-entwheel-cx: 42px; --pf-entwheel-cy: -32px; --pf-entwheel-cr: 90deg; animation-delay: 0.24s; }
.pf-entwheel-app.is-result-open .pf-entwheel-result-confetti-piece:nth-child(12) { --pf-entwheel-cx: 58px; --pf-entwheel-cy: -64px; --pf-entwheel-cr: 130deg; animation-delay: 0.27s; }
.pf-entwheel-app.is-result-open .pf-entwheel-result-confetti-piece:nth-child(13) { --pf-entwheel-cx: 76px; --pf-entwheel-cy: -34px; --pf-entwheel-cr: 165deg; animation-delay: 0.29s; }
.pf-entwheel-app.is-result-open .pf-entwheel-result-confetti-piece:nth-child(14) { --pf-entwheel-cx: 94px; --pf-entwheel-cy: -56px; --pf-entwheel-cr: 205deg; animation-delay: 0.31s; }
.pf-entwheel-app.is-result-open .pf-entwheel-result-confetti-piece:nth-child(15) { --pf-entwheel-cx: 108px; --pf-entwheel-cy: -28px; --pf-entwheel-cr: 235deg; animation-delay: 0.34s; }
.pf-entwheel-app.is-result-open .pf-entwheel-result-confetti-piece:nth-child(16) { --pf-entwheel-cx: 124px; --pf-entwheel-cy: -46px; --pf-entwheel-cr: 270deg; animation-delay: 0.36s; }
.pf-entwheel-app.is-result-open .pf-entwheel-result-confetti-piece:nth-child(17) { --pf-entwheel-cx: -140px; --pf-entwheel-cy: -22px; --pf-entwheel-cr: -330deg; animation-delay: 0.12s; }
.pf-entwheel-app.is-result-open .pf-entwheel-result-confetti-piece:nth-child(18) { --pf-entwheel-cx: 138px; --pf-entwheel-cy: -22px; --pf-entwheel-cr: 320deg; animation-delay: 0.26s; }

.pf-entwheel-result-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #9a3412;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pf-entwheel-result-kicker-inline {
    min-height: 28px;
    padding: 5px 10px;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
}

.pf-entwheel-result-main {
    width: min(100%, 620px);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 18px;
}

.pf-entwheel-result-copy {
    display: grid;
    gap: 8px;
    justify-items: center;
    text-align: center;
}

.pf-entwheel-result-loader {
    position: relative;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transform-style: preserve-3d;
    perspective: 220px;
}

.pf-entwheel-result-loader-core,
.pf-entwheel-result-loader-check,
.pf-entwheel-result-loader-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.pf-entwheel-result-loader-core {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(180deg, #fff7ed 0%, #fdeed8 100%);
    box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.28), 0 8px 18px rgba(249, 115, 22, 0.18);
}

.pf-entwheel-result-loader-check {
    font-size: 24px;
    line-height: 1;
    color: #14532d;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2) rotate(0deg);
}

.pf-entwheel-result-loader-ring {
    width: 48px;
    height: 48px;
}

.pf-entwheel-result-loader-ring svg {
    width: 48px;
    height: 48px;
    transform: rotate(-90deg);
}

.pf-entwheel-result-loader-ring circle {
    stroke: #f97316;
    stroke-width: 3.4;
    stroke-dasharray: 220;
    stroke-dashoffset: 220;
}

.pf-entwheel-app.is-result-open .pf-entwheel-result-loader.is-loading .pf-entwheel-result-loader-ring circle {
    animation: pf-entwheel-result-loader-draw 0.8s ease-out 0.3s forwards, pf-entwheel-result-loader-spinner 0.9s ease-in-out 1.1s infinite;
}

.pf-entwheel-result-loader.is-loading .pf-entwheel-result-loader-ring circle {
    animation: pf-entwheel-result-loader-spinner 0.9s ease-in-out infinite;
}

.pf-entwheel-result-loader.is-complete .pf-entwheel-result-loader-ring {
    opacity: 0;
}

.pf-entwheel-result-loader.is-complete .pf-entwheel-result-loader-core {
    background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 12px 24px rgba(34, 197, 94, 0.3);
    animation: pf-entwheel-result-loader-bounce 0.7s ease-out;
}

.pf-entwheel-app.is-result-open .pf-entwheel-result-loader.is-complete .pf-entwheel-result-loader-check {
    animation: pf-entwheel-result-loader-check-pop 0.4s ease-out forwards;
}

.pf-entwheel-result-loader.is-complete .pf-entwheel-result-loader-check {
    color: #ffffff;
    opacity: 1;
    animation: pf-entwheel-result-loader-check-in 0.45s ease-out;
}

.pf-entwheel-result-question {
    max-width: 34rem;
    color: var(--pf-entwheel-text-soft);
    font-size: 1rem;
    line-height: 1.5;
    text-wrap: balance;
}

.pf-entwheel-result-question.is-empty {
    font-style: italic;
}

.pf-entwheel-result-hero {
    position: relative;
    display: inline-block;
    overflow: visible;
    max-width: 100%;
    color: #7c2d12;
    font-size: clamp(2.4rem, 6vw, 4.8rem);
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -0.04em;
    text-wrap: balance;
    text-shadow: 0 10px 26px rgba(251, 146, 60, 0.18);
}

.pf-entwheel-result-hero::after {
    content: '';
    position: absolute;
    inset: -20% -45%;
    background: linear-gradient(110deg, transparent 38%, rgba(255, 255, 255, 0.78) 48%, transparent 58%);
    transform: translateX(-165%) skewX(-16deg);
    pointer-events: none;
    opacity: 0;
}

.pf-entwheel-app.is-result-open .pf-entwheel-result-question {
    opacity: 0;
    animation: pf-entwheel-result-fade-in 0.4s ease-out 0.5s forwards;
}

.pf-entwheel-app.is-result-open .pf-entwheel-result-hero {
    opacity: 0;
    transform: translateY(20px);
    animation: pf-entwheel-result-hero-reveal 0.5s ease-out 1s forwards, pf-entwheel-result-text-glow 1.5s ease-in-out 1.5s infinite alternate;
}

.pf-entwheel-app.is-result-open .pf-entwheel-result-hero::after {
    animation: pf-entwheel-result-hero-shine 0.85s ease-out 1.15s 1 both;
}

.pf-entwheel-result-supporting {
    max-width: 36rem;
    margin: 0;
    color: var(--pf-entwheel-text-soft);
    font-size: 1rem;
    line-height: 1.65;
}

.pf-entwheel-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.pf-entwheel-app.is-result-open .pf-entwheel-result-actions {
    opacity: 0;
    transform: translateY(10px);
    animation: pf-entwheel-result-slide-up 0.4s ease-out 1.2s forwards;
}

.pf-entwheel-result-actions [data-pf-entwheel-result-repeat] {
    color: #fff7ed;
    background: linear-gradient(135deg, #f97316 0%, #ef4444 100%);
    border: 1px solid rgba(239, 68, 68, 0.4);
    box-shadow: 0 14px 28px rgba(239, 68, 68, 0.24);
}

.pf-entwheel-result-actions [data-pf-entwheel-result-repeat]:hover {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 48%, #dc2626 100%);
    box-shadow: 0 16px 32px rgba(239, 68, 68, 0.3);
}

@keyframes pf-entwheel-result-loader-spinner {
    0% {
        stroke-dashoffset: 220;
    }
    50% {
        stroke-dashoffset: 110;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes pf-entwheel-result-loader-draw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes pf-entwheel-result-loader-check-in {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.2) rotate(0deg);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(360deg);
    }
}

@keyframes pf-entwheel-result-loader-check-pop {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    80% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes pf-entwheel-result-loader-bounce {
    0% {
        transform: translate(-50%, -50%) scale(0.9);
    }
    45% {
        transform: translate(-50%, -50%) translateY(10px) scale(1.03);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes pf-entwheel-result-dialog-in {
    from {
        opacity: 0;
        transform: translateY(22px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pf-entwheel-result-dialog-pop {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    70% {
        transform: scale(1.05);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pf-entwheel-result-hero-reveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pf-entwheel-result-slide-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pf-entwheel-result-hero-pop {
    0% {
        opacity: 0;
        transform: scale(0.84) translateY(10px);
        filter: blur(2px);
    }
    70% {
        opacity: 1;
        transform: scale(1.04) translateY(0);
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

@keyframes pf-entwheel-result-hero-shine {
    0% {
        opacity: 0;
        transform: translateX(-165%) skewX(-16deg);
    }
    14% {
        opacity: 0.95;
    }
    100% {
        opacity: 0;
        transform: translateX(165%) skewX(-16deg);
    }
}

@keyframes pf-entwheel-result-text-glow {
    from {
        text-shadow: 0 0 6px rgba(255, 237, 213, 0.42), 0 10px 26px rgba(251, 146, 60, 0.18);
    }
    to {
        text-shadow: 0 0 20px rgba(255, 251, 235, 0.9), 0 0 12px rgba(249, 115, 22, 0.62), 0 10px 26px rgba(251, 146, 60, 0.22);
    }
}

@keyframes pf-entwheel-result-confetti-burst {
    0% {
        opacity: 0;
        transform: translate(-50%, 0) scale(0.35) rotate(0deg);
    }
    12% {
        opacity: 1;
        transform: translate(-50%, -8px) scale(1) rotate(40deg);
    }
    85% {
        opacity: 1;
        transform: translate(calc(-50% + var(--pf-entwheel-cx, 0px)), calc(var(--pf-entwheel-cy, -20px) + 42px)) rotate(var(--pf-entwheel-cr, 180deg));
    }
    100% {
        opacity: 0;
        transform: translate(calc(-50% + var(--pf-entwheel-cx, 0px)), calc(var(--pf-entwheel-cy, -20px) + 72px)) rotate(calc(var(--pf-entwheel-cr, 180deg) + 90deg));
    }
}

.pf-entwheel-settings-layout {
    align-items: stretch;
}

.pf-entwheel-settings-layout > * {
    flex: 1 1 0;
}

.pf-entwheel-history-content {
    display: grid;
    gap: 10px;
}

.pf-entwheel-history-content > .pf-entwheel-panel-head {
    margin-bottom: 0;
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid rgba(251, 191, 36, 0.3);
    background: linear-gradient(180deg, rgba(255, 251, 235, 0.96) 0%, rgba(255, 247, 237, 0.9) 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.pf-entwheel-history-content > .pf-entwheel-panel-head h3 {
    color: #7c2d12;
}

.pf-entwheel-history-content > .pf-entwheel-panel-head p {
    color: #6b7280;
}

.pf-entwheel-analytics-wrap {
    display: grid;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid rgba(251, 191, 36, 0.24);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 250, 244, 0.95) 100%);
    box-shadow: 0 10px 26px rgba(124, 45, 18, 0.08);
}

.pf-entwheel-analytics-wrap h4,
.pf-entwheel-top-results-wrap h4 {
    margin: 0;
    color: #7c2d12;
}

.pf-entwheel-analytics-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.pf-entwheel-analytics-card {
    display: grid;
    gap: 2px;
    padding: 9px 10px;
    border-radius: 12px;
    border: 1px solid rgba(251, 191, 36, 0.3);
    background: linear-gradient(180deg, rgba(255, 251, 235, 0.96) 0%, rgba(255, 244, 228, 0.88) 100%);
}

.pf-entwheel-analytics-value {
    color: #9a3412;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.25;
    word-break: break-word;
}

.pf-entwheel-analytics-label {
    color: #6b7280;
    font-size: 0.76rem;
    font-weight: 700;
}

.pf-entwheel-analytics-meta {
    color: #64748b;
    font-size: 0.72rem;
}

.pf-entwheel-top-results-wrap {
    display: grid;
    gap: 6px;
}

.pf-entwheel-top-results {
    display: grid;
    gap: 6px;
}

.pf-entwheel-top-result-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(100px, 38%);
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(251, 191, 36, 0.25);
    background: rgba(255, 255, 255, 0.85);
}

.pf-entwheel-top-result-rank {
    min-width: 24px;
    color: #9a3412;
    font-weight: 800;
    font-size: 0.8rem;
}

.pf-entwheel-top-result-main {
    min-width: 0;
}

.pf-entwheel-top-result-label {
    color: #1f2937;
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pf-entwheel-top-result-meta {
    color: #64748b;
    font-size: 0.74rem;
}

.pf-entwheel-top-result-bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.9);
    overflow: hidden;
}

.pf-entwheel-top-result-bar > span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.pf-entwheel-pointer-switch {
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.pf-entwheel-pointer-option {
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(203, 213, 225, 0.9);
    background: rgba(248, 250, 252, 0.98);
    color: var(--pf-entwheel-text);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.pf-entwheel-pointer-option.is-active {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.16) 0%, rgba(245, 158, 11, 0.18) 100%);
    border-color: rgba(56, 189, 248, 0.6);
    box-shadow: 0 10px 24px rgba(14, 165, 233, 0.12);
}

.pf-entwheel-info-layout,
.pf-entwheel-workspace,
.pf-entwheel-hero-card,
.pf-entwheel-hero-stats,
.pf-entwheel-form-actions,
.pf-entwheel-stats {
    display: grid;
    gap: 18px;
}

.pf-entwheel-template-grid,
.pf-entwheel-history-list {
    display: grid;
    gap: 14px;
}

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

.pf-entwheel-template-toolbar {
    display: flex;
    justify-content: flex-start;
    margin-top: 12px;
}

.pf-entwheel-template-toolbar-bottom {
    justify-content: flex-start;
}

.pf-entwheel-template-save-btn {
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 11px;
    color: #4a2a06;
    background: linear-gradient(135deg, #ffd978 0%, #ffb347 100%);
    border: 1px solid rgba(245, 158, 11, 0.34);
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.16);
    gap: 8px;
    font-size: 0.84rem;
}

.pf-entwheel-template-save-btn:hover {
    background: linear-gradient(135deg, #ffe08f 0%, #ffbf5f 100%);
    box-shadow: 0 12px 22px rgba(245, 158, 11, 0.2);
}

.pf-entwheel-template-save-btn .pf-entwheel-button-icon svg {
    width: 17px;
    height: 17px;
}

.pf-entwheel-template-card,
.pf-entwheel-history-item,
.pf-entwheel-current-question-card {
    display: grid;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.96);
    border: 1px solid rgba(203, 213, 225, 0.9);
}

.pf-entwheel-template-section {
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(255, 237, 213, 0.5), rgba(248, 250, 252, 0.98) 44%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
    border-color: rgba(251, 191, 36, 0.28);
}

.pf-entwheel-template-section .pf-entwheel-panel-head {
    margin-bottom: 14px;
}

.pf-entwheel-template-card {
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.94) 100%);
    border-color: rgba(203, 213, 225, 0.78);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.pf-entwheel-template-card:hover {
    transform: translateY(-1px);
    border-color: rgba(249, 115, 22, 0.36);
    box-shadow: 0 14px 30px rgba(249, 115, 22, 0.12);
}

.pf-entwheel-template-card-saved {
    border-color: rgba(56, 189, 248, 0.28);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, rgba(239, 246, 255, 0.92) 100%);
}

.pf-entwheel-template-line,
.pf-entwheel-template-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.pf-entwheel-template-summary {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: baseline;
}

.pf-entwheel-template-name,
.pf-entwheel-history-result {
    color: var(--pf-entwheel-text);
    font-size: 1rem;
    font-weight: 800;
}

.pf-entwheel-template-separator {
    color: var(--pf-entwheel-text-soft);
    font-weight: 700;
}

.pf-entwheel-template-question,
.pf-entwheel-history-question,
.pf-entwheel-current-question,
.pf-entwheel-template-empty,
.pf-entwheel-history-time {
    color: var(--pf-entwheel-text-soft);
    line-height: 1.5;
}

.pf-entwheel-template-options-text {
    min-width: 0;
    color: var(--pf-entwheel-text-soft);
    font-size: 0.94rem;
    line-height: 1.45;
}

.pf-entwheel-template-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.14);
    color: #0369a1;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.pf-entwheel-current-question.is-empty,
.pf-entwheel-template-empty {
    font-style: italic;
}

.pf-entwheel-current-question-card h4,
.pf-entwheel-history-list-wrap h4 {
    margin: 0;
    color: var(--pf-entwheel-text);
    font-size: 1rem;
}

.pf-entwheel-template-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
}

.pf-entwheel-template-icon-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.9);
    color: var(--pf-entwheel-text);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.pf-entwheel-template-icon-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 1);
    border-color: rgba(56, 189, 248, 0.4);
}

.pf-entwheel-template-icon-btn .pf-entwheel-button-icon svg {
    width: 18px;
    height: 18px;
}

.pf-entwheel-template-icon-btn[data-pf-entwheel-template-apply="1"] {
    border-color: rgba(234, 88, 12, 0.4);
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #fff7ed;
    box-shadow: 0 10px 18px rgba(234, 88, 12, 0.24);
}

.pf-entwheel-template-icon-btn[data-pf-entwheel-template-apply="1"]:hover {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 55%, #dc2626 100%);
    border-color: rgba(239, 68, 68, 0.42);
    box-shadow: 0 12px 22px rgba(239, 68, 68, 0.3);
}

.pf-entwheel-template-icon-btn[data-pf-entwheel-template-apply="1"] .pf-entwheel-button-icon svg {
    stroke: currentColor;
}

.pf-entwheel-template-delete {
    color: #991b1b;
    font-size: 1.2rem;
    line-height: 1;
}

.pf-entwheel-info-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
}

.pf-entwheel-info-description,
.pf-entwheel-meta-block,
.pf-entwheel-hero-card,
.pf-entwheel-panel-card,
.pf-entwheel-stage-card,
.pf-entwheel-options-preview,
.pf-entwheel-stats,
.pf-entwheel-result {
    background: var(--pf-entwheel-surface);
    border: 1px solid var(--pf-entwheel-border);
    backdrop-filter: blur(16px);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.pf-entwheel-info-description,
.pf-entwheel-meta-block,
.pf-entwheel-panel-card,
.pf-entwheel-stage-card,
.pf-entwheel-options-preview,
.pf-entwheel-stats,
.pf-entwheel-result {
    border-radius: 20px;
}

.pf-entwheel-info-description,
.pf-entwheel-meta-block,
.pf-entwheel-panel-card,
.pf-entwheel-stage-card,
.pf-entwheel-result,
.pf-entwheel-hero-card {
    padding: 20px;
}

.pf-entwheel-info-heading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0369a1;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.pf-entwheel-desc,
.pf-entwheel-panel-head p,
.pf-entwheel-hero-text,
.pf-entwheel-stat-label {
    color: var(--pf-entwheel-text-soft);
    line-height: 1.6;
}

.pf-entwheel-meta-value,
.pf-entwheel-hero-stat strong,
.pf-entwheel-panel-head h3,
.pf-entwheel-stage-head h3,
.pf-entwheel-options-preview h4,
.pf-entwheel-stat-value {
    color: var(--pf-entwheel-text);
}

.pf-entwheel-meta-value,
.pf-entwheel-stat-value {
    font-weight: 700;
}

.pf-entwheel-info-meta {
    display: grid;
    gap: 14px;
}

.pf-entwheel-body {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    padding: 18px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    background: #eef4fb;
    scrollbar-width: thin;
    scrollbar-color: #FFB300 rgba(245, 158, 11, 0.08);
}

.pf-entwheel-box .pf-entwheel-body::-webkit-scrollbar {
    width: 8px;
}

.pf-entwheel-box .pf-entwheel-body::-webkit-scrollbar-track {
    background: rgba(245, 158, 11, 0.08);
    border-radius: 999px;
}

.pf-entwheel-box .pf-entwheel-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #FFB300 0%, #FF7A3D 100%) !important;
    border-radius: 999px;
    border: 2px solid #eef4fb;
}

.pf-entwheel-box .pf-entwheel-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #f59e0b 0%, #FF5A5F 100%) !important;
}

.pf-entwheel-body::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.2), transparent 24%),
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.16), transparent 30%),
        linear-gradient(180deg, #eef4fb 0%, #f9fbfe 100%);
    pointer-events: none;
}

.pf-entwheel-body > * {
    position: relative;
    z-index: 1;
}

.pf-entwheel-hero-card {
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
    margin-bottom: 20px;
    border-radius: 28px;
}

.pf-entwheel-eyebrow {
    margin-bottom: 14px;
    color: #0369a1;
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.pf-entwheel-hero-title {
    margin: 0 0 10px;
    color: var(--pf-entwheel-text);
    font-size: clamp(1.5rem, 2vw, 2.1rem);
    line-height: 1.15;
}

.pf-entwheel-hero-stats {
    grid-template-columns: 1fr;
}

.pf-entwheel-hero-stat {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(241, 245, 249, 0.95);
    border: 1px solid rgba(203, 213, 225, 0.9);
}

.pf-entwheel-hero-stat span {
    color: var(--pf-entwheel-text-soft);
    font-size: 0.9rem;
}

.pf-entwheel-workspace {
    grid-template-columns: minmax(310px, 380px) minmax(0, 1fr);
    align-items: start;
    gap: 16px;
}

.pf-entwheel-side-panel {
    display: grid;
    gap: 18px;
}

.pf-entwheel-panel-card-primary {
    background: linear-gradient(180deg, rgba(224, 242, 254, 0.98) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.pf-entwheel-panel-head h3,
.pf-entwheel-stage-head h3 {
    margin: 0 0 8px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
}

.pf-entwheel-controls form {
    display: grid;
    gap: 12px;
}

.pf-entwheel-wheel-settings {
    display: grid;
    gap: 12px;
}

.pf-entwheel-wheel-settings-group {
    display: grid;
    gap: 8px;
}

.pf-entwheel-theme-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pf-entwheel-theme-option {
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid rgba(203, 213, 225, 0.9);
    background: rgba(255, 255, 255, 0.96);
    color: var(--pf-entwheel-text);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.pf-entwheel-theme-option:hover {
    transform: translateY(-1px);
    border-color: rgba(56, 189, 248, 0.65);
}

.pf-entwheel-theme-option.is-active {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.18) 0%, rgba(245, 158, 11, 0.2) 100%);
    border-color: rgba(56, 189, 248, 0.78);
    box-shadow: 0 8px 18px rgba(14, 165, 233, 0.14);
}

.pf-entwheel-range-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.pf-entwheel-range-row input[type="range"] {
    width: 100%;
    accent-color: #f59e0b;
}

.pf-entwheel-range-value {
    min-width: 44px;
    text-align: right;
    color: #7c2d12;
    font-size: 0.84rem;
    font-weight: 800;
}

.pf-entwheel-field-label {
    color: var(--pf-entwheel-text-soft);
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.pf-entwheel-controls input[type="text"] {
    width: 100%;
    min-height: 52px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(255, 255, 255, 0.96);
    color: var(--pf-entwheel-text);
    font: inherit;
}

.pf-entwheel-controls input[type="text"]:focus {
    outline: none;
    border-color: rgba(56, 189, 248, 0.8);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
}

.pf-entwheel-controls input[type="text"]::placeholder {
    color: #94a3b8;
}

.pf-entwheel-form-actions {
    grid-template-columns: 1fr 1fr;
}

.pf-entwheel-action-btn-primary,
.pf-entwheel-spin-btn {
    color: #08111f;
    background: linear-gradient(135deg, #38bdf8 0%, #f59e0b 100%);
    box-shadow: 0 16px 30px rgba(14, 165, 233, 0.18);
}

.pf-entwheel-action-btn-secondary {
    color: var(--pf-entwheel-text);
    background: rgba(248, 250, 252, 0.98);
    border: 1px solid rgba(203, 213, 225, 0.9);
}

.pf-entwheel-action-btn.is-disabled,
.pf-entwheel-spin-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pf-entwheel-stage-card {
    overflow: hidden;
    min-width: 0;
}

.pf-entwheel-stage-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

#pf-entwheel-app[data-pointer-mode="top"] .pf-entwheel-pointer {
    top: calc(50% - (var(--pf-entwheel-wheel-size) / 2));
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%) rotate(-90deg);
}

#pf-entwheel-app[data-pointer-mode="top"] .pf-entwheel-pointer-settings {
    top: calc(50% - (var(--pf-entwheel-wheel-size) / 2) - 52px);
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
}

.pf-entwheel-wheel-container {
    --pf-entwheel-wheel-size: 420px;
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 540px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 12px;
    padding-block: 28px;
    border-radius: 24px;
    background:
        radial-gradient(circle at center, rgba(56, 189, 248, 0.12), transparent 44%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%);
    border: 1px solid rgba(203, 213, 225, 0.9);
}

#pf-entwheel-canvas {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.16);
    background: #ffffff;
    box-shadow: 0 24px 48px rgba(2, 6, 23, 0.35);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

#pf-entwheel-canvas.spinning {
    box-shadow: 0 0 0 10px rgba(56, 189, 248, 0.08), 0 24px 48px rgba(2, 6, 23, 0.35);
}

.pf-entwheel-pointer {
    position: absolute;
    top: 50%;
    right: calc(50% - (var(--pf-entwheel-wheel-size) / 2));
    transform: translate(50%, -50%);
    width: 0;
    height: 0;
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
    border-right: 36px solid var(--pf-entwheel-accent-strong);
    filter: drop-shadow(0 4px 10px rgba(2, 6, 23, 0.35));
}

.pf-entwheel-pointer-settings {
    position: absolute;
    top: 50%;
    right: calc(50% - (var(--pf-entwheel-wheel-size) / 2) - 52px);
    transform: translate(50%, -50%);
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.96);
    color: #9a3412;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.18);
    cursor: pointer;
    z-index: 2;
}

.pf-entwheel-pointer-settings:hover,
.pf-entwheel-pointer-settings:focus-visible {
    outline: none;
    background: #ffffff;
    color: #c2410c;
}

.pf-entwheel-pointer-settings-icon {
    font-size: 0.94rem;
    font-weight: 900;
    line-height: 1;
}

.pf-entwheel-result {
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pf-entwheel-text);
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
}

.pf-entwheel-stage-status-card {
    display: grid;
    gap: 10px;
    width: 100%;
    grid-column: 1 / -1;
    min-height: 180px;
    margin-top: 0;
    padding: 14px;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(232, 244, 254, 0.86) 0%, rgba(255, 248, 234, 0.82) 100%);
    border: 1px solid rgba(203, 213, 225, 0.9);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.pf-entwheel-stage-status-card .pf-entwheel-result {
    min-height: 120px;
    border-radius: 18px;
    padding: 16px;
}

.pf-entwheel-result:not(:empty) {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.14) 0%, rgba(245, 158, 11, 0.1) 100%);
}

.pf-entwheel-result.result-animation {
    animation: pf-entwheel-result-pulse 0.45s ease-out;
}

@keyframes pf-entwheel-result-pulse {
    0% {
        transform: scale(0.97);
        opacity: 0.75;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.pf-entwheel-result.spinning {
    color: var(--pf-entwheel-text-soft);
    font-style: italic;
}

.pf-entwheel-options-preview,
.pf-entwheel-stats,
.pf-entwheel-current-question-card,
.pf-entwheel-history-list-wrap {
    padding: 10px 12px;
}

.pf-entwheel-history-dialog .pf-entwheel-current-question-card,
.pf-entwheel-history-dialog .pf-entwheel-options-preview,
.pf-entwheel-history-dialog .pf-entwheel-stats,
.pf-entwheel-history-dialog .pf-entwheel-history-list-wrap {
    border: 1px solid rgba(251, 191, 36, 0.24);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 250, 244, 0.95) 100%);
    box-shadow: 0 10px 26px rgba(124, 45, 18, 0.08);
}

.pf-entwheel-history-dialog .pf-entwheel-current-question-card h4,
.pf-entwheel-history-dialog .pf-entwheel-options-preview h4,
.pf-entwheel-history-dialog .pf-entwheel-history-list-wrap h4 {
    color: #7c2d12;
    margin-bottom: 10px;
}

.pf-entwheel-options-preview h4 {
    margin: 0 0 12px;
}

.pf-entwheel-options-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pf-entwheel-option-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(224, 242, 254, 0.95);
    color: var(--pf-entwheel-text);
    border: 1px solid rgba(125, 211, 252, 0.9);
    font-size: 0.92rem;
    font-weight: 600;
}

.pf-entwheel-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.pf-entwheel-stat {
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.98);
    text-align: center;
}

@media (max-width: 768px) {
    .pf-entwheel-analytics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .pf-entwheel-analytics-grid {
        grid-template-columns: 1fr;
    }

    .pf-entwheel-top-result-item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .pf-entwheel-top-result-bar {
        grid-column: 1 / -1;
    }
}

.pf-entwheel-history-dialog .pf-entwheel-stat {
    border: 1px solid rgba(251, 191, 36, 0.34);
    background: linear-gradient(180deg, rgba(255, 251, 235, 0.96) 0%, rgba(255, 244, 228, 0.9) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.pf-entwheel-stat-value {
    font-size: 1.15rem;
    margin-bottom: 2px;
    color: #0f172a;
}

.pf-entwheel-stat-label {
    font-size: 0.8rem;
    line-height: 1.35;
}

.pf-entwheel-history-dialog .pf-entwheel-stat-value {
    color: #9a3412;
    font-size: 1.45rem;
}

.pf-entwheel-history-dialog .pf-entwheel-stat-label {
    color: #6b7280;
}

.pf-entwheel-history-dialog .pf-entwheel-history-item {
    border: 1px solid rgba(251, 191, 36, 0.26);
    border-left: 5px solid #fb923c;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 247, 237, 0.9) 100%);
    box-shadow: 0 8px 22px rgba(124, 45, 18, 0.08);
}

.pf-entwheel-history-dialog .pf-entwheel-history-result {
    color: #7c2d12;
}

.pf-entwheel-history-dialog .pf-entwheel-history-question {
    color: #475569;
}

.pf-entwheel-history-dialog .pf-entwheel-history-time {
    color: #64748b;
    font-size: 0.9rem;
}

/* Compact history overlay layout */
.pf-entwheel-history-dialog .pf-entwheel-panel-dialog-body {
    padding-top: 12px;
}

.pf-entwheel-history-dialog .pf-entwheel-history-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.pf-entwheel-history-dialog .pf-entwheel-stats,
.pf-entwheel-history-dialog .pf-entwheel-analytics-wrap,
.pf-entwheel-history-dialog .pf-entwheel-history-list-wrap {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .pf-entwheel-history-dialog .pf-entwheel-history-content {
        grid-template-columns: 1fr;
    }
}

.pf-entwheel-history-dialog .pf-entwheel-history-content > .pf-entwheel-panel-head,
.pf-entwheel-history-dialog .pf-entwheel-current-question-card,
.pf-entwheel-history-dialog .pf-entwheel-options-preview,
.pf-entwheel-history-dialog .pf-entwheel-stats,
.pf-entwheel-history-dialog .pf-entwheel-history-list-wrap,
.pf-entwheel-history-dialog .pf-entwheel-analytics-wrap {
    padding: 8px 10px;
    border-radius: 8px;
}

.pf-entwheel-history-dialog .pf-entwheel-history-content > .pf-entwheel-panel-head {
    gap: 4px;
}

.pf-entwheel-history-dialog .pf-entwheel-history-content > .pf-entwheel-panel-head h3 {
    font-size: 1rem;
    line-height: 1.2;
}

.pf-entwheel-history-dialog .pf-entwheel-history-content > .pf-entwheel-panel-head p {
    font-size: 0.88rem;
    line-height: 1.35;
}

.pf-entwheel-history-dialog .pf-entwheel-current-question-card h4,
.pf-entwheel-history-dialog .pf-entwheel-options-preview h4,
.pf-entwheel-history-dialog .pf-entwheel-history-list-wrap h4,
.pf-entwheel-history-dialog .pf-entwheel-analytics-wrap h4,
.pf-entwheel-history-dialog .pf-entwheel-top-results-wrap h4 {
    margin-bottom: 6px;
    font-size: 0.95rem;
    line-height: 1.2;
}

.pf-entwheel-history-dialog .pf-entwheel-current-question,
.pf-entwheel-history-dialog .pf-entwheel-history-question {
    line-height: 1.35;
}

.pf-entwheel-history-dialog .pf-entwheel-options-list {
    gap: 6px;
}

.pf-entwheel-history-dialog .pf-entwheel-option-tag {
    padding: 6px 10px;
    font-size: 0.84rem;
}

.pf-entwheel-history-dialog .pf-entwheel-stats {
    gap: 8px;
}

.pf-entwheel-history-dialog .pf-entwheel-stat {
    padding: 6px 8px;
}

.pf-entwheel-history-dialog .pf-entwheel-stat-value {
    font-size: 1.2rem;
    margin-bottom: 0;
}

.pf-entwheel-history-dialog .pf-entwheel-stat-label {
    font-size: 0.76rem;
    line-height: 1.2;
}

.pf-entwheel-history-dialog .pf-entwheel-analytics-grid {
    gap: 6px;
}

.pf-entwheel-history-dialog .pf-entwheel-analytics-card {
    padding: 7px 8px;
    border-radius: 8px;
}

.pf-entwheel-history-dialog .pf-entwheel-analytics-value {
    font-size: 0.95rem;
    line-height: 1.2;
}

.pf-entwheel-history-dialog .pf-entwheel-analytics-label {
    font-size: 0.72rem;
}

.pf-entwheel-history-dialog .pf-entwheel-analytics-meta,
.pf-entwheel-history-dialog .pf-entwheel-top-result-meta,
.pf-entwheel-history-dialog .pf-entwheel-history-time {
    font-size: 0.7rem;
}

.pf-entwheel-history-dialog .pf-entwheel-top-results {
    gap: 5px;
}

.pf-entwheel-history-dialog .pf-entwheel-top-result-item,
.pf-entwheel-history-dialog .pf-entwheel-history-item {
    padding: 7px 9px;
    border-radius: 7px;
}

.pf-entwheel-history-dialog .pf-entwheel-history-item {
    gap: 4px;
    border-left-width: 4px;
}

.pf-entwheel-history-dialog .pf-entwheel-history-result,
.pf-entwheel-history-dialog .pf-entwheel-top-result-label {
    font-size: 0.9rem;
}

.pf-entwheel-footer-module,
.pf-entwheel-footer-meta,
.pf-entwheel-footer-runtime {
    color: rgba(255, 255, 255, 0.94);
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pf-entwheel-footer-fx-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    box-shadow: none;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.pf-entwheel-footer-fx-toggle .pf-entwheel-footer-icon-off {
    display: none;
}

.pf-entwheel-footer-fx-toggle .pf-entwheel-footer-icon,
.pf-entwheel-footer-fx-toggle .pf-entwheel-footer-icon svg {
    width: 12px;
    height: 12px;
}

.pf-entwheel-footer-fx-toggle:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.52);
}

.pf-entwheel-box.is-footer-fx-off .pf-entwheel-footer-fx-toggle {
    border-color: rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.58);
    background: rgba(15, 23, 42, 0.2);
}

.pf-entwheel-box.is-footer-fx-off .pf-entwheel-footer-fx-toggle .pf-entwheel-footer-icon-on {
    display: none;
}

.pf-entwheel-box.is-footer-fx-off .pf-entwheel-footer-fx-toggle .pf-entwheel-footer-icon-off {
    display: inline-flex;
}

.pf-entwheel-box.is-footer-fx-off .pf-entwheel-footer-fx-toggle:hover {
    background: rgba(15, 23, 42, 0.28);
}

.pf-entwheel-footer-module,
.pf-entwheel-footer-meta {
    font-size: 0.72rem;
    line-height: 1.1;
}

.pf-entwheel-footer-runtime {
    font-size: 0.7rem;
    line-height: 1.1;
}

.pf-entwheel-footer-left,
.pf-entwheel-footer-center,
.pf-entwheel-footer-right {
    overflow: hidden;
}

.pf-entwheel-footer-right {
    overflow: visible;
}

@media (max-width: 768px) {
    .pf-entwheel-result-overlay,
    .pf-entwheel-panel-overlay {
        padding: 16px;
    }

    .pf-entwheel-result-dialog {
        border-radius: 24px;
    }

    .pf-entwheel-result-spotlight {
        gap: 16px;
        padding-inline: 0;
    }

    .pf-entwheel-result-main {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 12px;
    }

    .pf-entwheel-result-copy {
        text-align: center;
    }

    .pf-entwheel-result-actions {
        width: 100%;
        grid-template-columns: 1fr;
    }

    .pf-entwheel-result-actions .pf-entwheel-action-btn {
        width: 100%;
        justify-content: center;
    }
}

.pf-entwheel-footer-right {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.pf-entwheel-footer-runtime {
    display: block;
    font-size: 0.82rem;
    opacity: 0.92;
}

.pf-entwheel-message {
    position: fixed;
    right: 24px;
    bottom: 24px;
    padding: 12px 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 122, 61, 0.96) 0%, rgba(255, 179, 0, 0.96) 100%);
    color: #ffffff;
    box-shadow: 0 20px 40px rgba(2, 6, 23, 0.35);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 50;
}

.pf-entwheel-to-top {
    position: fixed;
    right: 24px;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    z-index: 220;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: linear-gradient(135deg, rgba(255, 122, 61, 0.95) 0%, rgba(255, 179, 0, 0.95) 100%);
    color: #ffffff;
    font-size: 1.2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 28px rgba(2, 6, 23, 0.38);
    cursor: pointer;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* backdrop-filter auf .pf-overlay macht es zum Containing Block für position:fixed.
   Im Overlay-Modus deshalb position:absolute, damit der Button im Modul-Box bleibt. */
.pf-entwheel-box.overlay-mode .pf-entwheel-to-top {
    position: absolute;
    right: 24px;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

.pf-entwheel-to-top.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.pf-entwheel-message.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.pf-entwheel-message[data-type="success"] {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.96) 0%, rgba(22, 163, 74, 0.96) 100%);
    border-color: rgba(255, 255, 255, 0.34);
}

.pf-entwheel-message[data-type="error"] {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.96) 0%, rgba(220, 38, 38, 0.96) 100%);
    border-color: rgba(255, 255, 255, 0.28);
}

.pf-entwheel-message[data-type="info"] {
    background: linear-gradient(135deg, rgba(255, 122, 61, 0.96) 0%, rgba(255, 179, 0, 0.96) 100%);
}

.pf-entwheel-celebration {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(circle, #f59e0b 0%, #38bdf8 100%);
    transform: translate(-50%, -50%);
    animation: pf-entwheel-burst 1.2s ease-out forwards;
    pointer-events: none;
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.35);
}

@keyframes pf-entwheel-burst {
    0% {
        opacity: 0.9;
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.35);
    }
    100% {
        opacity: 0;
        box-shadow: 0 0 0 90px rgba(56, 189, 248, 0);
    }
}

@media (max-width: 768px) {
    .pf-entwheel-to-top {
        display: inline-flex;
    }

    .pf-entwheel-box.is-mobile-shell-collapsed .pf-entwheel-header {
        min-height: 0;
        height: 0;
        padding: 0;
        border: 0;
        box-shadow: none;
        background: transparent;
        overflow: visible;
    }

    .pf-entwheel-box.is-mobile-shell-collapsed .pf-entwheel-header::before,
    .pf-entwheel-box.is-mobile-shell-collapsed .pf-entwheel-header::after {
        display: none;
    }

    .pf-entwheel-box.is-mobile-shell-collapsed .pf-entwheel-header-left,
    .pf-entwheel-box.is-mobile-shell-collapsed .pf-entwheel-header-right {
        display: none;
    }

    .pf-entwheel-box.is-mobile-shell-collapsed .pf-entwheel-header-compact-logo {
        display: inline-flex;
        position: fixed;
        top: 10px;
        right: 10px;
        left: auto;
        transform: none;
        z-index: 240;
        border-radius: 999px;
        overflow: hidden;
    }

    .pf-entwheel-box.is-mobile-shell-collapsed .pf-entwheel-footer {
        display: none;
    }

    .pf-entwheel-box.is-mobile-shell-collapsed .pf-entwheel-to-top {
        bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    }

    .pf-entwheel-panel-overlay {
        padding: 16px;
    }

    .pf-entwheel-panel-dialog-header,
    .pf-entwheel-panel-dialog-body {
        padding-inline: 18px;
    }

    .pf-entwheel-panel-dialog-footer {
        padding-inline: 18px;
    }

    .pf-entwheel-settings-layout,
    .pf-entwheel-stage-toolbar {
        flex-direction: column;
    }

    .pf-entwheel-stage-editor {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .pf-entwheel-stage-main {
        display: block;
        grid-column: auto;
        gap: 10px;
    }

    .pf-entwheel-stage-step {
        grid-template-columns: 1fr;
    }

    .pf-entwheel-stage-step-index {
        display: none;
    }

    .pf-entwheel-stage-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .pf-entwheel-stage-actions .pf-entwheel-spin-btn {
        width: 100%;
    }

    .pf-entwheel-header {
        padding: 10px 12px;
        gap: 10px;
    }

    .pf-entwheel-body {
        padding: 16px;
    }

    .pf-entwheel-hero-card,
    .pf-entwheel-workspace,
    .pf-entwheel-info-layout {
        grid-template-columns: 1fr;
    }

    .pf-entwheel-template-grid {
        grid-template-columns: 1fr;
    }

    .pf-entwheel-hero-title {
        font-size: clamp(1.35rem, 2.4vw, 1.8rem);
    }

    .pf-entwheel-user-name,
    .pf-entwheel-dashboard-label {
        display: none;
    }

    .pf-entwheel-user-pill,
    .pf-entwheel-btn-dashboard {
        min-width: 42px;
        height: 42px;
        padding: 0 10px;
        justify-content: center;
    }

    .pf-entwheel-user-pill {
        gap: 6px;
    }

    .pf-entwheel-bubu-pill {
        padding: 3px 6px;
        font-size: 0.7rem;
    }

    .pf-entwheel-btn-dashboard .pf-entwheel-dashboard-logo {
        width: 26px;
        height: 26px;
    }

    .pf-entwheel-footer {
        grid-template-columns: 1fr;
        justify-items: center;
        padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
        gap: 4px;
    }

    .pf-entwheel-footer-left,
    .pf-entwheel-footer-right {
        display: none;
    }

    .pf-entwheel-footer-center,
    .pf-entwheel-footer-runtime {
        max-width: 100%;
        text-align: center;
    }

    .pf-entwheel-wheel-container {
        min-height: 380px;
        margin: 0 0 12px;
        padding-block: 22px;
    }

    .pf-entwheel-stage-status-card {
        grid-column: auto;
        min-height: 160px;
    }
}

@media (max-width: 768px) {
    .pf-entwheel-header,
    .pf-entwheel-footer,
    .pf-entwheel-body {
        padding-inline: 16px;
    }

    .pf-entwheel-info-section {
        padding: 12px 14px;
        max-height: min(32vh, 260px);
        font-size: 0.82rem;
    }

    .pf-entwheel-info-meta {
        grid-template-columns: repeat(3, 1fr);
        gap: 7px;
    }

    .pf-entwheel-meta-block {
        padding: 9px 10px;
        border-radius: 12px;
    }

    .pf-entwheel-info-heading {
        font-size: 0.68rem;
        gap: 4px;
        margin-bottom: 4px;
    }

    .pf-entwheel-meta-icon svg {
        width: 13px;
        height: 13px;
    }

    .pf-entwheel-meta-value {
        font-size: 0.78rem;
        line-height: 1.3;
    }

    .pf-entwheel-header,
    .pf-entwheel-stage-head {
        flex-direction: row;
        align-items: center;
    }

    .pf-entwheel-stage-card-focus {
        padding: 18px;
    }

    .pf-entwheel-stage-actions {
        gap: 8px;
    }

    .pf-entwheel-stage-actions .pf-entwheel-action-btn,
    .pf-entwheel-stage-actions .pf-entwheel-spin-btn {
        min-height: 40px;
        padding: 10px 12px;
    }

    .pf-entwheel-footer {
        grid-template-columns: 1fr;
        min-height: 40px;
        justify-items: center;
        padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px));
        gap: 4px;
    }

    .pf-entwheel-header {
        flex-wrap: nowrap;
        padding: 10px 12px;
        gap: 8px;
    }

    .pf-entwheel-header-left {
        flex: 1 1 auto;
        min-width: 0;
        gap: 8px;
    }

    .pf-entwheel-header-right {
        flex-shrink: 0;
        gap: 8px;
        margin-left: auto;
    }

    .pf-entwheel-drag-handle,
    .pf-entwheel-icon-wrapper {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .pf-entwheel-icon svg {
        width: 27px;
        height: 27px;
    }

    .pf-entwheel-icon svg {
        width: 24px;
        height: 24px;
    }

    .pf-entwheel-title {
        font-size: 1.05rem;
        line-height: 1.18;
        padding-bottom: 0.06em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .pf-entwheel-meta,
    .pf-entwheel-user-name,
    .pf-entwheel-dashboard-label {
        display: none;
    }

    .pf-entwheel-user-pill,
    .pf-entwheel-btn-dashboard {
        min-width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
    }

    .pf-entwheel-btn-dashboard .pf-entwheel-dashboard-logo {
        width: 26px;
        height: 26px;
    }

    .pf-entwheel-dashboard-submenu {
        right: -2px;
        min-width: 190px;
    }

    .pf-entwheel-dashboard-submenu-item {
        font-size: 0.75rem;
    }

    .pf-entwheel-header-right,
    .pf-entwheel-footer-center {
        max-width: 100%;
        justify-content: center;
        text-align: center;
    }

    .pf-entwheel-user-pill {
        gap: 6px;
        padding: 0;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.16);
        border: 1px solid rgba(255, 255, 255, 0.22);
        box-shadow: none;
    }

    .pf-entwheel-user-avatar {
        width: 32px;
        height: 32px;
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9), 0 1px 4px rgba(8, 17, 31, 0.16);
    }

    .pf-entwheel-avatar-image {
        transform: scale(1.16);
    }

    .pf-entwheel-bubu-pill {
        margin-right: 6px;
    }

    .pf-entwheel-form-actions,
    .pf-entwheel-stats {
        grid-template-columns: 1fr;
    }

    .pf-entwheel-panel-card,
    .pf-entwheel-stage-card,
    .pf-entwheel-hero-card,
    .pf-entwheel-result {
        padding: 16px;
    }

    .pf-entwheel-wheel-container {
        min-height: 320px;
        margin: 0 0 10px;
        padding-block: 18px;
    }

    .pf-entwheel-pointer {
        border-top-width: 14px;
        border-bottom-width: 14px;
        border-right-width: 28px;
    }
}

@media (max-width: 768px) {
    .pf-entwheel-panel-overlay {
        padding: 12px;
    }

    .pf-entwheel-panel-dialog {
        border-radius: 18px;
    }

    .pf-entwheel-panel-dialog-header {
        padding: 16px 16px 0;
    }

    .pf-entwheel-panel-dialog-body {
        padding: 16px;
    }

    .pf-entwheel-panel-dialog-footer {
        padding: 12px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .pf-entwheel-box {
        max-width: 100%;
    }

    .pf-entwheel-box.overlay-mode {
        width: 100%;
        height: 100%;
        max-height: 100%;
        --pf-overlay-shell-box-radius: 0;
        border-radius: 0;
        margin: 0;
    }

    .pf-entwheel-header {
        min-height: clamp(50px, 11vw, 56px);
        padding: 8px 10px;
        gap: 8px;
    }

    .pf-entwheel-header-left,
    .pf-entwheel-header-right {
        gap: 8px;
    }

    .pf-entwheel-drag-handle,
    .pf-entwheel-icon-wrapper {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .pf-entwheel-icon svg {
        width: 29px;
        height: 29px;
    }

    .pf-entwheel-title {
        font-size: 0.98rem;
        line-height: 1.18;
        padding-bottom: 0.06em;
    }

    .pf-entwheel-body {
        padding: 6px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        scroll-padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px));
    }

    .pf-entwheel-stage-card-focus {
        padding: 16px;
    }

    .pf-entwheel-hero-card,
    .pf-entwheel-panel-card,
    .pf-entwheel-stage-card,
    .pf-entwheel-options-preview,
    .pf-entwheel-stats,
    .pf-entwheel-result,
    .pf-entwheel-info-description,
    .pf-entwheel-meta-block {
        border-radius: 16px;
    }

    .pf-entwheel-footer {
        min-height: 38px;
        padding: clamp(6px, 2.2vw, 8px) clamp(7px, 2.6vw, 10px) calc(clamp(6px, 2.2vw, 8px) + env(safe-area-inset-bottom, 0px));
    }

    .pf-entwheel-header,
    .pf-entwheel-footer {
        border-radius: 0;
    }

    .pf-entwheel-wheel-container {
        padding-block: 14px;
    }

    .pf-entwheel-footer-center {
        font-size: 0.74rem;
        line-height: 1.05;
    }

    .pf-entwheel-footer-runtime {
        max-width: 100%;
        font-size: 0.74rem;
        text-align: center;
    }

    .pf-entwheel-stage-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .pf-entwheel-stage-step {
        min-height: auto;
        padding: 12px;
    }

    .pf-entwheel-stage-step-content {
        gap: 8px;
    }

    .pf-entwheel-stage-editor {
        gap: 12px;
    }

    .pf-entwheel-stage-answer-shell {
        flex-wrap: wrap;
    }

    .pf-entwheel-stage-template-trigger {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .pf-entwheel-stage-status-card,
    .pf-entwheel-wheel-container {
        min-height: 360px;
    }

    .pf-entwheel-stage-status-card {
        min-height: 150px;
    }

    .pf-entwheel-topnav-spacer {
        height: 0;
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    .pf-entwheel-box,
    .pf-entwheel-box.overlay-mode,
    .pf-entwheel-header,
    .pf-entwheel-footer {
        border-radius: 0;
    }

    .pf-entwheel-layout-wrapper,
    .pf-entwheel-box,
    .pf-entwheel-box.overlay-mode,
    .pf-entwheel-app,
    .pf-entwheel-module,
    .pf-entwheel-header,
    .pf-entwheel-footer,
    .pf-entwheel-header::before,
    .pf-entwheel-footer::before {
        border-radius: 0 !important;
    }
}

/* ── Profile Sub-Overlay ── */
.pf-entwheel-profile-suboverlay {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    overflow: hidden;
}

.pf-entwheel-profile-suboverlay[hidden] {
    display: none !important;
}

.pf-entwheel-profile-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 14, 26, 0.64);
    backdrop-filter: blur(42px) saturate(0.9) contrast(0.78) brightness(0.52);
    -webkit-backdrop-filter: blur(42px) saturate(0.9) contrast(0.78) brightness(0.52);
    cursor: pointer;
}

.pf-entwheel-profile-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: none;
    animation: none;
}

@keyframes pf-entwheel-profile-slide-in {
    from { transform: translateX(100%); opacity: 0.6; }
    to   { transform: translateX(0);    opacity: 1; }
}

.pf-entwheel-profile-iframe {
    width: 100%;
    flex: 1;
    border: none;
    display: block;
    background: transparent;
}
