*, *::before, *::after {
  box-sizing: border-box;
  justify-content: center;
}

:root {
  --bg-color: #fffdf9;
  --border-color: #d8caca;
  
  --info-block-bg: #fff5ea;
  --info-block-bg-hover: #fdd360;
  --info-block-border: #ccc;

  --box-shadow: 0 1px 4px 0 rgba(0,0,0,0.1);
  
  --btn-color: #1858ba;
  --btn-hover: #0066ff;
  --btn-text-color: #fff;
  
  --text-color: #4a4a4a;
  --text-dark: #000;
  --bg-light: #f9f9f9;

  --highlight-color: #ffd587;
  --highlight-bg: rgb(255 210 128 / 10%);

  --wood: #4CAF50;
  --fire: #F44336;
  --earth: #795548;
  --metal: #607D8B;
  --water: #2196F3;
}

.wood  { color: var(--wood);  }
.fire  { color: var(--fire);  }
.earth { color: var(--earth); }
.metal { color: var(--metal); }
.water { color: var(--water); }

tspan.wood  { fill: var(--wood);  }
tspan.fire  { fill: var(--fire);  }
tspan.earth { fill: var(--earth); }
tspan.metal { fill: var(--metal); }
tspan.water { fill: var(--water); }

html {
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

body {
  background-color: var(--bg-color);
  font-family: Arial, sans-serif;
  font-style: normal;
}


.content {
  padding-bottom: 100px;
  min-height: 100vh; 
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

/* ===== Typography ===== */
h1 {
  margin: 0 12px;
  font-size: 1.5rem;
}

h2 {
  margin: 0 12px;
  padding-bottom: 5px;
  color: #700e0e;
  font-size: clamp(12px, 2vw, 14px);
}

h3 {
  padding-top: 12px;
  padding-left: 12px;
  color: #616161;
  font-size: clamp(12px, 2vw, 16px);
}

h4 {
    margin: 10px 0 5px 0;
    color: #a94f17;
    font-size: 14px;
}


/* ===== ТАБЛИЦЫ ===== */

table {
  margin: 0 auto;
  width: 100%;
  max-width: 500px;
  table-layout: fixed;
  text-align: center;
  margin-bottom: 10px; 
}

th {
  font-size: clamp(8px, 2vw, 10px);
  font-weight: lighter;
  color: #202020;
}

td {
  border: 0.5px solid var(--border-color);
}


.table-personal, .table-today {
  padding-top: 55px;
  border-collapse: separate;
  border-spacing: 4px;
  font-size: 3rem;
  font-weight: 200;
  scroll-margin-top: 50px;
}

.table-personal > tbody > tr > td,
.table-today > tbody > tr > td {
  background: linear-gradient(25deg, var(--bg-color), #fff);
  border-radius: 4px;
}

.table-personal > tbody > tr > td:hover {
  border-color: #ceb69c;
  box-shadow: var(--box-shadow);
  cursor: pointer;
}

.table-personal .sns,
.table-today .sns {
  font-size: 1.2rem;
}

.emptyborder{
  border: none !important;;
  background: none !important;
  width: 2px;
  box-shadow: none !important;
}

/* Phase Table */

.phaseTable, .table-stars {
  border-spacing: 4px;
  font-size: 11px;
  line-height: 1.1em;
  text-align: left;
  margin-block-end: 20px;
}

/* Stars Table
========================== */

.table-stars td,
.phaseTable td {
  
  vertical-align: top;
  padding: 0.2em 0.2em 0.2em 0.5em;
  border: none;
  /* background: #fafafa;
  border-radius: 4px; */
  white-space: normal; /* Разрешаем перенос строк */
  overflow-wrap: break-word;
}

.star-item:hover,
.phase-cell:hover{
  
  color: #e2500f;
  font-weight: bold;
  cursor: pointer;
}


/* Lucky Table
========================== */

.table-lucky {
  font-size: 1.5rem;
  font-weight: 300;
  margin-top: 20px;
  margin-bottom: 20px;
}

.table-lucky .sns {
  font-size: clamp(8px, 2vw, 10px);
}

.yearsOfTakts {
  font-size: clamp(7px, 0.8vw, 10px);
  white-space: nowrap;
  color: #555;
}


/* Highlight styles */

.highlight {
  border: 1px solid var(--highlight-color);
  background-color: var(--highlight-bg);
}

.highlight-column {
  border-left: 1px solid var(--highlight-color);
  border-right: 1px solid var(--highlight-color);
  background-color: var(--highlight-bg);
  
}

th.highlight-column {
  border-top: 1px solid var(--highlight-color);
}

tr:last-child td.highlight-column {
  border-bottom: 1px solid var(--highlight-color);
}


/* Контейнер SVG */

.svg-container {
  display: flex; 
  flex-wrap: wrap;
}

.svg-item {
  flex: 1;
  min-width: 300px;
  max-width: 400px;
  width: 100%;
}


/* стили для информации дня */

.info-day-container {
  max-width: 500px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
}

.info-day-block p {
  margin: 0 12px;
  padding-bottom: 20px;
  font-size: clamp(12px, 2vw, 14px)
}