/* Fonts are enqueued via PHP; keep UI scoped and conflict-safe. */

/* Scope design tokens to plugin only (avoid affecting theme :root). */
.lsgc-wrapper,
.lsgc-admin-wrap {
    --lsgc-primary: #8B0000;
    --lsgc-primary-dark: #5c0000;
    --lsgc-primary-light: #c62828;
    --lsgc-gold: #c9a84c;
    --lsgc-gold-light: #f0d080;
    --lsgc-card-bg: #ffffff;
    --lsgc-card-border: #e8e0d5;
    --lsgc-text: #1f1f1f;
    --lsgc-text-muted: #5f5f5f;
    --lsgc-bg: #fbf8f3;
    --lsgc-radius: 14px;
    --lsgc-shadow: 0 6px 28px rgba(0,0,0,0.08);
    --lsgc-shadow-lg: 0 10px 48px rgba(139,0,0,0.14);
}

/* ===== WRAPPER ===== */
.lsgc-wrapper {
    font-family: 'Lato', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    max-width: 980px;
    width: 100%;
    margin: 0 auto;
    padding: 22px 14px 44px;
    color: var(--lsgc-text);
    background: linear-gradient(180deg, var(--lsgc-bg) 0%, #ffffff 80%);
    border-radius: 16px;
    box-sizing: border-box;
    border: 1px solid rgba(232, 224, 213, 0.9);
}
.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: 'Cinzel', serif;
    font-size: clamp(22px, 2.4vw, 32px);
    font-weight: 700;
    color: var(--lsgc-primary);
    margin: 0 0 10px 0;
    letter-spacing: 1px;
}
.lsgc-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--lsgc-gold);
    font-size: 18px;
}
.lsgc-ornament-line {
    width: 70px; height: 2px;
    background: linear-gradient(to right, transparent, var(--lsgc-gold));
}
.lsgc-ornament-line.rev { background: linear-gradient(to left, transparent, var(--lsgc-gold)); }

/* ===== 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-gold), var(--lsgc-primary));
}
.lsgc-form-title {
    font-family: 'Cinzel', serif;
    font-size: 17px;
    font-weight: 600;
    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: 600;
    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-primary);
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 0.9px;
}
.lsgc-field select {
    width: 100%;
    padding: 13px 40px 13px 16px;
    border: 1.5px solid #d4c9b8;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background: #fdfaf6;
    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='%238B0000' 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: border-color .2s, box-shadow .2s;
    color: var(--lsgc-text);
}
.lsgc-field select:focus {
    outline: none;
    border-color: var(--lsgc-primary);
    box-shadow: 0 0 0 3px rgba(139,0,0,.08);
}
.lsgc-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--lsgc-primary-dark), var(--lsgc-primary-light));
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all .25s;
    box-shadow: 0 4px 16px rgba(139,0,0,.28);
}
.lsgc-btn:focus-visible {
    outline: 3px solid rgba(201, 168, 76, 0.55);
    outline-offset: 3px;
}
.lsgc-btn:hover {
    background: linear-gradient(135deg, #3a0000, #8B0000);
    box-shadow: 0 6px 24px rgba(139,0,0,.38);
    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-primary-dark) 0%, var(--lsgc-primary) 60%, #c62828 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: var(--lsgc-gold-light);
    margin-bottom: 4px;
}
.lsgc-banner-value {
    font-family: 'Cinzel', serif;
    font-size: 30px;
    font-weight: 700;
    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: 'Cinzel', serif;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    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-gold);
    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: var(--lsgc-card-bg);
    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 #c9b89a;
    padding: 12px 8px 10px;
    text-align: center;
    vertical-align: top;
    width: 33.33%;
    background: #fffdf9;
    transition: background .2s;
}
.lsgc-grid-table td:hover { background: #fff8f0; }
.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(139,0,0,.25);
}
.lsgc-cell-num.empty {
    background: #e8e8e8;
    color: #bbb;
    box-shadow: none;
    position: relative;
}
.lsgc-cell-missing-x {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #c62828;
    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,.2);
}
.lsgc-cell-info { font-size: 10.5px; color: #666; line-height: 1.5; }
.lsgc-cell-info .ci-themes {
    font-weight: 700;
    font-size: 11px;
    color: var(--lsgc-primary);
    display: block;
    margin-bottom: 3px;
}

/* ===== NUMBER CARDS ===== */
.lsgc-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.lsgc-num-card {
    background: var(--lsgc-card-bg);
    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,.06);
    transition: box-shadow .2s, transform .2s;
}
.lsgc-num-card:hover {
    box-shadow: 0 6px 20px rgba(139,0,0,.10);
    transform: translateY(-2px);
}

