/*
 * =============================================================================
 * MY-MAIN.CSS – Table of Contents
 * =============================================================================
 *
 * 1. VARIABLES & RESETS ............... Base styles, box-sizing
 * 2. UTILITIES ....................... .d-none, .flex-*, .mg-*, .row-one
 * 3. FORM CONTROLS ................... input, checkbox, select
 * 4. COMPONENTS ...................... SVG, Navbar, Content panels
 * 5. WHEEL CUSTOMIZER ................ Tabs, controls, theme library
 * 6. WHEEL SECTION .................. Spin button, layer editor
 * 7. PAGES .......................... Homepage, FAQ, Informational, Footer
 * 8. MODALS ......................... Winner dialog, Gallery, Toast
 * 9. FULLSCREEN & 404 ................ Fullscreen mode, Error page
 * 10. MEDIA QUERIES .................. Responsive (990px, 550px, 350px)
 *
 * =============================================================================
 */

/* ===== 1. VARIABLES & RESETS ===== */
:root {
    --color-layer-1: #e74d3d;
    --color-layer-1diff: #542cd8;
    /* Nền trang: đặt ở :root để dùng chung cho html (fullscreen) và body */
    --tw-gradient-bg-fu: #c8e6d6, #e6dded, #c8e6d6;
}

/* Gradient trên html: khi requestFullscreen(documentElement), trình duyệt vẽ nền của <html>;
   nếu chỉ đặt gradient trên body thì vào fullscreen thường chỉ thấy nền đen / mất gradient. */
html {
    min-height: 100%;
    background-image: linear-gradient(to right, var(--tw-gradient-bg-fu));
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100%;
    /* Trùng lặp không cần: nền do html; transparent để không che khi fullscreen */
    background: transparent;
}

/* Một số engine vẫn cần nhắc lại nền trên pseudo fullscreen */
html:fullscreen,
html:-webkit-full-screen,
html:-ms-fullscreen {
    background-image: linear-gradient(to right, var(--tw-gradient-bg-fu));
}

