/* Fonts: Using requested comprehensive system-ui stack */
/* Scope design tokens to plugin only (avoid affecting theme :root). */
.lsgc-wrapper,
.lsgc-admin-wrap {
    --lsgc-primary: #A51C30; /* Crimson Red */
    --lsgc-primary-dark: #821627;
    --lsgc-primary-light: #C4263D;
    --lsgc-secondary: #19298A; /* Navy Blue */
    --lsgc-secondary-light: #2a3eb1;
    --lsgc-card-bg: #ffffff;
    --lsgc-card-border: #e2e8f0;
    --lsgc-text: #1a1a1a;
    --lsgc-text-muted: #64748b;
    --lsgc-bg: #ffffff; /* Page background set to white */
    --lsgc-radius: 14px;
    --lsgc-shadow: 0 6px 28px rgba(0,0,0,0.06);
    --lsgc-shadow-lg: 0 10px 48px rgba(165, 28, 48, 0.12);
    /* Requested Font Family Stack */
    --lsgc-font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

/* ===== WRAPPER ===== */
.lsgc-wrapper {
    font-family: var(--lsgc-font-main);
    max-width: 980px;
    width: 100%;
    margin: 0 auto;
    padding: 22px 14px 44px;
    color: var(--lsgc-text);
    background: var(--lsgc-bg); /* Pure white background */
    border-radius: 16px;
    box-sizing: border-box;
    border: 1px solid #edf2f7;
}

.lsgc-wrapper *, .lsgc-wrapper *::before, .lsgc-wrapper *::after { box-sizing: border-box; }

/* ===== PAGE HEADING ===== */
.lsgc-main-heading { text-align: center; margin-bottom: 30px; }
.lsgc-main-heading h1 {
    font-family: var(--lsgc-font-main);
    font-size: clamp(22px, 2.4vw, 32px);
    font-weight: 800;
    color: var(--lsgc-primary);
    margin: 0 0 10px 0;
    letter-spacing: -0.5px;
}
.lsgc-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--lsgc-secondary);
    font-size: 18px;
}
.lsgc-ornament-line {
    width: 70px; height: 2px;
    background: linear-gradient(to right, transparent, var(--lsgc-secondary));
}
.lsgc-ornament-line.rev { background: linear-gradient(to left, transparent, var(--lsgc-secondary)); }

/* ===== FORM CARD ===== */
.lsgc-form-card {
    background: var(--lsgc-card-bg);
    border: 1px solid var(--lsgc-card-border);
    border-radius: var(--lsgc-radius);
    padding: 28px 28px;
    box-shadow: var(--lsgc-shadow);
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}
.lsgc-form-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--lsgc-primary), var(--lsgc-secondary), var(--lsgc-primary));
}
.lsgc-form-title {
    font-family: var(--lsgc-font-main);
    font-size: 18px;
    font-weight: 700;
    color: var(--lsgc-primary);
    margin: 0 0 6px 0;
    text-align: center;
}
.lsgc-form-subtitle {
    font-size: 13px;
    color: var(--lsgc-text-muted);
    font-weight: 700;
    margin: 0 0 24px 0;
    text-align: center;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.lsgc-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}
