:root {
  --primary: #014712;
  --secondary: #be9843;
  --bg: #FFFFFF;
  --table-bg: #fff;
  --table-head: #e7e6e6;
}

body {
  font-family: Arial, sans-serif;
  background: var(--bg);
  padding: 40px;
  color: var(--primary);
}

h1 {
  color: var(--primary);
  margin-bottom: 16px;
  font-size: 2.25rem;
  text-align: center;
  letter-spacing: 1px;
}

.container {
  background: #fff;
  padding: 30px;
  max-width: 1180px;
  margin: auto;
/*  border-radius: 12px;  */
  box-shadow: 0 0 10px rgba(21,70,112,0.07);
  border: 1px solid var(--primary);
}

label {
  font-weight: bold;
  color: var(--primary);
  display: block;
  margin-top: 16px;
  margin-bottom: 8px;
  text-align: left;
}

input[type="date"], input[type="text"], select {
  padding: 10px;
  font-size: 16px;
  width: 100%;
  margin-bottom: 16px;
  border: 1.5px solid var(--primary);
/*  border-radius: 6px;  */
  outline-color: var(--secondary);
  color: var(--primary);
  background: #f9fbfd;
  box-sizing: border-box;
}

button, .popup-close {
  background: var(--primary);
  color: #fff;
  padding: 10px 24px;
  border: none;
/*  border-radius: 6px;  */
  font-size: 17px;
  font-weight: bold;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.2s;
  box-shadow: 0 2px 6px rgba(21,70,112,0.07);
  margin-top: 8px;
  margin-bottom: 8px;
}
button:hover {
  background: #be9843;
}

.popup-close {
  background: #014712 !important;
}
.popup-close:hover {
  background: #014712 !important;
}

.export-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 0;
  margin-bottom: 10px;
}
.formula-block {
  background: #f7f8fd;
/*  border-radius: 10px;  */
  padding: 11px 16px 9px 16px;
  margin: 8px 0 11px 0;
  font-family: 'JetBrains Mono', 'Consolas', 'Menlo', monospace;
  font-size: 1em;
  color: #014712;
  line-height: 1.38;
  font-weight: 400;
  box-shadow: 0 1.5px 9px #0002;
  border-left: 5px solid #be9843;
  display: block;
}
.formula-block code {
  font-family: inherit;
  background: none;
  color: #174c81;
  font-weight: bold;
  font-size: 1em;
}

.result {
  margin-top: 26px;
  font-size: 20px;
  font-weight: bold;
  color: var(--primary);
  letter-spacing: 1px;
  border-top: 1.5px solid var(--secondary);
  padding-top: 16px;
  min-height: 44px;
  text-align: left;
}

.desc {
  color: #666;
  font-size: 13px;
  margin-bottom: 24px;
}

.number-block {
  margin-bottom: 38px;
  background: var(--bg);
/*  border-radius: 8px;  */
  padding: 16px 24px 14px 24px;
  border-left: 7px solid var(--secondary);
  box-shadow: 0 2px 5px rgba(21,70,112,0.07);
  position: relative;
  page-break-inside: avoid;
}

.number-title {
  font-size: 1.17em;
  color: var(--secondary);
  margin-bottom: 6px;
}

.number-value {
  font-size: 2em;
  color: var(--primary);
  font-weight: bold;
  margin-bottom: 10px;
  display: inline-block;
  vertical-align: middle;
}

.number-badge {
  display: inline-block;
  margin-left: 14px;
  padding: 3px 14px;
/*  border-radius: 16px; */
  font-size: 0.99em;
  font-weight: bold;
  vertical-align: middle;
}

.master-badge {
  background: #f7e700;
  color: #ba8500;
  border: 1.3px solid #ba8500;
  box-shadow: 0 0 3px #f7e70044;
}

.special-badge {
  background: #e7e7fa;
  color: #4700c9;
  border: 1.3px solid #4700c9;
  box-shadow: 0 0 3px #4700c977;
}

.number-section {
  margin-bottom: 7px;
  font-size: 1.01em;
  color: #174c81;
}

.number-section-title {
  font-weight: bold;
  color: var(--secondary);
}

.lucky-color-circle {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  margin-left: 7px;
  margin-right: 4px;
  border: 1.5px solid #ccc;
  vertical-align: middle;
}

.placeholder {
  color: #999;
  font-size: 15px;
  font-style: italic;
}

.charts-row {
  display: flex;
  gap: 18px;
  justify-content: center;
  align-items: flex-start;
  margin: 30px 0 32px 0;
  flex-wrap: wrap;
}

.chart-section {
  flex: 1 1 260px;
  min-width: 260px;
  background: #f7f7fc;
/*  border-radius: 11px;  */
  box-shadow: 0 2px 9px #01471213;
  padding: 14px;
  margin: 0 4px 0 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 370px;
}