html,
body {
    overflow-x: clip;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

p {
    margin: 0px;
    padding: 0px;
}

/* ===== 2. UTILITIES ===== */
.d-none {
    display: none !important;
}

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    left: -99px;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.width-100 {
    width: 100%;
}

.mg-r-5 {
    margin-right: 5px;
}

.mg-r-10 {
    margin-right: 10px;
}

.mg-l-5 {
    margin-left: 5px;
}

.mg-l-10 {
    margin-left: 10px;
}

.mg-l-20 {
    margin-left: 20px;
}

.mg-l-30 {
    margin-left: 30px;
}

.mg-l-40 {
    margin-left: 40px;
}

.mg-b-10 {
    margin-bottom: 10px;
}

html .mg-t-10 {
    margin-top: 10px;
}

html .mg-t-20 {
    margin-top: 20px;
}

html .mg-t-30 {
    margin-top: 30px;
}

.flex-10 {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

.flex-15 {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
}

.flex-20 {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
}

.flex-align-start {
    align-items: flex-start;
}

.flex-shrink-fix {
    flex-shrink: 0;
}

.flex-content {
    flex: 1;
    min-width: 0;
    min-height: 0;
}

.row-one {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== 3. FORM CONTROLS ===== */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: var(--toggle-width, 60px);
    /* máº·c Ä‘á»‹nh 60px */
    height: var(--toggle-height, 30px);
    /* máº·c Ä‘á»‹nh 30px */
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch span {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: var(--toggle-off-bg, #ccc);
    transition: background-color .3s;
    border-radius: 999px;
}

.toggle-switch span::before {
    position: absolute;
    content: "";
    height: calc(var(--toggle-height, 30px) - 6px);
    width: calc(var(--toggle-height, 30px) - 6px);
    left: 3px;
    bottom: 3px;
    background-color: var(--toggle-handle-color, white);
    transition: transform .3s;
    border-radius: 50%;
}

.toggle-switch input:checked+span {
    background-color: var(--toggle-on-bg, #4CAF50);
}

.toggle-switch input:checked+span::before {
    transform: translateX(calc(var(--toggle-width, 60px) - var(--toggle-height, 30px)));
}


input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 24px;
    height: 24px;
    border: 2px solid #007BFF;
    border-radius: 6px;
    margin: 0px;
    padding: 0px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease-in-out;
}

input[type="checkbox"]:checked {
    background-color: #007BFF;
    border-color: #0056b3;
}

input[type="checkbox"]::before {
    content: "✔";
    /* Unicode checkmark */
    font-size: 18px;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

input[type="checkbox"]:checked::before {
    opacity: 1;
}

input[type="checkbox"]:hover {
    background-color: #bbd3ed;
}

input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 24px;
    height: 24px;
    border: 2px solid #007BFF;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease-in-out;
}

input[type="radio"]:checked {
    border-color: #0056b3;
    background-color: #007BFF;
}

input[type="radio"]::before {
    content: "";
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    pointer-events: none;
}

input[type="radio"]:checked::before {
    opacity: 1;
}

input[type="color"] {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    padding: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 0;
}

input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 0;
}

input[type="text"],
input[type="number"] {
    padding: 10px;
    border: 1px solid #d5dae3;
    border-radius: 10px;
    background: #fff;
    color: #000;
    font: inherit;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

input[type="text"]:focus-visible,
input[type="number"]:focus-visible {
    outline: none;
    border-color: #3369e8;
    box-shadow: 0 0 0 3px rgba(51, 105, 232, 0.2);
}

.cc-select-basic {
    position: relative;
    height: 36px;
    overflow: hidden;
    border: 1px solid #dcdfe4;
    border-radius: 7px;
    background: #fff;
}

.cc-select-basic.open {
    border-bottom: 2px solid #007bff;
}

.cc-select-basic-option {
    height: 36px;
    padding: 0 12px;
    line-height: 36px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* ready */

.cc-select-basic.cc-ready {
    overflow: visible;
}

/* button */

.cc-select-basic-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 12px;
    cursor: pointer;
    min-width: 0;
}

.cc-select-basic-value {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.cc-select-basic-arrow {
    font-size: 12px;
    transition: .18s;
}

.cc-select-basic.open .cc-select-basic-arrow {
    transform: rotate(180deg);
}

/* dropdown */

.cc-select-basic-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    margin-top: 6px;
    background: #fff;
    border: 1px solid #dcdfe4;
    border-radius: 7px;
    max-height: min(400px, 75vh);
    max-height: min(400px, 75dvh);
    overflow: auto;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
    opacity: 0;
    transform: translateY(-5px);
    pointer-events: none;
    transition: .18s;
    z-index: 1;
}

.cc-select-basic.open .cc-select-basic-dropdown {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.scrollinto-top .cc-select-basic-dropdown {
    top: inherit;
    margin-top: inherit;
    bottom: 100%;
    margin-bottom: 6px;
}

.cc-select-basic-option:hover {
    background: #c9cfd7;
}

.cc-select-basic-option.active {
    background: #1679e4;
    color: #fff;
}

/* ===== 4. COMPONENTS ===== */
.svg-style {
    display: inline-block;
    width: 1em;
    height: 1em;
    font-size: inherit;
}

.svg-style svg {
    width: 100%;
    height: 100%;
    display: block;
}

.navbar-brand {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
    height: 60px;
    font-size: 25px;
}

.navbar-brand img {
    width: 50px;
}

.pn-nb-logo a {
    color: white;
    text-decoration: none;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: normal;
}

.pn-nb-logo a img {
    width: 50px;
    height: 50px;
}

.pn-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0px 20px;
    color: #fff;
    position: relative;
    min-height: 60px;
    background: #3369e8;
    background-image: linear-gradient(135deg, #00f3c4, #572ee5, #823af3);
}



.pn-navbar-menu {
    display: flex;
    gap: 10px;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    margin-left: 20px;
    z-index: 10;
    font-size: 1.2rem;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.pn-navbar-menu a,
.pn-navbar-menu .pn-navbar-menu-btn,
.pn-nb-dropdown-toggle {
    text-decoration: none;
    color: #fff;
    --color-layer-1: #fff;
    padding: 8px 12px;
    cursor: pointer;
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pn-navbar-menu a:hover,
.pn-navbar-menu .pn-navbar-menu-btn:hover,
.pn-nb-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.pn-navbar-menu a.active,
.pn-navbar-menu .pn-navbar-menu-btn.active {
    background: rgba(255, 255, 255, 0.2);
}

.pn-navbar-menu .pn-navbar-menu-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    font: inherit;
}

.pn-nb-dropdown {
    position: relative;
}

.pn-nb-dropdown-toggle::after {
    content: "▼";
    font-size: 12px;
}

.pn-nb-dropdown.open .pn-nb-dropdown-toggle::after {
    content: "➤";
}

.pn-nb-dropdown-toggle.f32 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pn-nb-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: auto;
    background: white;
    color: #333;
    min-width: 250px;
    max-width: 90vw;
    max-width: 90dvw;
    border-radius: 6px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 100;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 5px 0px;
}

.pn-nb-dropdown.align-right .pn-nb-dropdown-menu {
    right: 0;
    left: auto;
}

.pn-nb-dropdown-menu a,
.pn-nb-dropdown-menu .pn-navbar-menu-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 10px 15px;
    color: #333;
    --color-layer-1: #000;
    background: none;
    border: none;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.pn-nb-dropdown-menu a:hover,
.pn-nb-dropdown-menu .pn-navbar-menu-btn:hover {
    background: #e3e3e3;
}

.pn-nb-dropdown.open .pn-nb-dropdown-menu {
    display: flex;
    transition: all 0.8s ease;
    gap: 5px;
    flex-direction: column;
}

.pn-nb-dropdown-menu.dropdown-lang a {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 20px;
}

.pn-dropdown-mode .pn-nb-dropdown-menu .btn-mode {
    gap: 10px;
    line-height: 1.5rem;
}

.pn-dropdown-mode .pn-dropdown-mode-title {
    display: none;
}

.pn-dropdown-mode .pn-nb-dropdown-toggle span.pn-dropdown-mode-icon {
    display: flex;
    align-items: center;
}

.pn-fullscreen-btn .pn-fullscreen-btn-text {
    display: none;
}

/* Mobile burger */
.pn-nb-burger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    border: 2px solid #d4d4d4;
    padding: 7px;
}

.pn-nb-burger:hover {
    outline: none;
    box-shadow: 0 0 0 4px rgb(255 255 255 / 79%);
}

.pn-nb-burger span {
    width: 25px;
    height: 3px;
    background: white;
}

.navbar-custom {
    background-color: #2563eb;
    padding: 0px;
}

.navbar-custom .nav-link {
    color: #fff;
    font-size: 1.1rem;
}

/* ---- 4.1 Layout: Content & Sidebar ---- */
.pn-content {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 20px 10px 0px;
    padding-bottom: 10px;
    min-height: 300px;
    width: calc(100% - 20px);
}

.pn-wheel-view .pn-content {
    padding-bottom: 10px;
}

.pn-content-container {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

.pn-ctc-pagebackground {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    box-sizing: border-box;

    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
    background-size: cover;

    min-height: 440px;
    height: 95vh;
    height: 95dvh;
    padding-left: max(0px, env(safe-area-inset-left, 0px));
    padding-right: max(0px, env(safe-area-inset-right, 0px));
}

.pn-wheel-view {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
}

/* Tablet / mobile: fixed background hay lỗi trên iOS Safari */
@media (max-width: 1024px) {
    .pn-ctc-pagebackground,
    .c-wheel-section-container {
        background-attachment: scroll;
    }
}

.pn-ctn-center {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    width: 100%;
}

.pn-ctc-title {
    width: min(90%, 90vw);
    width: min(90%, 90dvw);
    margin: 20px auto 0px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pn-ctc-title .pn-ctc-title {
    font-size: 2rem;
    font-weight: normal;
    word-wrap: break-word;
    margin: 0px;
    padding: 0px;
    display: inline;
    width: 100%;
    text-align: center;
}

.pn-ctc-title-shortdescription {
    font-size: 1.2rem;
    font-weight: normal;
    word-wrap: break-word;
    margin-top: 10px;
    display: inline;
    width: 100%;
    text-align: center;
}

.pn-ctc-content {
    flex: 1;
    min-height: 0;
    overflow-x: clip;
    overflow-y: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 100%;
    position: relative;
    box-sizing: border-box;
    /* Neo .wheel-control-ext-layout (absolute) + chừa chỗ nút resize; safe-area home indicator */
    padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
}

.pn-ctc-logo-plus {
    display: none;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    width: 100%;
    margin-bottom: 10px;
}

.pn-ctc-logo-plus img {
    width: 30px;
    height: 30px;
    margin-right: 10px;
}

.pn-ctc-logo-plus span {
    background: linear-gradient(90deg, red, green, violet);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pn-ctc-toolbar {
    flex-shrink: 0;
}

.pn-ctn-right {
    position: relative;
    flex: 0 0 auto;
    width: min(500px, 35%);
    display: flex;
    transition: width 0.25s ease, min-width 0.25s ease;

    height: 100%;
}

.pn-ctn-right.pn-ctn-right--hidden {
    display: none !important;
}

.pn-ctn-right-inner {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    transition: opacity 0.2s ease;
    padding-left: 28px;
    padding: 1px;
}

.pn-ctn-right-toggle {
    position: absolute;
    left: -26px;
    top: 5px;
    z-index: 1;
    width: 28px;
    height: 38px;
    background: #2563eb;
    border: 1px solid #2563eb;
    --color-layer-1: #f50000;
    border-radius: 6px 0px 0px 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #2563eb;
    transition: background 0.2s, color 0.2s, border-color 0.2s, left 0.25s, top 0.25s, transform 0.25s;
    box-shadow: 1px 0 2px rgba(0, 0, 0, 0.06);
}

.pn-ctn-right-toggle:hover {
    background: #eff6ff;
    border-color: #1d4ed8;
}

.pn-ctn-right.pn-ctn-right--collapsed {
    width: 56px;
    min-width: 56px;
    border-radius: 8px;
    overflow: hidden;
}

.pn-ctn-right.pn-ctn-right--collapsed .pn-ctn-right-toggle {
    left: 50%;
    top: 10px;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #2563eb;
    background: #fff;
    color: #2563eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pn-ctn-right.pn-ctn-right--collapsed .pn-ctn-right-toggle:hover {
    background: #eff6ff;
    border-color: #1d4ed8;
}

.pn-ctn-right.pn-ctn-right--collapsed .pn-ctn-right-inner {
    overflow: visible;
    padding-top: 48px;
    padding-left: 0;
}

.pn-ctn-right.pn-ctn-right--collapsed .pn-ctr-wheel-custom {
    box-shadow: none;
}

.pn-ctn-right.pn-ctn-right--collapsed .pn-ctr-tabs {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 10px;
    padding: 12px 8px;
    border: none;
    background: #f5f5f5;
    border-radius: 0 0 8px 8px;
}

.pn-ctn-right.pn-ctn-right--collapsed .pn-ctr-tab {
    flex-direction: column;
    max-width: none;
    padding: 12px 8px;
    min-width: 40px;
    border-radius: 6px;
}

.pn-ctn-right.pn-ctn-right--collapsed .pn-ctr-tab span:nth-child(2) {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    white-space: nowrap;
    flex: none;
}

.pn-ctn-right.pn-ctn-right--collapsed .pn-ctr-tab.active {
    margin-top: 0;
    margin-bottom: 0;
    border: none;
    background: #2563eb;
    color: #fff;
    --color-layer-1: #fff;
}

.pn-ctn-right.pn-ctn-right--collapsed .pn-ctr-tab.active:hover {
    background: #1d4ed8;
}

.pn-ctn-right.pn-ctn-right--collapsed .pn-ctr-tab span:last-child {
    display: none;
}

.pn-ctn-right.pn-ctn-right--collapsed .pn-ctr-sub-tabs-container,
.pn-ctn-right.pn-ctn-right--collapsed .pn-ctr-content-container,
.pn-ctn-right.pn-ctn-right--collapsed .pn-lib-meta {
    display: none !important;
}

.pn-ctn-right.pn-ctn-right--collapsed .pn-ctr-wheel-custom {
    min-height: 180px;
}

/* ===== 5. WHEEL CUSTOMIZER ===== */
.pn-ctr-wheel-custom {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 100%;
    box-shadow: 0 1px 3px #0003, 0 1px 1px #00000024, 0 2px 1px -1px #0000001f;
    border-radius: 8px;
    height: 90vh;
    height: 90dvh;
    min-height: 300px;
    max-height: 100%;
}

.pn-ctr-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background: #e5e5e5;
    padding: 10px 10px 0px 10px;
    font-size: 1rem;
    border-bottom: 2px solid #2563eb;
}

.pn-ctr-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: #cecece;
    color: #000;
    --color-layer-1: #000;
    --color-layer-1diff: #e34747;
    padding: 10px 15px;
    transition: background 0.3s, border 0.25s ease, margin 0.25s ease, box-shadow 0.2s ease;
    cursor: pointer;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    flex: 0 1 auto;
    max-width: calc((100% - 20px) / 3);
    min-width: 0;
}

.pn-ctr-tab.active {
    border: 2px solid #2563eb;
    border-bottom: none;
    background-color: #dbeafe;
    margin-top: -5px;
    margin-bottom: -2px;
}

.pn-ctr-tab:hover {
    box-shadow:
        inset 2px 0 0 #2563eb,
        inset -2px 0 0 #2563eb,
        inset 0 2px 0 #2563eb;
}

.pn-ctr-tab span:first-child,
.pn-ctr-tab span:last-child {
    flex-shrink: 0;
}

.pn-ctr-tab span:nth-child(2) {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.pn-ctr-sub-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f2f2f2;
}

.pn-ctr-sub-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 15px;
    background: #dbdbdb;
    color: #000;
    --color-layer-1: #000;
    font-size: 0.9rem;
    border-radius: 5px;
    transition: background 0.3s, border 0.25s ease;
    cursor: pointer;
}

.pn-ctr-sub-tab.active {
    box-shadow: inset 0 0 0 2px #3369e8;
    background-color: #cfdaf6;
}

.pn-ctr-sub-tab:hover {
    box-shadow: inset 0 0 0 2px #2563eb;
}

.pn-ctr-content-track {
    --total-panels: 7;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    position: relative;
}

.pn-ctr-content {
    width: 100%;
    height: 100%;
    background-color: #fff;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 10px;
    font-size: 1rem;
    min-height: 0;
    display: none;
}

.pn-ctr-content.is-active {
    display: block;
}

.pn-ctr-content.is-animating {
    display: block !important;
    position: absolute;
    inset: 0;
}

.pn-ctr-sub-tabs.pn-ctr-sub-tabs-hidden {
    display: none;
}

.pn-ctr-content-container {
    flex: 1;
    position: relative;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: hidden;
}

.pn-ctr-tab span:first-child {
    flex-shrink: 0;
}

.pn-ctr-tab span:nth-child(2) {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.pn-ctrct-group-title {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: bold;
    font-size: 1rem;
    width: 100%;
    --color-layer-1: #eb9389;
    --color-layer-2: #4400ff;
}

.pn-ctrct-group-title:after {
    content: '';
    flex: 1;
    border-top: 2px solid #b6b0d9;
}

.pn-ctrct-group-content {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e8eaed;
    min-width: 0;
}

.pn-ctrct-group-checkbox {
    line-height: 32px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pn-ctrct-group-cbbox {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.pn-ctrct-group-cbbox .cc-select-basic {
    flex: 1;
    min-width: 0;
}

.pn-ctrct-group-cbbox input[type="color"] {
    flex: 0 0 auto;
    width: 56px;
    height: 36px;
    border: 1px solid #d5dae3;
    border-radius: 9px;
    padding: 3px;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
    cursor: pointer;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.pn-ctrct-group-cbbox input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.pn-ctrct-group-cbbox input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
}

.pn-ctrct-group-cbbox input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 6px;
}

.pn-ctrct-group-cbbox input[type="color"]:hover {
    border-color: #89a0ff;
    transform: translateY(-1px);
}

.pn-ctrct-group-cbbox input[type="color"]:focus-visible {
    outline: none;
    border-color: #3369e8;
    box-shadow: 0 0 0 3px rgba(51, 105, 232, 0.22);
}

.pn-ctrct-group-range {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.pn-ctrct-group-input {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
    row-gap: 10px;
    column-gap: 15px;
}



.pn-ctrct-subcontrols {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.pn-ctrct-subcontrols.is-disabled-soft {
    opacity: 0.52;
}

.pn-ctrct-group-range input[type="range"] {
    flex: 1;
    min-width: 0;
}

.pn-ctrct-group-range input[type="range"]:hover {
    cursor: pointer;
}

.pn-ctrct-group-input input[type="text"],
.pn-ctrimal-preview input[type="text"] {
    flex: 1;
    min-width: 0;
    max-width: 100%;
}

.inp-quill-editor {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    min-height: 100px;
    max-height: 250px;
    background: #fff;
    overflow: hidden;
}

.pn-ctr-content .inp-quill-editor {
    border: none;
    padding: 1px;
    height: 100%;
    max-height: 100%;
    width: 100%;
}

#inpCwcInfoDescription {
    width: 100%;
    max-width: 100%;
}

#inpCwcItemsModText .ql-editor {
    max-height: 100%;
    padding-bottom: 50px;
}

.inp-quill-editor .ql-container {
    border: 1px solid #d5dae3;
    border-radius: 10px;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}

/* Focus: container + root (nhiều lớp để đảm bảo hiển thị) */
#inpCwcItemsModText:focus-within .ql-container,
#inpCwcItemsModText.is-focused .ql-container,
#inpCwcItemsModText[data-quill-focused="1"] .ql-container,
.inp-quill-editor:focus-within .ql-container,
.inp-quill-editor.is-focused .ql-container,
.inp-quill-editor[data-quill-focused="1"] .ql-container {
    border: 2px solid #3369e8 !important;
    box-shadow: inset 0 0 0 1px rgba(51, 105, 232, 0.2) !important;
}

.inp-quill-editor .ql-editor {
    padding: 10px 12px;
    color: #000;
    min-height: 150px;
    max-width: 100%;
    max-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overflow-wrap: break-word;
    word-break: break-word;
    outline: none !important;
    border-radius: 8px;
    box-shadow: inset 0 1px 2px #0a0a0a4d;
    border: 1px solid #ccc;
}

/* Focus ring trực tiếp trên ql-editor (inset, không bị clip bởi overflow) */
.inp-quill-editor .ql-editor:focus,
.inp-quill-editor .ql-editor.ql-blank:focus {
    outline: none !important;
    box-shadow: inset 0 0 0 2px #3369e8 !important;
}

.inp-quill-editor p {
    margin: 5px 0px;
    padding: 2px 0;
    line-height: 2rem;
    border-bottom: 1px solid #e8e8e8;
    display: block;
    display: flex;
    align-items: center;
}

.inp-quill-editor p:last-child,
.inp-quill-editor p:first-child {
    margin: 0px;
}

.inp-quill-editor p img {
    height: 25px;
    width: auto;
    flex-shrink: 0;
    margin-right: 10px;
}

.inp-quill-editor p:empty::before {
    content: "\00a0";
}

.inp-quill-editor .ql-editor.ql-blank::before {
    color: rgba(0, 0, 0, 0.45);
}

/* Read-only: ẩn placeholder khi trống, tránh trồng lên item */
.inp-quill-editor[data-readonly="1"] .ql-editor.ql-blank::before {
    display: none;
}

/* Copy This Wheel – overlay phủ list, nút nổi giữa */
.pn-ctr-content--has-overlay {
    position: relative;
}

.p-crwc-txt-over-bg {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.45) 100%);
    border-radius: 8px;
}

.p-crwc-txt-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    --color-layer-1: #fff;
    background: linear-gradient(135deg, #3369e8 0%, #2a5ad4 100%);
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(51, 105, 232, 0.4);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.p-crwc-txt-copy-btn:hover {
    background: linear-gradient(135deg, #4280f0 0%, #3369e8 100%);
    box-shadow: 0 6px 20px rgba(51, 105, 232, 0.5);
    transform: translateY(-2px) scale(1.02);
}

.p-crwc-txt-copy-btn:active {
    transform: translateY(0) scale(0.98);
}

.p-crwc-txt-copy-btn .svg-load,
.p-crwc-txt-copy-btn .svg-load svg {
    color: inherit;
    fill: currentColor;
}


.pn-ctrct-range-value {
    min-width: 1.5em;
    text-align: right;
}

.pn-ctrct-sound-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 10px;
    --color-layer-1: #000000;
}

.pn-ctrct-sound-actions .btn-resize {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pn-ctrct-sound-volume {
    width: 100%;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.pn-ctrct-sound-icon {
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 10px;
}

.pn-ctrct-sound-icon.is-active {
    background: transparent;
    border-color: transparent;
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.22);
}

.pn-ctrct-sound-icon.is-active:hover:not(:disabled) {
    background: #c4c4c4;
    border-color: #c4c4c4;
}

.pn-ctrct-sound-icon .svg-load {
    pointer-events: none;
}

.pn-ctrct-group-url {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.pn-ctrct-group-url-content {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid #007BFF;
    border-radius: 8px;
    padding: 0 10px;
    min-height: 35px;
}

.pn-ctrct-group-url-text {
    flex: 1;
    min-width: 0;
}

.pn-ctrct-group-url-remove {
    cursor: pointer;
    --color-layer-1: #ff0000;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.pn-ctrct-group-url-remove:hover {
    --color-layer-1: #ff5a5a;
    transform: translateY(-1px) scale(1.05);
}

.pn-ctrct-group-url-remove:active {
    transform: scale(0.96);
}

.pn-ctrct-group-actions {
    display: flex;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #dcdfe4;
    background: #f5f6f8;
}

.pn-ctrct-action {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    min-width: 0;
    padding: 10px 12px;
    font-size: 0.95rem;
    font-weight: 500;
    --color-layer-1: #5a6376;
    color: #5a6376;
    background: transparent;
    border: none;
    border-right: 1px solid #dcdfe4;
    cursor: pointer;
    transition: color 0.18s, background 0.18s;
}

.pn-ctrct-action:last-child {
    border-right: none;
}

.pn-ctrct-action:hover {
    background: #e8eaed;
    color: #333;
}

.pn-ctrct-action.active {
    background: #fff;
    color: #007BFF;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.06);
}

.pn-ctrct-action:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: #eef1f5;
    color: #8a94a6;
}

.pn-ctrct-action:disabled:hover {
    background: #eef1f5;
    color: #8a94a6;
    transform: none;
}

.pn-ctrct-group-actions.is-disabled-soft {
    opacity: 0.72;
}

.pn-ctrct-decoration-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.pn-ctrct-decoration-limit {
    margin: -2px 0 2px;
    font-size: 0.85rem;
    color: #b45309;
}

.pn-ctrct-decoration-empty {
    padding: 10px 12px;
    border: 1px dashed #d5dae3;
    border-radius: 8px;
    background: #f8f9fa;
    color: #6b7280;
}

.pn-ctrct-decoration-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #dcdfe4;
    border-radius: 8px;
    background: #fff;
}

.pn-ctrct-decoration-name {
    flex: 1;
    min-width: 0;
}

.pn-ctrct-decoration-remove {
    flex: 0 0 auto;
    border: none;
    border-radius: 7px;
    padding: 7px 10px;
    background: #ffe5e5;
    color: #c62828;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease;
}

.pn-ctrct-decoration-remove:hover {
    background: #ffd3d3;
    transform: translateY(-1px);
}

.p-ctrct-results-editor {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 15px;
    min-width: 0;
    padding: 10px 12px;
    height: 100%;
    overflow-y: auto;
    box-shadow: inset 0 1px 2px #0a0a0a4d;
    border: 1px solid #ccc;
    border-radius: 10px;
    background: #fff;
    font-size: 1.1rem;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.p-ctrct-results-editor p {
    margin: 0;
    padding: 0 12px 0 0;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.p-ctrct-results-editor p:last-child {
    margin-bottom: 0;
}

.p-ctrct-results-editor p span {
    min-width: 0;
    flex: 1;
    white-space: nowrap;
}

.p-ctrct-results-editor img {
    display: inline-block;
    width: auto;
    height: 25px;
    object-fit: contain;
    vertical-align: middle;
}

/* pnCtrContentModAdv – 3 cột: control | content | action */
#pnCtrimalList,
.pn-ctrimal-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    padding: 10px 0;
    overflow-y: auto;
}

.pn-ctrimal-list-empty {
    padding: 12px 16px;
    border: 1px dashed #d5dae3;
    border-radius: 8px;
    background: #f8f9fa;
    color: #6b7280;
    font-size: 0.95rem;
}

.pn-ctrimal-add-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px 16px;
    margin-top: 4px;
    border: 1px dashed #d5dae3;
    border-radius: 8px;
    background: #f8f9fa;
    color: #6b7280;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.pn-ctrimal-add-row:hover {
    background: #eef0f3;
    border-color: #b0b4b8;
}

.pn-ctrimal-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    padding: 10px;
    border: 1px solid #dcdfe4;
    border-radius: 8px;
    background: #f8f9fa;
}

.pn-ctrimal-row.is-inactive {
    opacity: 0.6;
}

.pn-ctrimal-row.is-inactive .pn-ctrimal-col-content {
    pointer-events: none;
    user-select: none;
}

.pn-ctrimal-row[data-pn-ctrimal-draft="1"] .pn-ctrimal-settings,
.pn-ctrimal-row[data-pn-ctrimal-draft="1"] .pn-ctrimal-enable,
.pn-ctrimal-row[data-pn-ctrimal-draft="1"] .pn-ctrimal-duplicate {
    display: none;
}

.pn-ctrimal-col-control {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.move-up,
.move-down {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 22px;
    padding: 0;
    border: 1px solid #d5dae3;
    border-radius: 4px;
    background: transparent;
    --color-layer-1: #000000;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.move-up:hover,
.move-down:hover {
    background: #e8eaed;
    border-color: #b0b4b8;
}

.move-up.is-disabled,
.move-down.is-disabled {
    opacity: 0.35;
    pointer-events: none;
    cursor: default;
}

.move-up .svg-load,
.move-down .svg-load {
    pointer-events: none;
}

.pn-ctrimal-col-content {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.pn-ctrimal-preview {
    width: 100%;
    min-width: 0;
}

.pn-ctrimal-control {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex-wrap: wrap;
}

.pn-ctrimal-bgcolor {
    position: relative;
    flex-shrink: 0;
    border: 1px solid #d5dae3;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pn-ctrimal-bgcolor-icon {
    position: relative;
    z-index: 1;
    pointer-events: none;
}

.pn-ctrimal-bgcolor input[type="color"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.pn-ctrimal-bgcolor input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.pn-ctrimal-bgcolor input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
}

.pn-ctrimal-image {
    position: relative;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: 1px dashed #d5dae3;
    border-radius: 8px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pn-ctrimal-img-add {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    transition: color 0.15s ease, background 0.15s ease;
    --color-layer-1: #404040;
}

.pn-ctrimal-img-add:hover {
    background: #e8eaed;
    color: #3369e8;
}

.pn-ctrimal-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pn-ctrimal-img-clickable {
    cursor: pointer;
}

.pn-ctrimal-image:not(:has(.pn-ctrimal-img)) .pn-ctrimal-remove-img {
    display: none;
}

.pn-ctrimal-remove-img {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 26px;
    height: 26px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.pn-ctrimal-remove-img:hover {
    background: rgba(200, 0, 0, 0.8);
}

.pn-ctrimal-weight {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.pn-ctrimal-weight input[type="number"] {
    width: 62px;
}

.pn-ctrimal-weight .pn-ctrimal-percent {
    min-width: 2.2em;
    font-size: 0.9rem;
    color: #6b7280;
}

.pn-ctrimal-settings {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #d5dae3;
    border-radius: 50%;
    background: transparent;
    --color-layer-1: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.pn-ctrimal-settings:hover {
    background: #e8eaed;
    border-color: #b0b4b8;
    transform: scale(1.05);
}

.pn-ctrimal-settings .svg-load {
    pointer-events: none;
}

.pn-ctrimal-col-action {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pn-ctrimal-duplicate {
    flex-shrink: 0;
    padding: 0;
    min-width: 20px;
    min-height: 20px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #6b7280;
    --color-layer-1: #000;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.pn-ctrimal-duplicate:hover {
    background: #e8eaed;
    color: #3369e8;
}

.pn-ctrimal-duplicate .svg-load {
    pointer-events: none;
    display: block;
}

.pn-ctrimal-delete {
    flex-shrink: 0;
    padding: 0px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.pn-ctrimal-delete.is-disabled {
    opacity: 0.35;
    pointer-events: none;
}

.pn-ctrimal-delete:hover {
    background: #ffe5e5;
    color: #c62828;
}

.pn-ctrimal-delete .svg-load {
    pointer-events: none;
    display: block;
}

.pn-ctrimal-enable {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.pn-ctrimal-enable input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: #3369e8;
    cursor: pointer;
}

/* Item advanced modal */
.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-inner {
    display: flex;
    flex-direction: column;
    width: 600px;
    max-width: 85vw;
    max-width: 85dvw;
    max-height: 85vh;
    max-height: 85dvh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #e8eaed;
    background: #fff;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-icon {
    --color-layer-1: #1a1a1a;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-h-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    background: #e8eaed;
    color: #5f6368;
    transition: background 0.2s, color 0.2s;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-h-close:hover {
    background: #dadce0;
    color: #1a1a1a;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    border-bottom: 1px solid #e8eaed;
    background: #f8f9fa;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-nav-prev,
.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-nav-next {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dadce0;
    border-radius: 8px;
    background: #fff;
    font-size: 20px;
    cursor: pointer;
    color: #5f6368;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-nav-prev:hover,
.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-nav-next:hover {
    background: #e8eaed;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-nav-text {
    flex: 1;
    text-align: center;
    font-size: 0.95rem;
    color: #5f6368;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-nav-add {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dadce0;
    border-radius: 8px;
    background: #fff;
    font-size: 22px;
    cursor: pointer;
    color: #5f6368;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-nav-add:hover {
    background: #e8eaed;
    color: #3369e8;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-body {
    padding: 20px 18px;
    overflow-y: scroll;
    flex: 1;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-row-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-row-actions-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-btn-duplicate {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    min-width: 36px;
    min-height: 36px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    background: #f8f9fa;
    font-size: 0.9rem;
    cursor: pointer;
    color: #5f6368;
    --color-layer-1: #5f6368;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-btn-duplicate:hover {
    outline: none;
    border-color: #0001ff;
    box-shadow: 0 0 0 3px rgba(90, 51, 232, 0.2);
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-row-actions .pn-ctrct-item-adv-nav-add {
    width: auto;
    min-width: 36px;
    height: auto;
    padding: 8px 14px;
    line-height: 1;
    border: 1px solid #dadce0;
    border-radius: 8px;
    background: #f8f9fa;
    color: #5f6368;
    --color-layer-1: #5f6368;
    cursor: pointer;
    font-size: 1rem;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-row-actions .pn-ctrct-item-adv-nav-add:hover {
    outline: none;
    border-color: #0001ff;
    box-shadow: 0 0 0 3px rgba(90, 51, 232, 0.2);
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-btn-delete {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 8px;
    background: transparent;
    color: #5f6368;
    --color-layer-1: #ff0000;
    font-size: 0.9rem;
    cursor: pointer;
    border: 1px solid #dadce0;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-btn-delete:hover:not(.is-disabled) {
    outline: none;
    border-color: #ff0000;
    box-shadow: 0 0 0 3px rgb(232 51 51 / 20%);
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-btn-delete.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-color-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-bgcolor-wrap {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-bgcolor-wrap input[type="color"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    padding: 0;
    cursor: pointer;
    opacity: 0;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-bgcolor-wrap .pn-ctrct-item-adv-bgcolor-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    --color-layer-1: #fff;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-bgcolor-wrap .pn-ctrct-item-adv-bgcolor-icon svg {
    display: block;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-img-wrap {
    position: relative;
    flex-shrink: 0;
    min-width: 40px;
    min-height: 40px;
    border: 1px dashed #d5dae3;
    border-radius: 8px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-img-wrap.has-img {
    width: 40px;
    height: 40px;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-img-add {
    width: 100%;
    height: 100%;
    min-height: 40px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    color: #6b7280;
    transition: color 0.15s ease, background 0.15s ease;
    --color-layer-1: #404040;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-img-add-text {
    font-size: 0.9rem;
    white-space: nowrap;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-img-add:hover {
    background: #e8eaed;
    color: #3369e8;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-img-wrap .pn-ctrct-item-adv-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-img-wrap .pn-ctrct-item-adv-remove-img {
    display: none;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-img-wrap.has-img .pn-ctrct-item-adv-remove-img {
    display: flex;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-remove-img {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 26px;
    height: 26px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-remove-img:hover {
    background: rgba(220, 53, 69, 0.9);
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-weight-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-weight-wrap .pn-ctrct-item-adv-input {
    width: 60px;
    flex: none;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-weight-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dadce0;
    border-radius: 6px;
    background: #f8f9fa;
    font-size: 18px;
    cursor: pointer;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-weight-btn:hover {
    background: #e8eaed;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-probability {
    font-size: 0.9rem;
    color: #5f6368;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-row:last-child {
    margin-bottom: 0;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-label {
    flex: 0 0 110px;
    font-size: 0.9rem;
    color: #5f6368;
    white-space: nowrap;
    overflow: hidden;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    background: #f8f9fa;
    font-size: 0.95rem;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-input:focus {
    outline: none;
    border-color: #007bff;
    background: #fff;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-color-wrap {
    position: relative;
    width: 44px;
    height: 36px;
    border-radius: 8px;
    overflow: hidden;
    background: #007bff;
    cursor: pointer;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-color-wrap input[type="color"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    padding: 0;
    cursor: pointer;
    opacity: 0;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-color-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    --color-layer-1: #fff;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-winnerimg-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-winnerimg-wrap .pn-ctrct-item-adv-input {
    flex: 1;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-btn-addimg {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dadce0;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-btn-addimg:hover {
    background: #e8eaed;
    border-color: #b5b5b5;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-winnersound {
    flex: 1;
    min-width: 0;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 10px;
    background: #f1f1f1;
    border-top: 1px solid #e8eaed;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-footer button {
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    min-width: 80px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-f-close {
    background: #ccc;
    color: #000;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-f-close:hover {
    background: #b5b5b5;
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-f-ok {
    background: #007bff;
    color: #fff;
}

.pn-ctrct-item-adv-modal .pn-ctrct-item-adv-f-ok:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* color box */
.pn-ctrct-customtheme-chir {
    position: relative;
    width: 55px;
    height: 55px;
    border-radius: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
    cursor: pointer;
    transition: .15s;
}

.pn-ctrct-customtheme-chir:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, .25);
}

/* color input full */
.pn-ctrct-customtheme-chir input {
    width: 100%;
    height: 100%;
    border: none;
    padding: 0;
    cursor: pointer;
}

.pn-ctrct-customtheme-chir input::-webkit-color-swatch {
    border: none;
    border-radius: 14px;
}

.pn-ctrct-customtheme-chir input::-webkit-color-swatch-wrapper {
    padding: 0;
}

/* remove button */
.pn-ctrct-customtheme-chir-romove {
    position: absolute;
    top: -7px;
    right: -7px;
    --color-layer-1: #ff0000;
    background: #fff;
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .3);
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.pn-ctrct-customtheme-chir-romove:hover {
    background: #ffe5e5;
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
}

.pn-ctrct-customtheme-chir-romove:active {
    transform: scale(0.96);
}

/* add button */
.pn-ctrct-customtheme-chir-more {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    border: 2px dashed #bbb;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: .15s;
    background: #fafafa;
    --color-layer-1: #ff0000;
}

.pn-ctrct-customtheme-chir-more:hover {
    border-color: #888;
    background: #f0f0f0;
}

.pn-ctrct-rim-color {
    width: 100%;
}

.pn-ctrct-rim-color-border {
    width: 100%;
}

.pn-ctrct-rimcolorborder-chir {
    position: relative;
    width: 55px;
    height: 55px;
    border-radius: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
    cursor: pointer;
    transition: .15s;
}

.pn-ctrct-rimcolorborder-chir:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, .25);
}

.pn-ctrct-rimcolorborder-chir input[type="color"] {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 14px;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.pn-ctrct-rimcolorborder-chir input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 14px;
}

.pn-ctrct-rimcolorborder-chir input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.pn-ctrct-rimcolorborder-chir .svg-load {
    position: absolute;
    top: -7px;
    right: -7px;
    font-size: 22px;
    --color-layer-1: #ff0000;
    background: #fff;
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .3);
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.pn-ctrct-rimcolorborder-chir .svg-load:hover {
    background: #ffe5e5;
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
}

.pn-ctrct-rimcolorborder-chir .svg-load:active {
    transform: scale(0.96);
}

.pn-ctrct-rimcolorborder-chir-more {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    border: 2px dashed #bbb;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: .15s;
    background: #fafafa;
    --color-layer-1: #ff0000;
}

.pn-ctrct-rimcolorborder-chir-more .svg-load {
    font-size: 26px;
}

.pn-ctrct-rimcolorborder-chir-more:hover {
    border-color: #888;
    background: #f0f0f0;
}

/* Theme Library – preset themes (chọn, không chỉnh sửa), ~80 items */
.pn-ctrct-theme-chir-lazy {
    display: none !important;
}

.pn-ctrct-theme-library {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    width: 100%;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e8eaed;
}

.pn-ctrct-theme-chir {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    flex-shrink: 0;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    background: linear-gradient(135deg, #e0e0e0 0%, #bdbdbd 100%);
}

.pn-ctrct-theme-chir:hover {
    transform: scale(1.08);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    border-color: #007bff;
}

.pn-ctrct-theme-chir.selected {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.3);
}

.pn-ctrct-theme-library .pn-ctrct-theme-chir-more {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px dashed #bbb;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.15s;
    background: #fafafa;
}

.pn-ctrct-theme-library .pn-ctrct-theme-chir-more:hover {
    border-color: #888;
    background: #f0f0f0;
}

.pn-ctrct-theme-library::-webkit-scrollbar {
    width: 6px;
}

.pn-ctrct-theme-library::-webkit-scrollbar-track {
    background: #e8eaed;
    border-radius: 3px;
}

.pn-ctrct-theme-library::-webkit-scrollbar-thumb {
    background: #b0b4b8;
    border-radius: 3px;
}

.pn-ctrct-theme-library::-webkit-scrollbar-thumb:hover {
    background: #90959a;
}











.btn-cw-spin {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    background: #e94560;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.btn-cw-spin:hover:not(:disabled) {
    background: #ff6b6b;
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 8px 24px rgba(233, 69, 96, 0.45);
}

.c-wheel-section-container {
    width: 100%;
    max-width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
    background-size: cover;
    overflow-x: clip;
    overflow-y: visible;
    box-sizing: border-box;
}

/* ===== 6. WHEEL SECTION ===== */
.c-wheel-section {
    position: relative;
    box-sizing: border-box;
    min-width: 200px;
    width: 100%;
    /* Một công thức: vừa khung ngang + không tràn chiều cao khung nhìn (mobile có header/title) */
    max-width: min(90vmin, calc(100vw - 16px));
    max-width: min(90vmin, calc(100dvw - 16px));
    max-height: min(90vmin, calc(100vh - 12rem));
    max-height: min(90vmin, calc(100dvh - 12rem));
    aspect-ratio: 1 / 1;

    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.c-wheel-container {
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 1;
    position: relative;
    text-align: center;
    display: flex;
    justify-content: center;
    transform-origin: top;
    /* TrÃ¡nh reflow khi quay (Z-demo) */
    padding: 0;
}

.c-wheel-canvas {
    display: block;
    max-width: 100%;
    height: auto;
    aspect-ratio: 1;
    width: min(100%, var(--wheel-render-size, 800px));
    cursor: pointer;
    touch-action: none;
    border-radius: 50%;
    box-shadow: var(--shadow);
}

.c-wheel-pointer {
    background-image: url('../img/spin1.webp');
    --pivotY: 33%;
    top: -3.5%;
    z-index: 3;

    width: 7%;
    position: absolute;
    aspect-ratio: 1/1;
    left: 50%;
    transform: translateX(-50%) rotate(0deg);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    transform-origin: 50% var(--pivotY);
    transition: transform .35s ease;
    pointer-events: none;
}

.c-wheel-pointer svg {
    width: 100%;
    height: 100%;
    display: block;
}

.c-wheel-pointer.spining {
    transform: translateX(-50%) rotate(-45deg);
}

.c-wheel-center-logo {
    width: 20%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    z-index: 1;
    cursor: pointer;
    pointer-events: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-position-x: center;
    background-position-y: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.c-wheel-rim {
    display: none;
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    object-fit: contain;

    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 1 / 1;
    pointer-events: none;
    z-index: 3;
}

.c-wheel-container-extra-layout {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.c-wheel-container-extra-layout * {
    pointer-events: none;
}

.c-wheel-section.is-interact-mode {
    outline: 2px dashed #3b82f6;
    outline-offset: 50px;
}

@media (max-width: 640px) {
    .c-wheel-section.is-interact-mode {
        outline-offset: 14px;
    }
}

.c-wheel-section.is-interact-mode .c-wheel-container-extra-layout,
.c-wheel-section.is-interact-mode .c-wheel-container-extra-layout * {
    pointer-events: auto;
}

.cw-extra-item {
    position: absolute;
    left: 0;
    top: 0;
    box-sizing: border-box;
    user-select: none;
    touch-action: none;
    z-index: 3;
}

.cw-extra-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
    pointer-events: none;
}

.cw-extra-item.is-selected {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
    border-radius: 8px;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
}

/* NÃºt xoay: vÃ²ng trÃ²n + cháº¥m nhá» gá»£i â€œnÃºm xoayâ€, kÃ©o Ä‘á»ƒ xoay item */
.cw-extra-rotate {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #d97706;
    background: #fff7ed;
    cursor: grab;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
    display: none;
}

.cw-extra-rotate::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 50%;
    width: 4px;
    height: 4px;
    margin-left: -2px;
    border-radius: 50%;
    background: #92400e;
}

.cw-extra-rotate:active {
    cursor: grabbing;
}

.cw-extra-item.is-selected .cw-extra-rotate {
    display: block;
}

.cw-extra-resize-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    background: #f59e0b;
    border: 2px solid #fff;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 10;
    border-radius: 4px;
}

.cw-extra-resize-top {
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    cursor: n-resize;
}

.cw-extra-resize-right {
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    cursor: e-resize;
}

.cw-extra-resize-bottom {
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    cursor: s-resize;
}

.cw-extra-resize-left {
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    cursor: w-resize;
}

.cw-extra-resize-top-left {
    top: -8px;
    left: -8px;
    cursor: nw-resize;
}

.cw-extra-resize-top-right {
    top: -8px;
    right: -8px;
    cursor: ne-resize;
}

.cw-extra-resize-bottom-right {
    bottom: -8px;
    right: -8px;
    cursor: se-resize;
}

.cw-extra-resize-bottom-left {
    bottom: -8px;
    left: -8px;
    cursor: sw-resize;
}

.cw-extra-item.is-selected .cw-extra-resize-handle {
    display: block;
}

.wheel-control-ext-layout {
    position: absolute;
    bottom: max(0px, env(safe-area-inset-bottom, 0px));
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 8px 4px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.btn-resize {
    padding: 10px;
    border: 1px solid #cfd8e3;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.btn-resize:hover:not(:disabled) {
    background: #e2e8f0;
    border-color: #b8c4d6;
    transform: translateY(-1px);
}

.btn-resize:focus-visible {
    outline: none;
    border-color: #3369e8;
    box-shadow: 0 0 0 3px rgba(51, 105, 232, 0.2);
}

.btn-resize:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.btn-resize-primary {
    background: transparent;
    box-shadow: 0 6px 16px rgba(51, 105, 232, 0.22);
}

.btn-resize-primary:hover:not(:disabled) {
    background: #c4c4c4;
    border-color: #c4c4c4;
}

#btnCwInteractMode.is-active,
#btnCwcLayersStack.is-active {
    background: #dce9ff;
    color: #1d4ed8;
    border-color: #91b4ff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}

.pn-ctrct-layer-host {
    width: 100%;
}

.cw-layer-editor {
    width: 100%;
    margin-top: 4px;
    padding: 14px;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    color: #1f2937;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.cw-layer-editor-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #1d4ed8;
    margin-bottom: 10px;
}

.cw-layer-editor-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 320px;
    overflow: auto;
    margin-bottom: 12px;
    padding-right: 4px;
}

.cw-layer-row {
    display: grid;
    grid-template-columns: 36px minmax(96px, 140px) minmax(0, 1fr) 80px;
    gap: 8px;
    align-items: center;
    padding: 8px;
    border: 1px solid #e4eaf2;
    border-radius: 10px;
    background: #fff;
    transition: background-color 0.18s ease, transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.cw-layer-id {
    display: inline-block;
    padding: 6px 8px;
    background: #f8fafc;
    border: 1px solid #dbe3ee;
    border-radius: 7px;
    font-size: 12px;
    color: #475569;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cw-layer-drag-handle {
    width: 32px;
    height: 32px;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    background: #eef2f7;
    color: #475569;
    cursor: grab;
    font-size: 16px;
    line-height: 1;
}

.cw-layer-drag-handle:active {
    cursor: grabbing;
}

.cw-layer-row-chosen {
    background: #eef6ff;
    border-color: #9dc0ff;
    box-shadow: 0 0 0 2px rgba(51, 105, 232, 0.12);
}

.cw-layer-row-ghost {
    opacity: 0.38;
}

.cw-layer-row-drag,
.cw-layer-row.is-dragging {
    opacity: 0.78;
    transform: rotate(1deg) scale(0.995);
}

.cw-layer-title-input,
.cw-layer-z-input {
    height: 34px;
    padding: 6px 10px;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    font-size: 13px;
    color: #1f2937;
    background: #fff;
}

.cw-layer-title-input:focus-visible,
.cw-layer-z-input:focus-visible {
    outline: none;
    border-color: #3369e8;
    box-shadow: 0 0 0 3px rgba(51, 105, 232, 0.16);
}

.cw-layer-editor-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.pn-ctc-description {
    border-top: 2px solid #2563eb;
    box-shadow: 0 1px 5px #0003, 0 2px 2px #00000024, 0 3px 1px -2px #0000001f;
    margin: 20px 30px 0px 30px;
    background-color: #fff;
    border-radius: 10px;
    vertical-align: top;
    position: relative;
    padding: 15px;
    font-size: 1rem;
    line-height: 1.6rem;
}

.pn-ctc-description h1,
.pn-ctc-description h2,
.pn-ctc-description h3,
.pn-ctc-description h4,
.p-pn-content h1,
.p-pn-content h2,
.p-pn-content h3,
.p-pn-content h4 {
    font-size: 1.2rem;
    line-height: 2rem;
    font-weight: bold;
    margin: 0px;
    padding: 0px;
    color: #007BFF;
}

/* ===== 7. PAGES ===== */
/* ---- 7.1 Homepage content ---- */
.pn-homepage-content h1 {
    font-size: 1.5rem;
    line-height: 2rem;
    margin-bottom: 1rem;
    color: #1a1a2e;
}

.pn-homepage-content h2 {
    font-size: 1.25rem;
    line-height: 1.8rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: #16213e;
}

.pn-homepage-content h3 {
    font-size: 1.1rem;
    margin-top: 1rem;
    margin-bottom: 0.4rem;
}

.pn-homepage-content p {
    margin-bottom: 0.75rem;
    color: #333;
}

.pn-homepage-content p:last-child {
    margin-bottom: 0;
}

/* ---- 7.2 Wheel lists (Top Games & Lucky Wheels) ---- */
.pn-wheel-lists {
    margin-top: 2rem;
}

.pn-wheel-lists {
    margin: 20px 30px 0px 30px;
}

.pn-wheel-lists-grid {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.pn-wheel-list-card {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.04);
    border: 1px solid #e8eaf0;
}

.pn-wheel-list-games {
    border-top: 3px solid #2563eb;
}

.pn-wheel-list-lucky {
    border-top: 3px solid #e91e63;
}

.pn-wheel-list-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: #1a1a2e;
}

.pn-wheel-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pn-wheel-list li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.6rem;
    line-height: 1.5rem;
    font-size: 1rem;
}

.pn-wheel-list li:last-child {
    margin-bottom: 0;
}

.pn-wheel-list li::before {
    content: '⋮';
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.5rem;
    font-weight: bold;
    color: #2563eb;
    letter-spacing: -0.2em;
}

.pn-wheel-list a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #333;
    text-decoration: none;
}

.pn-wheel-list a:hover {
    color: #1976d2;
    text-decoration: underline;
}

/* ---- 7.3 FAQ section (accordion) ---- */
.pn-faq {
    background: linear-gradient(180deg, #f8f9ff 0%, #f5f0fa 50%, #fff 100%);
    padding: 15px;
    border-radius: 12px;
}

.pn-faq .pn-faq-list {
    margin-top: 5px;
    margin-bottom: 0px;
    display: flex;
    gap: 1rem;
}

.pn-faq .pn-faq-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 0px;
}

.pn-faq-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e8eaf0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.pn-faq-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.06);
}

.pn-faq-summary {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 1.2rem;
    cursor: pointer;
    list-style: none;
    font-weight: 500;
    font-size: 0.95rem;
    color: #1a1a2e;
}

.pn-faq-summary::-webkit-details-marker,
.pn-faq-summary::marker {
    display: none;
}

.pn-faq-num {
    flex-shrink: 0;
    font-weight: 600;
    color: #333;
}

.pn-faq-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.pn-faq-icon .svg-load,
.pn-faq-icon svg {
    width: 20px;
    height: 20px;
    color: inherit;
    fill: currentColor;
}

.pn-faq-icon-1 {
    background: #e3f2fd;
    color: #1976d2;
    --color-layer-1: #1976d2;
}

.pn-faq-icon-2 {
    background: #fce4ec;
    color: #c2185b;
    --color-layer-1: #c2185b;
}

.pn-faq-icon-3 {
    background: #f3e5f5;
    color: #7b1fa2;
    --color-layer-1: #7b1fa2;
}

.pn-faq-icon-4 {
    background: #e3f2fd;
    color: #0288d1;
    --color-layer-1: #0288d1;
}

.pn-faq-icon-5 {
    background: #fff3e0;
    color: #ef6c00;
    --color-layer-1: #ef6c00;
}

.pn-faq-icon-6 {
    background: #e8f5e9;
    color: #2563eb;
    --color-layer-1: #2563eb;
}

.pn-faq-question-text {
    flex: 1;
    min-width: 0;
    font-size: 1.15rem;
}

.pn-faq-toggle {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 400;
    color: #888;
}

.pn-faq-toggle::before {
    content: '+';
}

.pn-faq-card[open] .pn-faq-toggle::before {
    content: '−';
}

.pn-faq-answer {
    padding: 0 1.2rem 1rem 3.5rem;
}

.pn-faq-answer p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #555;
}

.pn-ctc-description p,
.pn-ctc-description div,
.p-pn-content p,
.p-pn-content div {
    margin-bottom: 10px;
}

.pn-ctc-description a,
.p-pn-content a {
    text-decoration: none;
    color: #5435e4;
}

.pn-ctc-description a:hover,
.p-pn-content a:hover {
    opacity: 0.8;
}

.pn-ctc-description .panel-breadcrumb,
.p-content-des .panel-breadcrumb {
    border-bottom: 2px solid #2563eb;
    border-bottom-style: dotted;
    margin-bottom: 24px;
    padding-bottom: 8px;
}

.pn-ctc-description .panel-breadcrumb a,
.p-content-des .panel-breadcrumb a {
    color: #2563eb;
    text-decoration: none;
}

.pn-ctc-description .panel-breadcrumb a:hover,
.p-content-des .panel-breadcrumb a:hover {
    text-decoration: underline;
}

/* Library Detail – breadcrumb + title + description */
.pn-lib-detail-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 0;
    font-size: 0.9rem;
    color: #5a6c7d;
    margin-bottom: 12px;
}

.pn-lib-detail-breadcrumb a {
    color: #2563eb;
    text-decoration: none;
}

.pn-lib-detail-breadcrumb a:hover {
    text-decoration: underline;
}

.pn-lib-detail-breadcrumb-sep {
    margin: 0 6px;
    color: #94a3b8;
    user-select: none;
}

.pn-lib-detail-breadcrumb-current {
    color: #1e293b;
    font-weight: 500;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pn-lib-detail-description .pn-lib-detail-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 16px;
    color: #1e293b;
    line-height: 1.3;
}

.pn-lib-detail-description .pn-ctc-description-inner {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #334155;
}

.pn-lib-detail-description .pn-ctc-description-inner p {
    margin: 0 0 10px;
}

.pn-lib-detail-description .pn-ctc-description-inner p:last-child {
    margin-bottom: 0;
}

/* ---- 7.4 Informational page (Privacy, Terms, Cookie) ---- */
.p-content-des {
    max-width: 1000px;
    margin: 20px auto 0px;
    padding: 24px 32px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.p-content-des .panel-breadcrumb {
    font-size: 0.95rem;
    color: #666;
}

.p-content-des .panel-breadcrumb span {
    margin: 0 6px;
    color: #999;
}

.p-content-des h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 16px;
    color: #1a1a1a;
    line-height: 1.3;
}

.p-content-des h2 {
    font-size: 1.35rem;
    font-weight: 600;
    margin: 2rem 0 0.75rem;
    color: #2563eb;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(37, 99, 235, 0.2);
}

.p-content-des h2:first-of-type {
    margin-top: 1.5rem;
}

.p-content-des h3,
.p-content-des h4 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 1.25rem 0 0.5rem;
    color: #333;
}

.p-content-des p {
    font-size: 1rem;
    line-height: 1.7;
    margin: 0 0 1rem;
    color: #444;
}

.p-content-des p:last-child {
    margin-bottom: 0;
}

.p-content-des .p-pn-indent {
    margin-left: 1.5rem;
}

.p-content-des .p-pn-list {
    margin: 0 0 1rem 1.5rem;
    padding-left: 1.25rem;
    list-style: disc;
}

.p-content-des .p-pn-list li {
    margin-bottom: 0.4rem;
    line-height: 1.6;
}

.p-content-des .p-pn-list li:last-child {
    margin-bottom: 0;
}

.p-content-des .p-pn-list-prohibited {
    background: #fff8f0;
    border-left: 4px solid #e67e22;
    padding: 1rem 1rem 1rem 2rem;
    margin: 1rem 0 1rem 1.5rem;
}

.p-content-des .p-pn-list-prohibited li {
    font-weight: 600;
    color: #333;
}

.p-content-des code {
    background: #f0f0f0;
    padding: 0.15em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
}

.p-content-des .p-pn-contact-email {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    border: 1px dashed #1f2937;
    background: #f8f9fa;
    margin: 1rem 0 1rem 1.5rem;
}

.p-content-des .p-pn-contact-email a {
    color: #2563eb;
    text-decoration: none;
}

.p-content-des .p-pn-contact-email a:hover {
    text-decoration: underline;
}

.p-content-des .p-pn-contact-pre {
    background: #1e293b;
    color: #e2e8f0;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    font-family: ui-monospace, monospace;
    font-size: 0.875rem;
    white-space: pre-wrap;
    margin: 1rem 0 1rem 1.5rem;
    overflow-x: auto;
}

.p-content-des .p-pn-contact-pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

.p-content-des .p-pn-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1rem 1.5rem;
}

.p-content-des .p-pn-table th,
.p-content-des .p-pn-table td {
    border: 1px solid #ddd;
    padding: 10px 12px;
    text-align: left;
}

.p-content-des .p-pn-table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.p-content-des .p-pn-table tr:nth-child(even) {
    background: #fafafa;
}





/* ---- 7.5 Footer ---- */
.pn-footer {
    margin-top: 2rem;
    padding: 1.5rem 0px 1.25rem;
    background: #f5f5f8;
    border-top: 3px solid #2563eb;
    text-align: center;
}

.pn-footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.5rem;
    margin-bottom: 0.75rem;
}

.pn-footer-nav a {
    font-size: 1.1rem;
    color: #2563eb;
    text-decoration: none;
}

.pn-footer-nav a:hover {
    text-decoration: underline;
}

.pn-footer-link {
    margin-bottom: 0.75rem;
}

.pn-footer-link a {
    font-size: 1.2rem;
    color: #2563eb;
    text-decoration: none;
}

.pn-footer-link a:hover {
    text-decoration: underline;
}

.pn-footer-cookie {
    font-size: 0.9rem;
    color: #555;
    margin: 0 0 0.5rem 0;
    margin-left: auto;
    margin-right: auto;
}

.pn-footer-copy {
    font-size: 1rem;
    color: #000;
    margin: 0;
}

.pn-dialogbox-area {
    position: relative;
    z-index: 10;
}


/* ===== 8. MODALS ===== */
/* ---- 8.1 Winner dialog ---- */
.mess-c-wheel {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.mess-c-wheel[hidden] {
    display: none;
}

.mess-c-wheel-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
}

.mess-c-wheel-dialog {
    --mess-c-wheel-accent-bg: #2a63f7;
    --mess-c-wheel-accent-text: #ffffff;
    position: relative;
    width: min(600px, 90vw);
    width: min(600px, 90dvw);
    max-height: 90vh;
    max-height: 90dvh;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28);
}

.mess-c-wheel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 1rem 1.25rem;
    background: var(--mess-c-wheel-accent-bg);
    color: var(--mess-c-wheel-accent-text);
}

.mess-c-wheel-title {
    min-width: 0;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
}

.mess-c-wheel-icon-close {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.16s ease, transform 0.16s ease;
}

.mess-c-wheel-icon-close:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: scale(1.04);
}

.mess-c-wheel-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 2rem;
    text-align: center;
}

/* Wheel information dialog: flex column — fixed header/footer, scrollable body */
.pn-library-wheel-info-dialog .mess-c-wheel-dialog {
    display: flex;
    flex-direction: column;
}

.pn-library-wheel-info-dialog .mess-c-wheel-header,
.pn-library-wheel-info-dialog .mess-c-wheel-footer {
    flex-shrink: 0;
}

.pn-library-wheel-info-dialog .mess-c-wheel-body.pn-wheel-info-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    align-items: stretch;
    text-align: left;
}

.pn-library-wheel-info-dialog .pn-wheel-info-lead {
    margin: 0 0 0.75rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    word-break: break-word;
    text-align: center;
}

.pn-library-wheel-info-dialog .pn-wheel-info-dl {
    margin: 0;
    padding: 0;
    width: 100%;
}

.pn-library-wheel-info-dialog .pn-wheel-info-row {
    display: grid;
    grid-template-columns: minmax(100px, 34%) 1fr;
    gap: 8px 14px;
    padding: 10px 0;
    border-bottom: 1px solid #e8e8ec;
    font-size: 0.95rem;
}

.pn-library-wheel-info-dialog .pn-wheel-info-row:last-child {
    border-bottom: none;
}

.pn-library-wheel-info-dialog .pn-wheel-info-dt {
    margin: 0;
    font-weight: 600;
    color: #475569;
}

.pn-library-wheel-info-dialog .pn-wheel-info-dd {
    margin: 0;
    color: #1e293b;
    word-break: break-word;
}

.pn-library-wheel-info-dialog .pn-wheel-info-empty {
    margin: 0;
    color: #64748b;
    font-size: 0.95rem;
}

/* Spin results dialog — compact list (inpCwcResults-style), scrollable body */
.pn-library-wheel-spin-results-dialog .mess-c-wheel-dialog {
    display: flex;
    flex-direction: column;
    width: min(560px, 94vw);
    width: min(560px, 94dvw);
}

.pn-library-wheel-spin-results-dialog .mess-c-wheel-header,
.pn-library-wheel-spin-results-dialog .mess-c-wheel-footer {
    flex-shrink: 0;
}

.pn-library-wheel-spin-results-dialog .mess-c-wheel-body.pn-wheel-results-body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    align-items: stretch;
    justify-content: flex-start;
    text-align: left;
    box-sizing: border-box;
}

.pn-library-wheel-spin-results-dialog .pn-wheel-results-form {
    margin: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    box-sizing: border-box;
    flex-shrink: 0;
}

.pn-library-wheel-spin-results-dialog .pn-wheel-results-hint {
    margin: 0 0 12px;
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.4;
}

.pn-library-wheel-spin-results-dialog .pn-wheel-results-empty {
    margin: 0;
    color: #64748b;
    font-size: 1rem;
    line-height: 1.45;
}

/* Match #inpCwcResults: "N ➔" + img height 25 + " - name" (+ shared .p-ctrct-results-editor rules) */
.pn-library-wheel-spin-results-dialog .pn-wheel-results-compact-list.p-ctrct-results-editor {
    height: auto;
    max-height: none;
    overflow: visible;
    min-width: 0;
    max-width: 100%;
}

.pn-library-wheel-spin-results-dialog .p-ctrct-results-editor .pn-wheel-results-compact-line .pn-wheel-results-compact-name {
    white-space: normal;
    flex: 0 1 auto;
}

.pn-library-wheel-spin-results-dialog .pn-wheel-results-spin-block {
    margin: 0;
    padding: 0 0 12px;
    border-bottom: 1px solid #e8e8ec;
    min-width: 0;
    width: 100%;
}

.pn-library-wheel-spin-results-dialog .pn-wheel-results-spin-block:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.pn-library-wheel-spin-results-dialog .pn-wheel-results-compact-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 6px;
    padding: 0;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #1e293b;
    word-break: break-word;
}

.pn-library-wheel-spin-results-dialog .pn-wheel-results-compact-line span {
    flex: 0 0 auto;
}

.pn-library-wheel-spin-results-dialog .pn-wheel-results-compact-img {
    display: inline-block;
    flex-shrink: 0;
    height: 25px;
    width: auto;
    max-width: 100%;
    vertical-align: middle;
    object-fit: contain;
}

.pn-library-wheel-spin-results-dialog .pn-wheel-results-compact-name {
    min-width: 0;
}

.pn-library-wheel-spin-results-dialog .pn-wheel-results-compact-name--muted {
    color: #94a3b8;
}

.pn-library-wheel-spin-results-dialog .pn-wheel-results-compact-time {
    margin: 6px 0 0;
    padding: 0;
    font-size: 0.78rem;
    line-height: 1.35;
    color: #94a3b8;
}

.mess-c-wheel-winner-name {
    margin: 0;
    font-size: 2rem;
    word-break: break-word;
}

.mess-c-wheel-winner-message {
    margin: 0;
    font-size: 1.5rem;
    color: #475569;
    word-break: break-word;
}

.mess-c-wheel-winner-image {
    display: block;
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
}

.mess-c-wheel-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid #d4d4d8;
    background: #fff;
}

.mess-c-wheel-button {
    padding: 8px 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    transition: background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.mess-c-wheel-button:hover {
    transform: translateY(-1px);
}

.mess-c-wheel-button-ghost {
    background: #e5e7eb;
    color: #111827;
}

.mess-c-wheel-button-ghost:hover {
    background: #d1d5db;
}

.mess-c-wheel-button-primary {
    background: #2a63f7;
    color: #fff;
    box-shadow: 0 8px 18px rgba(42, 99, 247, 0.22);
}

.mess-c-wheel-button-primary:hover {
    background: #1d4ed8;
}











/* ---- 8.2 Gallery (unspl + mygallery) ---- */
.unspl-dialog,
.mygallery-dialog {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
}

.unspl-content,
.mygallery-content {
    background: #fff;
    width: 90%;
    max-width: 1000px;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90%;
}

.unspl-header,
.mygallery-header {
    background: #007bff;
    color: #fff;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.unspl-header a {
    color: #fff;
    text-decoration: none;
}

.unspl-h-title,
.mygallery-h-title {
    font-size: 1.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unspl-h-close,
.mygallery-h-close {
    font-size: 40px;
    line-height: 20px;
    cursor: pointer;
}

.unspl-body,
.mygallery-body {
    padding: 15px;
    overflow-y: auto;
    flex: 1;
}

.unspl-b-search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.unspl-b-search-bar input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    min-width: 0;
}

.unspl-b-search-btn {
    padding: 8px 14px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    flex-shrink: 0;
}

.unspl-b-search-btn:hover {
    background: #0056b3;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.unspl-b-search-btn.loading {
    animation: unsplspin 1s linear infinite;
    border: 2px solid #fff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    padding: 0;
}

@keyframes unsplspin {
    to {
        transform: rotate(360deg);
    }
}

/* unspl + mygallery Grid */
.unspl-b-grid,
.mygallery-b-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.mygallery-b-grid.mygallery-b-grid-centerimg {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.unspl-b-grid.circle .unspl-b-photo-card img,
.mygallery-b-grid.circle .mygallery-b-photo-card img {
    aspect-ratio: 1/1;
    border-radius: 50%;
    object-fit: cover;
}



.unspl-b-photo-card,
.mygallery-b-photo-card {
    background: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    border: 3px solid transparent;
    transition: 0.2s;
}

.unspl-b-photo-card.selected,
.mygallery-b-photo-card.selected {
    border-color: #007bff;
    border-width: 10px;
}

.unspl-b-photo-card img,
.mygallery-b-photo-card img {
    width: 100%;
    display: block;
    border-bottom: 1px solid #ddd;
}

.unspl-b-pc-caption {
    font-size: 13px;
    padding: 5px;
    background: #333;
    color: white;
    text-align: center;
}

.unspl-b-pc-caption a {
    color: #61dafb;
    text-decoration: none;
}

.unspl-b-showmore,
.mygallery-b-showmore {
    display: block;
    margin: 15px auto;
    padding: 8px 14px;
    border: none;
    border-radius: 5px;
    background: #007bff;
    color: #fff;
}

.unspl-b-showmore:hover,
.mygallery-b-showmore:hover {
    background: #0056b3;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.unspl-footer,
.mygallery-footer {
    padding: 10px;
    display: flex;
    justify-content: flex-end;
    background: #f1f1f1;
    gap: 10px;
}

.unspl-footer button,
.mygallery-footer button {
    border: none;
    border-radius: 5px;
    padding: 8px 14px;
    min-width: 70px;
}

.unspl-f-close,
.mygallery-f-close {
    background: #ccc;
    color: #000;
}

.unspl-f-close:hover,
.mygallery-f-close:hover {
    background: #b5b5b5;
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.unspl-f-ok,
.mygallery-f-ok {
    background: #007bff;
    color: #fff;
}

.unspl-f-ok:hover,
.mygallery-f-ok:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.unspl-b-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 10px;
    max-height: calc(2 * 30px + 21px);
    overflow: hidden;
}

.unspl-b-tags button {
    padding: 6px 14px;
    border: 1px solid #ddd;
    border-radius: 999px;
    background: #f9f9f9;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.unspl-b-tags button:hover {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.unspl-b-tags button:active {
    transform: scale(0.95);
}

/* ===== 10. MEDIA QUERIES ===== */
/* ---- 10.1 Breakpoints ---- */


/*Size Desktop FHD : 1170*/


/* Size taple : 750px */


/* Size mobi : 100% */






/* ---- 8.3 Toast ---- */
.pn-toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    width: 500px;
    max-width: 90vw;
    max-width: 90dvw;
}

.pn-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px 8px 20px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    opacity: 1;
    transition: opacity 0.2s ease;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
}

.pn-toast-message {
    flex: 1;
}

.pn-toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    margin: -4px -4px 0 0;
}

.pn-toast-close:hover {
    color: #fff;
}

.pn-toast-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.pn-toast-bar-fill {
    height: 100%;
    width: 100%;
    background: rgba(255, 255, 255, 0.6);
    transform-origin: left;
    animation: pn-toast-bar-shrink linear forwards;
}

@keyframes pn-toast-bar-shrink {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

.pn-toast-out {
    opacity: 0;
}

/* ---- HM confirm dialog (hm-dialogfactory: myHmConfirmDialog) — prefix pn-hm-dlg__ ---- */
.pn-hm-dlg {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.pn-hm-dlg__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    cursor: default;
}

.pn-hm-dlg__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: min(600px, 90vw);
    max-width: min(600px, 90dvw);
    max-height: 85vh;
    max-height: 85dvh;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
    overflow: hidden;
}

.pn-hm-dlg__title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
}

.pn-hm-dlg__body {
    padding: 15px 20px;
    background-color: #fff;
}

.pn-hm-dlg__message {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
}

.pn-hm-dlg__footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    padding: 10px;
    border-top: 1px solid #7a7a7a;
    background: #fafafa;
}

.pn-hm-dlg__btn {
    min-width: 88px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.pn-hm-dlg__btn--cancel {
    background: #fff;
    border-color: #e2e8f0;
    color: #334155;
}

.pn-hm-dlg__btn--cancel:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.pn-hm-dlg__btn--confirm {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.pn-hm-dlg__btn--confirm:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.pn-hm-dlg__btn--danger {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

.pn-hm-dlg__btn--danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

/* Info / single-button dialog (myHmInfoDialog) */
.pn-hm-dlg__head--info {
    padding: 15px 20px;
    background-color: #2563eb;
    color: #fff;
}

.pn-hm-dlg__footer--single {
    justify-content: center;
}

.pn-hm-dlg__footer--single .pn-hm-dlg__btn {
    min-width: 120px;
    padding: 10px 24px;
}

/* Save wheel dialog (myHmSaveWheelDialog) */
.pn-hm-dlg__panel--save {
    max-width: 600px;
    border-top: 3px solid #2563eb;
}

.pn-hm-dlg__head--save {
    padding: 16px 20px 12px;
    background: linear-gradient(180deg, #eff6ff 0%, #fff 72%);
    border-bottom: 1px solid #e2e8f0;
}

.pn-hm-dlg__body--save {
    padding: 16px 20px 12px;
    overflow: auto;
    max-height: min(52vh, 360px);
    max-height: min(52dvh, 360px);
}

.pn-hm-save-field {
    margin-bottom: 18px;
}

.pn-hm-save-field:last-child {
    margin-bottom: 0;
}

.pn-hm-save-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 8px;
}

.pn-hm-save-name {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.35;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pn-hm-save-hint {
    margin: 8px 0 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #64748b;
}

.pn-hm-save-hint code {
    font-size: 0.85em;
    padding: 0.1em 0.35em;
    background: #e2e8f0;
    border-radius: 4px;
    color: #334155;
}

.pn-hm-save-vis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.pn-hm-save-vis__choice {
    display: block;
    margin: 0;
    cursor: pointer;
}

/* Ghi đè input[type="checkbox"] global (kích thước + ::before ✔) — chỉ checkbox ẩn trong Save wheel dialog */
input[type="checkbox"].pn-hm-save-vis__native.pn-hm-save-vis__input {
    position: absolute;
    opacity: 0;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    pointer-events: none;
    cursor: inherit;
    transition: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

input[type="checkbox"].pn-hm-save-vis__native.pn-hm-save-vis__input:hover {
    background: transparent !important;
}

input[type="checkbox"].pn-hm-save-vis__native.pn-hm-save-vis__input:checked {
    background: transparent !important;
    border: none !important;
}

input[type="checkbox"].pn-hm-save-vis__native.pn-hm-save-vis__input::before {
    content: none !important;
    display: none !important;
    opacity: 0 !important;
}

.pn-hm-save-vis__box {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.pn-hm-save-vis__choice:hover .pn-hm-save-vis__box {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.pn-hm-save-vis__input:focus-visible+.pn-hm-save-vis__box {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.pn-hm-save-vis__input:checked+.pn-hm-save-vis__box {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
}

.pn-hm-save-vis__check {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    border: 2px solid #94a3b8;
    border-radius: 4px;
    background: #fff;
    flex: 0 0 auto;
    position: relative;
    transition: border-color 0.15s, background 0.15s;
}

.pn-hm-save-vis__input:checked+.pn-hm-save-vis__box .pn-hm-save-vis__check {
    border-color: #2563eb;
    background: #2563eb;
}

.pn-hm-save-vis__input:checked+.pn-hm-save-vis__box .pn-hm-save-vis__check::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.pn-hm-save-vis__text {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
}

.pn-hm-save-vis__sub {
    flex: 1 1 100%;
    margin: -4px 0 0 30px;
    font-size: 0.78rem;
    line-height: 1.4;
    color: #64748b;
}

.pn-hm-dlg__footer--save {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    padding: 12px 20px 14px;
}

.pn-hm-dlg__footer-terms {
    margin: 0;
    flex: 1 1 auto;
    min-width: min(100%, 12rem);
    font-size: 0.75rem;
    line-height: 1.4;
    color: #64748b;
    text-align: left;
}

.pn-hm-dlg__footer-terms a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.pn-hm-dlg__footer-terms a:hover {
    text-decoration: underline;
}

.pn-hm-dlg__footer-actions {
    display: flex;
    flex-wrap: nowrap;
    flex-shrink: 0;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

/* Save success — link + share (hm-dialogfactory: myHmSaveWheelSuccessDialog) */
.pn-hm-dlg__panel--success {
    max-width: 560px;
    border-top: 3px solid #16a34a;
}

.pn-hm-dlg__body--success {
    padding: 16px 20px 14px;
}

.pn-hm-success-lead {
    margin: 0 0 12px;
    font-size: 0.95rem;
    color: #334155;
}

.pn-hm-success-private-note {
    margin: 0 0 14px;
    padding: 10px 12px;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #475569;
    background: #f1f5f9;
    border-radius: 8px;
    border-left: 3px solid #64748b;
}

.pn-hm-dlg__panel--success-private {
    border-top-color: #64748b;
}

.pn-hm-success-url-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
    margin-bottom: 14px;
}

.pn-hm-success-url-input {
    flex: 1 1 200px;
    min-width: 0;
    padding: 10px 12px;
    font-size: 0.875rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #0f172a;
}

.pn-hm-success-copy {
    flex: 0 0 auto;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition:
        transform 0.2s ease,
        box-shadow 0.25s ease,
        background-color 0.2s ease,
        border-color 0.2s ease;
}

.pn-hm-success-copy--done {
    transform: scale(1.03);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.45);
    background: #15803d !important;
    border-color: #15803d !important;
    animation: pn-hm-success-copy-pop 0.5s ease;
}

@keyframes pn-hm-success-copy-pop {
    0% {
        transform: scale(1);
    }
    35% {
        transform: scale(1.08);
    }
    100% {
        transform: scale(1.03);
    }
}

.pn-hm-success-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    flex-shrink: 0;
}

.pn-hm-success-btn-label {
    line-height: 1.2;
}

.pn-hm-success-share {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.pn-hm-success-share:empty {
    display: none;
}

.pn-hm-success-share-btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    min-height: 40px;
    font-size: 0.85rem;
}

.pn-hm-dlg__footer--success {
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

/* ===== 9. FULLSCREEN & 404 ===== */
/* ---- 9.1 Fullscreen wheel mode ---- */
body.pn-fullscreen-mode .pn-navbar,
body.pn-fullscreen-mode .pn-footer,
body.pn-fullscreen-mode #root-svg,
body.pn-fullscreen-mode #cWheelDescription,
body.pn-fullscreen-mode .pn-homepage-content,
body.pn-fullscreen-mode .pn-wheel-lists,
body.pn-fullscreen-mode .pn-faq,
body.pn-fullscreen-mode .pn-ctn-right,
body.pn-fullscreen-mode .pn-ctc-description {
    display: none !important;
}

body.pn-fullscreen-mode .pn-ctc-logo-plus {
    display: flex;
}

body.pn-fullscreen-mode .pn-ctc-pagebackground {
    min-height: 0px;
    height: 100vh;
    height: 100dvh;
    position: fixed;
    inset: 0;
    z-index: 1;
    overflow: auto;
    padding: 0;
    margin: 0;
}

body.pn-fullscreen-mode .pn-wheel-view .pn-content {
    padding-bottom: 0px;
}

.pn-fullscreen-settings {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 20;
    --color-layer-1: #000000;
}

/* Wheel area: nút Settings + menu dropdown (Zoom in/out) */
.pn-wheel-settings {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 8;
    overflow: visible;
    --color-layer-1: #000000;
}

.pn-fullscreen-settings-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    opacity: 0.8;
    border: 1px solid #ccc;
    background: #ccc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: background 0.2s, box-shadow 0.2s;
}

.pn-fullscreen-settings-btn:hover {
    background: #f5f5f5;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.pn-fullscreen-settings-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 8px;
    min-width: 190px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    padding: 6px 0;
    display: none;
}

.pn-fullscreen-settings.open .pn-fullscreen-settings-menu,
.pn-wheel-settings.open .pn-fullscreen-settings-menu,
.pn-library-wheel-toolbar.open .pn-fullscreen-settings-menu {
    display: block;
}

/* Library wheel view: menu nhiều mục */
.pn-library-wheel-toolbar .pn-library-wheel-toolbar-menu {
    min-width: 220px;
    max-height: min(70vh, 520px);
    max-height: min(70dvh, 520px);
    overflow-y: auto;
}

.pn-fullscreen-settings-menu button,
.pn-fullscreen-settings-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: none;
    color: #333;
    font-size: 0.95rem;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
}

.pn-fullscreen-settings-menu button:hover,
.pn-fullscreen-settings-menu a:hover {
    background: #f0f0f0;
}

/* ---- 9.2 404 Error page ---- */
.pn-error404 {
    margin: 40px auto 0px;
    max-width: 1000px;
    padding: 32px 40px;
    background: linear-gradient(135deg, #fff 0%, #f8fbff 100%);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.12);
}

.pn-error404-breadcrumb {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 24px;
}

.pn-error404-breadcrumb a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s;
}

.pn-error404-breadcrumb a:hover {
    color: #1d4ed8;
}

.pn-error404-breadcrumb span:last-child {
    color: #333;
}

.pn-error404-content {
    padding: 20px 0;
}

.pn-error404-code {
    font-size: 6rem;
    margin: 0;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pn-error404-title {
    font-size: 1.8rem;
    margin: 0 0 12px;
    color: #1a1a1a;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.pn-error404-desc {
    font-size: 1.05rem;
    color: #555;
    margin: 0 0 32px;
    line-height: 1.7;
}

.pn-error404-btn {
    display: inline-block;
    padding: 14px 28px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pn-error404-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}



/* ===== WHEEL LIBRARY LIST ===== */
.pn-lib-main {
    margin: 0 auto;
    padding: 20px;
}

.pn-lib-header {
    margin: 10px 10px 30px;
}

.pn-lib-title {
    font-size: 2rem;
    font-weight: 600;
    margin: 0 0 12px;
    color: #1a1a1a;
}

.pn-lib-intro {
    color: #555;
    margin: 0 0 16px;
    line-height: 1.6;
    font-size: 1rem;
}

.pn-lib-breadcrumb {
    font-size: 1rem;
    color: #666;
}

.pn-lib-breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pn-lib-breadcrumb-list li:not(:last-child)::after {
    content: '»';
    margin-left: 10px;
    color: #999;
}

.pn-lib-breadcrumb a {
    color: #2563eb;
    text-decoration: none;
}

.pn-lib-breadcrumb a:hover {
    text-decoration: underline;
}

.pn-lib-breadcrumb span[aria-current] {
    color: #333;
}

.pn-lib-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.pn-lib-card {
    width: 320px;
    max-width: 90vw;
    max-width: 90dvw;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: box-shadow 0.2s ease;
}

.pn-lib-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.pn-lib-card:hover .pn-lib-card-wheel img {
    transform: rotate(45deg);
    transition: transform 0.3s ease;
}

.pn-lib-card-header {
    padding: 16px 16px 0;
}

.pn-lib-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 8px;
    line-height: 1.3;
}

.pn-lib-card-title a {
    color: #1a1a1a;
    text-decoration: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pn-lib-card-title a:hover {
    color: #2563eb;
}

.pn-lib-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #666;
}

.pn-lib-card-meta time {
    text-align: left;
    width: 65%;
}

.pn-lib-card-meta span {
    text-align: right;
    width: 35%;
}

.pn-lib-card-wheel {
    display: flex;
    justify-content: center;
    align-items: center;
}

.pn-lib-card-wheel img {
    width: 100%;
    height: 100%;
    max-width: 280px;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 8px;
}

.pn-lib-card-author {
    text-align: center;
    font-size: 0.9rem;
    color: #5a6c7d;
    margin: 0;
    padding: 0;
}

.pn-lib-card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 0px 16px 16px 16px;
}

.pn-lib-card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 0px 16px 16px 16px;
}

.pn-my-lib-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0px 16px 16px 16px;
}

.pn-lib-card-actions-status {
    display: flex;
    gap: 6px;
}

.pn-lib-card-actions-status--loading {
    opacity: 0.65;
    pointer-events: none;
}

.pn-lib-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    background: #2563eb;
    color: #fff;
    --color-layer-1: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}

.pn-lib-card-btn:hover {
    background: #1d4ed8;
}

.pn-lib-card-btn:first-child,
.pn-lib-card-btn:nth-child(2) {
    padding: 10px 12px;
}

.pn-lib-card-btn-copy {
    min-width: 80px;
}

.pn-lib-card-btn--busy {
    opacity: 0.65;
    pointer-events: none;
    cursor: wait;
}

/* My Wheels list — bell notify + options (prefix pn-mwl-bell / pn-mwl-opt) */
.pn-lib-card-actions-btn {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.pn-mwl-bell {
    position: relative;
    flex-shrink: 0;
}

.pn-mwl-opt {
    position: relative;
}

/* Hai nút kề nhau (chuông + ⋮): cùng một style */
.pn-mwl-bell__btn,
.pn-mwl-opt__trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
    --color-layer-1: #475569;
}

.pn-mwl-bell__btn:hover,
.pn-mwl-opt__trigger:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #334155;
    --color-layer-1: #334155;
}

.pn-mwl-bell__btn:focus-visible,
.pn-mwl-opt__trigger:focus-visible {
    outline: 2px solid #64748b;
    outline-offset: 2px;
}

.pn-mwl-opt__popover {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 6px;
    min-width: 168px;
    padding: 6px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 50;
    flex-direction: column;
    gap: 2px;
}

.pn-mwl-opt__popover[hidden] {
    display: none !important;
}

.pn-mwl-opt--open .pn-mwl-opt__popover {
    display: flex !important;
}

.pn-mwl-opt__btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border: none;
    border-radius: 6px;
    background: transparent;
    font-size: 0.9rem;
    color: #1e293b;
    cursor: pointer;
    box-sizing: border-box;
}

a.pn-mwl-opt__btn {
    text-decoration: none;
    color: #1e293b;
}

.pn-mwl-opt__btn:hover {
    background: #f1f5f9;
}

.pn-mwl-opt__btn--danger {
    color: #b91c1c;
}

.pn-mwl-opt__btn--danger:hover {
    background: #fef2f2;
}

.pn-mwl-opt__btn--busy {
    opacity: 0.65;
    pointer-events: none;
    cursor: wait;
}

/* Library Detail – vote, report, creator meta */
.pn-lib-meta {
    padding: 10px 12px;
    background: #f2f2f2;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.pn-lib-meta-vote {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #e5e5e5;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    --color-layer-1: #278df0;
}

.pn-lib-meta-vote-num {
    min-width: 1.2em;
    text-align: center;
}

.pn-lib-meta-vote-sep {
    width: 1px;
    height: 14px;
    background: rgba(0, 0, 0, 0.2);
}

.pn-lib-meta-report {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #e5e5e5;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #333;
    text-decoration: none;
    --color-layer-1: #ff0000;
    transition: background 0.2s;
}

.pn-lib-meta-report:hover {
    background: #dbdbdb;
}

.pn-lib-meta-info {
    width: 100%;
    font-size: 0.85rem;
    color: #5a6c7d;
}

.pn-lib-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 24px;
    color: #666;
}

.pn-lib-empty a {
    color: #2563eb;
}

.pn-lib-pagination {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.pn-lib-pagination-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.pn-lib-pagination-inner .pn-lib-pagination-total {
    margin-left: 4px;
    cursor: default;
}

.pn-lib-pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.2s, border-color 0.2s;
}

.pn-lib-pagination-link:hover {
    background: #f5f5f5;
    border-color: #2563eb;
    color: #2563eb;
}

.pn-lib-pagination-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: #2563eb;
    color: #fff;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
}

.pn-lib-pagination-ellipsis {
    padding: 0 4px;
    color: #999;
}

.pn-lib-pagination-total {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 12px;
    background: #fff;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    margin: 0;
}

/* ===== RESPONSIVE: all @media grouped at end (my-main.css) ===== */

@media screen and (max-width:1300px) {}

@media screen and (max-width:1180px) {}

@media (max-width: 990px) {
    .pn-error404 {
        margin: 20px 10px 0;
        padding: 24px 20px;
    }

    .pn-error404-code {
        font-size: 4.5rem;
    }

    .pn-error404-title {
        font-size: 1.5rem;
    }

    .pn-nb-burger {
        display: flex;
    }

    .pn-navbar-menu {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        background: #fff;
        color: #000;
        position: absolute;
        top: 65px;
        right: 20px;
        width: 320px;
        max-width: 90%;
        border: 2px solid #bebebe;
        padding: 10px 0px 0px 0px;
        margin: 0px;
        box-shadow: 0 1px 5px #0003, 0 2px 2px #00000024, 0 3px 1px -2px #0000001f;
    }

    .pn-navbar-menu a:hover,
    .pn-navbar-menu .pn-navbar-menu-btn:hover,
    .pn-nb-dropdown-toggle:hover {
        background: #e3e3e3;
    }

    .pn-navbar-menu a.active,
    .pn-navbar-menu .pn-navbar-menu-btn.active {
        background: #e3e3e3;
    }

    .pn-navbar-menu.show {
        display: flex;
    }

    .pn-nb-dropdown {
        width: 100%;
    }

    .pn-navbar-menu a,
    .pn-navbar-menu .pn-navbar-menu-btn,
    .pn-navbar-menu .pn-nb-dropdown-toggle {
        width: 100%;
        padding: 10px 20px;
        color: #000;
        --color-layer-1: #000;
    }

    .pn-fullscreen-btn .pn-fullscreen-btn-text {
        display: initial;
    }

    .pn-nb-dropdown-toggle::before {
        content: "";
        flex: 1;
        border-bottom: 2px solid #b6b0d9;
        margin-left: 10px;
        order: 3;
    }

    .pn-nb-dropdown-menu {
        position: static;
        box-shadow: none;
        width: 100%;
        border-radius: 0px;
    }

    .pn-dropdown-mode .pn-dropdown-mode-title {
        display: block;
    }

    .pn-nb-dropdown-menu a {
        padding-left: 40px;
    }

    .pn-content {
        flex-direction: column;
        margin: 20px 10px 0px;
        gap: 12px;
        min-height: 0px;
    }

    .pn-ctn-right {
        width: 100%;
        order: 2;
    }

    .pn-ctn-right.pn-ctn-right--collapsed {
        width: 100%;
        min-width: unset;
        overflow: visible;
        border-radius: 8px;
    }

    .pn-ctn-right.pn-ctn-right--collapsed .pn-ctn-right-inner {
        padding-top: 0;
        padding-left: 0;
    }

    /* Mobile collapsed: horizontal bar at bottom – đồng bộ với desktop */
    .pn-ctn-right.pn-ctn-right--collapsed .pn-ctr-tabs {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 12px;
        background: #e5e5e5;
        border-bottom: 2px solid #2563eb;
        border-radius: 8px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    }

    .pn-ctn-right.pn-ctn-right--collapsed .pn-ctr-tab {
        flex-direction: row;
        padding: 10px 14px;
        min-width: 0;
        border-radius: 6px;
        transition: background 0.2s, box-shadow 0.2s;
    }

    .pn-ctn-right.pn-ctn-right--collapsed .pn-ctr-tab span:nth-child(2) {
        writing-mode: horizontal-tb;
        text-orientation: unset;
        display: none !important;
    }

    .pn-ctn-right.pn-ctn-right--collapsed .pn-ctr-tab span:last-child {
        display: inline;
    }

    .pn-ctn-right.pn-ctn-right--collapsed .pn-ctr-tab.active {
        border: 2px solid #2563eb;
        background-color: #dbeafe;
        color: #0d3d27;
        --color-layer-1: #0d3d27;
    }

    .pn-ctn-right.pn-ctn-right--collapsed .pn-ctr-tab.active:hover {
        background-color: #bfdbfe;
    }

    .pn-ctn-right.pn-ctn-right--collapsed .pn-ctr-tab:hover {
        box-shadow: inset 0 0 0 2px #2563eb;
    }

    .pn-ctn-right.pn-ctn-right--collapsed .pn-ctr-wheel-custom {
        min-height: 0;
        height: auto;
        border-radius: 0 0 8px 8px;
    }

    /* Toggle expanded: nổi giữa wheel và sidebar */
    .pn-ctn-right-toggle {
        left: 15px;
        top: -33px;
        transform: rotate(-90deg);
        border-radius: 6px 6px 0 0;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    /* Toggle collapsed: bên trái thanh ngang, đồng bộ desktop */
    .pn-ctn-right.pn-ctn-right--collapsed .pn-ctn-right-toggle {
        width: 36px;
        height: 36px;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        border-radius: 50%;
        border: 1px solid #2563eb;
        background: #fff;
        color: #2563eb;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    .pn-ctn-right.pn-ctn-right--collapsed .pn-ctn-right-inner {
        padding-left: 48px;
    }

    .pn-ctr-wheel-custom {
        height: 90vh;
        height: 90dvh;
    }

    .pn-faq .pn-faq-list {
        flex-direction: column;
    }

    .pn-faq-answer {
        padding-left: 1.2rem;
    }

    .pn-ctc-pagebackground {
        padding-bottom: 0px;
        height: auto;
    }

    .p-content-des {
        padding: 20px 18px;
    }

    .p-content-des h1 {
        font-size: 1.5rem;
    }

    .p-content-des h2 {
        font-size: 1.2rem;
    }

    .p-content-des .p-pn-indent {
        margin-left: 1rem;
    }

    .p-content-des .p-pn-list {
        margin-left: 1rem;
    }

    .p-content-des .p-pn-list-prohibited {
        margin-left: 1rem;
        padding: 0.75rem 0.75rem 0.75rem 1.25rem;
    }

    .p-content-des .p-pn-contact-email,
    .p-content-des .p-pn-contact-pre {
        margin-left: 1rem;
    }

    .p-content-des .p-pn-contact-pre {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }

    .p-content-des .p-pn-table {
        margin-left: 1rem;
        font-size: 0.9rem;
    }
}


@media (max-width: 550px) {

    .unspl-b-grid,
    .mygallery-b-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pn-nb-logo a {
        font-size: 1.2rem;
    }

    .pn-ctc-description h1,
    .pn-ctc-description h2,
    .pn-ctc-description h3,
    .pn-ctc-description h4,
    .p-pn-content h1,
    .p-pn-content h2,
    .p-pn-content h3,
    .p-pn-content h4 {
        font-size: 1.1rem;
    }

    .pn-homepage-content h1 {
        font-size: 1.35rem;
    }

    .pn-homepage-content h2 {
        font-size: 1.15rem;
    }

    .pn-wheel-lists-grid {
        flex-direction: column;
    }

    .pn-wheel-list-card {
        flex: 0 0 auto;
        min-width: unset;
        overflow: visible;
    }

    .pn-ctc-description,
    .p-pn-container {
        max-width: 100%;
        border-radius: 0px;
        margin: 20px auto;
    }

    .pn-lib-detail-description {
        margin: 16px 12px 0;
        padding: 16px;
    }

    .pn-lib-detail-description .pn-lib-detail-title {
        font-size: 1.25rem;
    }

    .pn-lib-detail-breadcrumb-current {
        white-space: normal;
    }

    .pn-ctrct-item-adv-modal .pn-ctrct-item-adv-label {
        flex: 0 0 80px;
    }

    .pn-wheel-lists {
        margin: 20px 10px 0px 10px;
    }

    .pn-footer {
        padding: 1.25rem 0.75rem 1rem;
    }

    .pn-footer-nav {
        gap: 0.4rem 0.75rem;
    }

    .pn-footer-nav a {
        font-size: 0.9rem;
    }

    .pn-footer-cookie {
        font-size: 0.75rem;
    }

    .pn-lib-main {
        padding: 16px 12px 32px;
    }

    .pn-lib-grid {
        gap: 20px;
    }

    .pn-lib-pagination-inner {
        gap: 6px;
    }

    .pn-lib-pagination-link {
        min-width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .pn-lib-pagination-current {
        min-width: 36px;
        height: 36px;
    }

    .pn-lib-pagination-total {
        height: 36px;
        font-size: 0.9rem;
    }

    .pn-lib-title {
        font-size: 1.5rem;
    }

    .cw-layer-row {
        grid-template-columns: 36px 1fr 72px;
    }

    .cw-layer-id {
        grid-column: 1 / -1;
    }

    .pn-hm-dlg__footer .pn-hm-dlg__footer-terms,
    .pn-hm-dlg__footer .pn-hm-dlg__footer-actions {
        width: 100%;
    }
}

@media (max-width: 350px) {
    .pn-nb-logo a {
        font-size: 0.9rem;
    }
}