.lsgc-field label {
    display: block;
    font-weight: 700;
    font-size: 11px;
    color: var(--lsgc-secondary);
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 0.9px;
}
.lsgc-field select {
    width: 100%;
    padding: 10px 40px 10px 16px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background: #ffffff;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23A51C30' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    transition: all .2s;
    color: var(--lsgc-text);
}
.lsgc-field select:focus {
    outline: none;
    border-color: var(--lsgc-secondary);
    box-shadow: 0 0 0 3px rgba(25, 41, 138, 0.1);
}
.lsgc-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--lsgc-primary), var(--lsgc-primary-dark));
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-family: var(--lsgc-font-main);
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all .25s;
    box-shadow: 0 4px 16px rgba(165, 28, 48, 0.2);
    text-transform: uppercase;
}
.lsgc-btn:focus-visible {
    outline: 3px solid rgba(165, 28, 48, 0.4);
    outline-offset: 3px;
}
.lsgc-btn:hover {
    background: linear-gradient(135deg, var(--lsgc-primary-dark), #61101d);
    box-shadow: 0 6px 24px rgba(165, 28, 48, 0.3);
    transform: translateY(-1px);
}
.lsgc-btn:active { transform: translateY(0); }

/* ===== RESULT SECTION ===== */
.lsgc-result-section { animation: lsgcFadeIn .4s ease; }
@keyframes lsgcFadeIn {
    from { opacity:0; transform: translateY(14px); }
    to { opacity:1; transform: translateY(0); }
}

/* ===== BANNERS ===== */
.lsgc-banner-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 22px;
}
.lsgc-banner {
    background: linear-gradient(135deg, var(--lsgc-secondary) 0%, var(--lsgc-secondary-light) 100%);
    color: #fff;
    padding: 22px 26px;
    border-radius: var(--lsgc-radius);
    box-shadow: var(--lsgc-shadow-lg);
    position: relative;
    overflow: hidden;
}
.lsgc-banner::after {
    content: '';
    position: absolute;
    top: -24px; right: -24px;
    width: 88px; height: 88px;
    border-radius: 50%;
    background: rgba(255,255,255,.07);
}
.lsgc-banner-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 4px;
}
.lsgc-banner-value {
    font-family: var(--lsgc-font-main);
    font-size: 30px;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}
.lsgc-banner-sub { font-size: 12px; color: rgba(255,255,255,.72); margin-top: 7px; line-height: 1.5; }

/* ===== SECTION TITLE ===== */
.lsgc-section-title {
    font-family: var(--lsgc-font-main);
    font-size: 18px;
    font-weight: 800;
    color: var(--lsgc-secondary);
    text-align: center;
    margin: 34px 0 18px;
    padding: 13px 0;
    border-top: 2px solid var(--lsgc-card-border);
    border-bottom: 2px solid var(--lsgc-card-border);
    position: relative;
}
.lsgc-section-title::before {
    content: '◆';
    color: var(--lsgc-primary);
    font-size: 10px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -7px;
    background: var(--lsgc-bg);
    padding: 0 8px;
}

