 :root{
    --cc-bg: #071401;         /* แถบล่าง */
    --cc-text: #ffffff;
    --cc-muted: rgba(255,255,255,.75);
    --cc-accent: #0b750e;     /* ปุ่มหลัก (ส้ม) */
    --cc-accent2: #2563eb;    /* ปุ่มรอง (น้ำเงิน) */
    --cc-panel-bg: #f59e0b;   /* แผงซ้าย (เหลืองส้มพื้นฐาน) */
    --cc-panel-text: #111827;
    --cc-overlay: rgba(0,0,0,.55);
    --cc-border: rgba(0,0,0,.12);
}

/* ===== Bottom Bar ===== */
.cc-bar{
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 9999;
    background: var(--cc-bg);
    color: var(--cc-text);
    padding: 14px 16px;
    box-shadow: 0 -8px 20px rgba(0,0,0,.25);
    display: none; /* show by JS */
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans Thai", sans-serif;
}
.cc-bar__inner{
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
}
.cc-bar__text{
    min-width: 260px;
    flex: 1;
}
.cc-title{
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 4px 0;
}
.cc-desc{
    font-size: 13px;
    margin: 0;
    color: var(--cc-muted);
    line-height: 1.45;
}

.cc-actions{
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.cc-btn{
    border: 0;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    transition: transform .05s ease, opacity .15s ease;
    user-select: none;
    white-space: nowrap;
}
.cc-btn:active{ transform: scale(.98); }
.cc-btn--primary{ background: var(--cc-accent); color: #fff; }
.cc-btn--secondary{ background: #515357; color: #fff; }
.cc-btn--link{ background: transparent; color: #fff; text-decoration: underline; opacity: .9; }
.cc-btn:hover{ opacity: .92; }

/* ===== Overlay ===== */
.cc-overlay{
    position: fixed;
    inset: 0;
    background: var(--cc-overlay);
    z-index: 10000;
    display: none;
}

/* ===== Left Panel ===== */
.cc-panel{
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    width: 92vw;
    max-width: 430px;
    background: linear-gradient(180deg, #beef91, #22590b);
    color: var(--cc-panel-text);
    z-index: 10001;
    transform: translateX(-105%);
    transition: transform .22s ease;
    box-shadow: 10px 0 28px rgba(0,0,0,.25);
    display: flex;
    flex-direction: column;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans Thai", sans-serif;
}
.cc-panel.is-open{ transform: translateX(0); }

.cc-panel__header{
    padding: 14px 16px;
    border-bottom: 1px solid var(--cc-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.cc-panel__header h3{
    margin: 0;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: .2px;
}
.cc-close{
    border: 0;
    background: rgba(255,255,255,.45);
    color: #111827;
    font-weight: 900;
    border-radius: 10px;
    padding: 8px 10px;
    cursor: pointer;
    width: 20%;
}

.cc-panel__body{
    padding: 14px 16px;
    overflow: auto;
    flex: 1;
}

.cc-section{
    background: rgba(255,255,255,.55);
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 14px;
    padding: 12px 12px;
    margin-bottom: 12px;
}
.cc-section h4{
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 900;
}
.cc-section p{
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
}

.cc-row{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(0,0,0,.15);
}
.cc-row .cc-row__label{
    font-size: 13px;
    font-weight: 800;
}
.cc-row .cc-row__hint{
    font-size: 12px;
    opacity: .85;
    font-weight: 600;
}

/* toggle switch */
.cc-switch{
    position: relative;
    width: 54px;
    height: 30px;
    background: rgba(0,0,0,.2);
    border-radius: 999px;
    cursor: pointer;
    flex: 0 0 auto;
    border: 1px solid rgba(0,0,0,.15);
}
.cc-switch input{ display: none; }
.cc-switch .knob{
    position: absolute;
    top: 1px; left: 3px;
    width: 24px; height: 24px;
    background: #fff;
    border-radius: 999px;
    transition: left .15s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,.25);
}
.cc-switch.is-on{
    background: rgba(37,99,235,.85);
}
.cc-switch.is-on .knob{
    left: 27px;
}

.cc-panel__footer{
    padding: 14px 16px;
    border-top: 1px solid var(--cc-border);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    background: rgba(255,255,255,.25);
}
.cc-panel__footer .cc-btn{
    flex: 1;
    min-width: 140px;
}

/* small helper */
.cc-note{
    font-size: 12px;
    margin-top: 6px;
    opacity: .85;
    font-weight: 700;
}