/* ---- MISSING BADGE: X over same number circle ---- */
.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-primary-dark), var(--lsgc-primary-light));
    color: #fff;
    font-weight: 700;
    font-size: 19px;
    font-family: 'Cinzel', serif;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(139,0,0,.28);
    position: relative;
}
.lsgc-badge-x {
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #b71c1c;
    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,.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: var(--lsgc-card-bg);
    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,.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-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 8px rgba(139,0,0,.22);
    position: relative;
}
.lsgc-arrow-num-missing {
    background: linear-gradient(135deg, var(--lsgc-primary-dark), var(--lsgc-primary-light));
}
.lsgc-arrow-missing-x {
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #c62828;
    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;
    box-shadow: 0 1px 5px rgba(0,0,0,.2);
}
.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: 'Lato', -apple-system, sans-serif; }
.lsgc-admin-header {
    background: linear-gradient(135deg, var(--lsgc-primary-dark) 0%, var(--lsgc-primary) 60%, #c62828 100%);
    color: #fff;
    border-radius: 12px 12px 0 0;
    padding: 28px 32px;
}
.lsgc-admin-header h1 { font-family: 'Cinzel', serif; font-size: 24px; margin: 0 0 6px 0; color: #fff; }
.lsgc-admin-header p { margin: 0; color: rgba(255,255,255,.78); font-size: 14px; }
.lsgc-admin-body {
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 28px 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,.07);
}
.lsgc-admin-tabs { display: flex; border-bottom: 2px solid #eee; margin-bottom: 28px; gap: 0; }
.lsgc-tab-btn {
    padding: 10px 22px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    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: #fdf6f6;
    border: 1px solid #f0c6c6;
    border-left: 4px solid var(--lsgc-primary);
    border-radius: 8px;
    padding: 18px 20px;
    margin-bottom: 20px;
}
.lsgc-info-box h3 { margin: 0 0 8px 0; color: var(--lsgc-primary); font-size: 15px; }
.lsgc-info-box p { margin: 0; font-size: 14px; }
.lsgc-shortcode-display {
    background: #1a1a2e;
    color: #f0d080;
    padding: 14px 20px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 1px;
    margin: 14px 0;
}
.lsgc-stat-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 24px; }
.lsgc-stat-card {
    background: linear-gradient(135deg,#fff5f5,#fff);
    border: 1px solid #f5d5d5;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}
.lsgc-stat-num { font-family:'Cinzel',serif; font-size:32px; font-weight:700; color:var(--lsgc-primary); display:block; }
.lsgc-stat-label { font-size:12px; color:#888; text-transform:uppercase; letter-spacing:.5px; }
.lsgc-steps { counter-reset:steps; list-style:none; padding:0; margin:0; }
.lsgc-steps li {
    counter-increment:steps;
    display:flex; align-items:flex-start; gap:14px;
    padding:14px 0;
    border-bottom:1px solid #f0f0f0;
    font-size:14px; line-height:1.6;
}
.lsgc-steps li:last-child { border-bottom:none; }
.lsgc-steps li::before {
    content:counter(steps);
    display:flex; align-items:center; justify-content:center;
    width:28px; height:28px;
    border-radius:50%;
    background:var(--lsgc-primary);
    color:#fff; font-weight:700; font-size:13px;
    flex-shrink:0;
}

/* ===== RESPONSIVE ===== */
@media(max-width:700px){
    .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-form-card { padding:20px 16px; }
    .lsgc-cell-info { font-size:10px; }
    .lsgc-grid-wrap { padding: 16px; }
    .lsgc-grid-table td { padding: 10px 7px 9px; min-width: 240px; }
    .lsgc-admin-body { padding:18px; }
    .lsgc-admin-header { padding:20px 18px; }
}