/* ===== LO SHU GRID ===== */
.lsgc-grid-wrap {
    background: #ffffff;
    border-radius: var(--lsgc-radius);
    padding: 24px;
    box-shadow: var(--lsgc-shadow);
    border: 1px solid var(--lsgc-card-border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.lsgc-grid-table { width: 100%; border-collapse: collapse; }
.lsgc-grid-table td {
    border: 2px solid #e2e8f0;
    padding: 12px 8px 10px;
    text-align: center;
    vertical-align: top;
    width: 33.33%;
    background: #ffffff;
    transition: background .2s;
}
.lsgc-grid-table td:hover { background: #f8fafc; }
.lsgc-cell-nums {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    min-height: 38px;
    margin-bottom: 8px;
}
.lsgc-cell-num {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--lsgc-primary-dark), var(--lsgc-primary-light));
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(165, 28, 48, 0.25);
}
.lsgc-cell-num.empty {
    background: #f1f5f9;
    color: #cbd5e1;
    box-shadow: none;
    position: relative;
}
.lsgc-cell-missing-x {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: var(--lsgc-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.lsgc-cell-info { font-size: 10.5px; color: #475569; line-height: 1.5; }
.lsgc-cell-info .ci-themes {
    font-weight: 700;
    font-size: 11px;
    color: var(--lsgc-secondary);
    display: block;
    margin-bottom: 3px;
}

/* ===== NUMBER CARDS ===== */
.lsgc-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.lsgc-num-card {
    background: #ffffff;
    border: 1px solid var(--lsgc-card-border);
    border-radius: var(--lsgc-radius);
    padding: 18px 16px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    transition: all .2s;
}
.lsgc-num-card:hover {
    box-shadow: 0 6px 20px rgba(25, 41, 138, 0.08);
    transform: translateY(-2px);
}
.lsgc-badge-stack {
    flex-shrink: 0;
    display: inline-flex;
}
.lsgc-badge-circle {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--lsgc-secondary), var(--lsgc-secondary-light));
    color: #fff;
    font-weight: 700;
    font-size: 19px;
    font-family: var(--lsgc-font-main);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(25, 41, 138, 0.2);
    position: relative;
}
.lsgc-badge-x {
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--lsgc-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 5px rgba(0,0,0,0.2);
    line-height: 1;
    position: absolute;
    right: -3px;
    bottom: -3px;
    border: 1.5px solid #fff;
}
.lsgc-num-body { flex: 1; min-width: 0; }
.lsgc-num-body p { margin: 0 0 6px 0; font-size: 13.5px; line-height: 1.65; color: var(--lsgc-text); }
.lsgc-num-body p:last-child { margin-bottom: 0; }
.lsgc-num-body strong { color: var(--lsgc-primary); font-weight: 700; }

/* ===== ARROW CARDS ===== */
.lsgc-arrow-card {
    background: #ffffff;
    border: 1px solid var(--lsgc-card-border);
    border-radius: var(--lsgc-radius);
    padding: 18px 20px;
    margin-bottom: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.lsgc-arrow-badges { display: flex; gap: 8px; margin-bottom: 10px; align-items: center; }
.lsgc-arrow-num {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--lsgc-primary), var(--lsgc-primary-light));
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(165, 28, 48, 0.2);
    position: relative;
}
.lsgc-arrow-num-missing { background: linear-gradient(135deg, #94a3b8, #cbd5e1); }
.lsgc-arrow-missing-x {
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--lsgc-primary);
    color: #fff;
    border: 1.5px solid #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
}
.lsgc-arrow-card p { margin: 0; font-size: 13.5px; line-height: 1.7; }

/* ===== ADMIN UI ===== */
.lsgc-admin-wrap { max-width: 900px; margin: 24px auto; font-family: var(--lsgc-font-main); }
.lsgc-admin-header {
    background: linear-gradient(135deg, var(--lsgc-primary-dark) 0%, var(--lsgc-primary) 100%);
    color: #fff;
    border-radius: 12px 12px 0 0;
    padding: 28px 32px;
}
.lsgc-admin-header h1 { font-size: 24px; margin: 0 0 6px 0; color: #fff; font-weight: 800; }
.lsgc-admin-header p { margin: 0; color: rgba(255,255,255,.8); font-size: 14px; }
.lsgc-admin-body {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 28px 32px;
}
.lsgc-admin-tabs { display: flex; border-bottom: 2px solid #f1f5f9; margin-bottom: 28px; }
.lsgc-tab-btn {
    padding: 10px 22px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 700;
    color: #94a3b8;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all .2s;
}
.lsgc-tab-btn.active { color: var(--lsgc-primary); border-bottom-color: var(--lsgc-primary); }
.lsgc-tab-pane { display: none; }
.lsgc-tab-pane.active { display: block; }

.lsgc-info-box {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-left: 4px solid var(--lsgc-primary);
    border-radius: 8px;
    padding: 18px 20px;
    margin-bottom: 20px;
}
.lsgc-shortcode-display {
    background: #1e293b;
    color: #f1f5f9;
    padding: 14px 20px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
}
.lsgc-stat-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 24px; }
.lsgc-stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}
.lsgc-stat-num { font-size:32px; font-weight:800; color:var(--lsgc-primary); display:block; }

/* ===== RESPONSIVE ===== */
@media(max-width:768px){
    .lsgc-form-grid { grid-template-columns:1fr; }
    .lsgc-banner-row { grid-template-columns:1fr; }
    .lsgc-cards-grid { grid-template-columns:1fr; }
    .lsgc-stat-row { grid-template-columns:1fr 1fr; }
    .lsgc-grid-table td { min-width: 120px; }
}

@media(max-width:480px){
    .lsgc-wrapper { padding: 15px 10px; }
    .lsgc-grid-wrap { padding: 10px; }
    .lsgc-stat-row { grid-template-columns: 1fr; }
}