/* style.css - Lo Shu Grid Calculator v1.2.4 */
.lgc-wrapper{ width:640px; max-width:100%; margin:20px auto; font-family:inherit; background:#ffffff; color:#222; }
.lgc-card{ background:#fff; border-radius:12px; padding:16px; box-shadow:0 12px 30px rgba(0,0,0,0.06); border:1px solid rgba(0,0,0,0.04); margin-bottom:20px; }
.lgc-grid-title{ text-align:center; font-size:18px; margin:4px 0 12px; font-weight:700; }
.lgc-form-row{ display:flex; gap:12px; flex-wrap:wrap; }
.lgc-form-col{ flex:1 1 48%; min-width:180px; }
.lgc-label{ font-weight:700; margin-bottom:8px; display:block; font-size:13px; }
.lgc-input, .lgc-select{ width:100%; padding:10px; border-radius:8px; border:1px solid rgba(0,0,0,0.08); background:#fff; font-size:14px; box-sizing:border-box; }
.lgc-small{ font-size:12px; color:#6b6b6b; margin-top:6px; }
.lgc-controls{ text-align:center; margin-top:14px; }
.lgc-btn{ display:inline-block; min-width:140px; background:#1d2d06; color:#fff; border:none; padding:10px 24px; border-radius:28px; font-size:14px; cursor:pointer; margin:0 6px; position:relative; }
.lgc-btn.secondary{ background:#6b6b6b; color:#fff; }
.lgc-status{ text-align:center; margin-top:8px; font-weight:600; font-size:13px; }
.error-border{ border:2px solid #d14a4a !important; }
.name-breakdown{ font-size:11px; word-wrap:break-word; overflow-wrap:anywhere; line-height:1.2; display:inline-block; max-width:100%; }

/* Grid Styling - Numbers reduced to prevent overflow */
.lgc-grid-wrap{ display:flex; justify-content:center; margin-top:12px; }
.lgc-grid-container{ position:relative; width:360px; max-width:100%; margin:0 auto; }
.lgc-grid{ display:grid; grid-template-columns:repeat(3, 1fr); gap:0; border:2px solid #000; background:#000; }

.lgc-cell{ 
  background:#fff; 
  border:1px solid #000; 
  display:flex; 
  align-items:center; 
  justify-content:center; 
  flex-wrap:wrap; 
  padding:2px; /* Tightened padding to provide more space */
  min-height:100px; 
  height: auto !important; /* Expansion allowed for repetitions */
  box-sizing:border-box; 
  overflow: visible !important; 
}

.lgc-number{ 
  background:#333; 
  color:#fff; 
  padding:1px 3px; /* Reduced padding for smaller block size */
  border-radius:2px; 
  margin:1px; 
  font-weight:700; 
  font-size:10px; /* Reduced font size to 10px */
  display:inline-block; 
  line-height:1; 
  min-width: 15px;
  text-align: center;
}

.lgc-kua{ background:#1d2d06 !important; }
.lgc-namank{ background:#b81e1e !important; }

/* Utilities and Tables */
.lgc-dots span{ display:inline-block; width:6px; height:6px; margin:0 2px; background:#fff; border-radius:50%; opacity:0.25; }
.lgc-spinner{ display:inline-block; margin-left:8px; vertical-align:middle; }
.lgc-table{ width:100%; border-collapse:collapse; margin-top:12px; font-size:13px; }
.lgc-table th, .lgc-table td{ border:1px solid #e1e1e1; padding:8px; vertical-align:top; text-align:left; }
.lgc-table thead th{ background:#274156; color:#fff; font-weight:700; font-size:13px; }
.lgc-card small.note{ font-size:12px; color:#666; }

@media (max-width:480px){
  .lgc-form-col{ flex:1 1 100%; }
  .lgc-grid-container{ width:320px; }
  .lgc-grid-title{ font-size:16px; }
  .lgc-btn{ min-width:120px; padding:8px 18px; font-size:13px; }
  .lgc-cell{ min-height:85px; }
  .lgc-number{ font-size:9px; padding:1px 2px; }
}