.chart-title {
  font-size: 1.13em;
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 7px;
  letter-spacing: 1px;
}

.numchart-flex {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px 13px;
  margin: 15px 0 0 0;
}

.numchart-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 78px;
}

.numchart-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 7px;
  box-shadow: 0 1.5px 9px #0002;
  position: relative;
  font-size: 1.35em;
  color: #fff;
  font-weight: bold;
  border: 2.5px solid #fff;
}

.numchart-label {
  font-size: 0.93em;
  color: var(--primary);
  font-weight: bold;
  text-align: center;
  margin-top: 0;
}

.numchart-value {
  position: relative;
  z-index: 1;
  font-size: 1.1em;
}

.numchart-circle .number-badge {
  position: absolute;
  left: 50%;
  bottom: -17px;
  transform: translateX(-50%);
  font-size: 0.67em;
  padding: 1px 7px;
  margin-left: 0;
  margin-top: 0;
}






/* Popup windows (calculator, notepad, table) */
.movable-popup {
  display: none;
  position: fixed;
  background: #fff;
  border: 2px solid var(--primary);
  box-shadow: 0 5px 30px #01471222, 0 1.5px 2.5px #01471210;
/*  border-radius: 10px;  */
  z-index: 1100;
  min-width: 200px;
  min-height: 200px;
  resize: both;
  overflow: hidden;
  transition: box-shadow 0.18s;
}

.popup-head {
  background: var(--primary);
  color: #fff;
  padding: 7px 14px;
  cursor: move;
/*  border-radius: 10px 10px 0 0;  */
  font-size: 1.05em;
  font-weight: bold;
  letter-spacing: 1px;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.popup-close {
  background: var(--secondary);
  border: none;
/*  border-radius: 4px; */
  color: #fff;
  font-weight: bold;
  font-size: 1.3em;
  width: 30px;
  height: 28px;
  margin-left: 9px;
  margin-top: -3px;
  margin-bottom: -3px;
  cursor: pointer;
  line-height: 1;
  text-align: center;
  box-shadow: none;
  transition: background 0.19s;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

.popup-frame {
  width: 100%;
  height: calc(100% - 38px);
  border: none;
  background: transparent;
/*  border-radius: 0 0 10px 10px; */
  min-height: 80px;
}






    .tox .tox-notification--in,
    .tox .tox-promotion,
    .tox .tox-statusbar__help-label,
    .tox .tox-tbtn[title="Get all features"],
    .tox .tox-toolbar__overflow [href*="get-tiny"] {
      display: none !important;
    }
    .tox .tox-statusbar__branding {
      display: none !important;
    }
.tox-statusbar {
  background: transparent !important;
  box-shadow: none !important;
  border-top: none !important;
}




/* Y/W instructions styling */
.yw-instruct {
  background: #fdf2df;
  color: #994700;
  font-size: 15px;
  margin: 10px 0 8px 0;
  padding: 10px 18px;
  border-left: 4px solid var(--secondary);
/*  border-radius: 6px;  */
  box-shadow: 0 1px 5px #be98430a;
}

.yw-instruct code {
  font-family: "Consolas", "Courier New", monospace;
  background: #ffeee0;
  color: #d07300;
  font-size: 1.1em;
  padding: 0 3px;
/*  border-radius: 3px;  */
}

.yw-bttn{
  background: transparent;
  color: transparent;
  font-size: 15px;
  margin: 10px 0 8px 0;
  padding: 10px 18px;
  border-left: 4px solid var(--secondary);
/*  border-radius: 6px;  */
  box-shadow: 0 1px 5px #be98430a;
}


/*
/* Responsive Design */
@media (max-width: 1100px) {
  .container { max-width: 99vw; }
  .charts-row { flex-wrap: wrap; gap: 14px;}
  .chart-section { max-width: 95vw; min-width: 220px;}
}
@media (max-width: 900px) {
  .charts-row { flex-direction: column; align-items: stretch;}
  .chart-section { max-width: 100vw; margin-bottom: 14px;}
/*  .movable-popup { width: 98vw !important; min-width: 180px; left: 1vw !important;}  */
}
@media (max-width: 600px) {
  body { padding: 5px; }
  .container { padding: 5px; }
  .chart-section { padding: 5px;}
}
*/


/* Print-friendly tweaks */
@media print {
  body { background: #fff !important; padding: 0 !important;}
  .container { box-shadow: none !important; border: 1px solid #ccc !important; max-width: 100% !important; padding: 10px 12px !important;}
  button, input, select, .desc, .export-btns, .movable-popup { display: none !important;}
  .number-block { page-break-inside: avoid;}
  .charts-row { flex-wrap: wrap !important; }
  .chart-section { max-width: 380px !important; min-width: 180px !important;}
}

