/* =========================================================
   Calcoli Synchronotron – CSS pulito
   Struttura:
   0) Variabili & utility
   1) Shell / toolbar / tabs / card
   2) Blocchi base (KE, kin, oracolo, tabelle comuni)
   3) Vista Giorno (luna / cubo / kin / oracolo)
   4) IFT + FMC/FAA
   5) Hunab Ku (HK21 + Accumulata)
   6) Sentieri (desktop + mobile)
   7) Lenti del Tempo + Moap + Rune + Ciclo + Pratica
   8) Vista Settimana
   9) Tooltip UMB (disattivati come da stato attuale)
   10) Moon grid / Season / Pacal / altri picc.
   11) Breakpoint (1100 / 992 / 900 / 840 / 820 / 768)
   ========================================================= */

/* ============ 0) VARIABILI & UTILITY ============ */
:root{
  --c-accent: #24ae7f;
  --c-umb:    #6f3cff;
  --c-text:   #1f2937;
  --c-muted:  #f7f7f7;
  --c-soft:   #fafafc;
  --c-border: #e5e5ef;
  --c-yellow: #fed100;
  --c-red:    #e6332a;
  --c-blue:   #5593cf;
}


.hidden{ display:none !important; }
.stack{ display:flex; flex-direction:column; gap:6px; }
.stack .row{ display:flex; align-items:center; gap:8px; min-height:24px; }
.gap{ color:var(--c-accent); font-weight:700; }
.is-umb{ color:var(--c-umb); font-weight:600; font-variant-numeric: tabular-nums; }
.sec-title{ font-weight:700; text-decoration: underline; }
.strong {font-weight:bold;}
.text-center {text-align:center;}
.syncalc-status {display:none;}
h3.card-title {font-size: 18px;
  font-weight: 300;
  line-height: 1.1 !important;
  text-align: center;
}
table.hk-table, table.tbl-fmcfaa, table.tbl-ift, table.oracle-mini, table.sentieri-m-summary {margin-bottom:10px;}

/* ============ 1) SHELL / TOOLBAR / TABS / CARD ============ */
.syncalc-date{ padding:10px; }
.synchrotron-calculator{padding:16px;}
.synchrotron-toolbar{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-bottom:12px; }
.synchrotron-toolbar button{
  padding:6px 10px; border-radius:8px; border:1px solid #ccc;
  background:#f0f0f0; cursor:pointer;
}
.syncalc-run.button.button-primary{ padding:15px; }
.switch{ display:inline-flex; align-items:center; gap:6px; cursor:pointer; }
.synchrotron-calculator .switch input{ display:none; }
.switch .slider{
  position:relative; width:38px; height:22px; background:#ddd;
  border-radius:999px; display:inline-block; transition:.2s;
}
.switch .slider:after{
  content:''; position:absolute; left:3px; top:3px;
  width:16px; height:16px; border-radius:50%; background:#fff;
  box-shadow:0 1px 3px rgba(0,0,0,.25); transition:.2s;
}
.switch input:checked + .slider{ background:#4caf50; }
.switch input:checked + .slider:after{ left:19px; }
.switch em{ font-style:normal; font-size:13px; color:#444; }

.synchrotron-tabs{ display:flex; gap:8px; margin-bottom:12px; }
.synchrotron-tabs .syncalc-tab{
  padding:8px 12px; border:1px solid #ccc; border-radius:999px;
  background:#f7f7f7; cursor:pointer;
}
.synchrotron-tabs .syncalc-tab:hover{ color:var(--c-accent); }
.synchrotron-tabs .syncalc-tab.active{
  background:var(--c-accent); border-color:#999; color:#fff;
}

.synchrotron-panel{ display:none; }
.synchrotron-panel.active{ display:block; }

.syncalc-card{
  border:1px solid #e6e6e6; border-radius:12px;
  padding:12px; margin-bottom:12px; background:#fff;
}

/* ============ 2) BLOCCHI BASE (KE, KIN, ORACOLO, TABELLE) ============ */
/* KE – layout a colonna ovunque */
.ke-cell .ke-inner{
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:6px; text-align:center;
}
.ke-num,.ke-umbs{ font-variant-numeric:tabular-nums; }
.ke-center img.tonal{ width:32px; height:auto; }
.ke-center img.glyph{ width:46px; height:auto; }
.ke-num.gap{ color:var(--c-accent); font-weight:700; }
.ke-inline{ display:inline-flex; align-items:center; gap:8px; white-space:nowrap; }
.ke-inline .knum{ font-weight:700; }
.ke-inline .umbs .is-umb{ color:var(--c-umb); font-weight:600; }
.synchrotron-calculator .ke-cell .ke-inner{display:flex !important; flex-direction:column !important; align-items:center !important; gap:6px !important; text-align:center !important;}
.synchrotron-calculator .ke-cell .ke-center{ display:flex !important; flex-direction:column !important; align-items:center !important; gap:4px !important; order:1 !important;}
.synchrotron-calculator .ke-cell .ke-center img.tonal{ order:1 !important;width:32px !important; height:auto; }
.synchrotron-calculator .ke-cell .ke-center img.glyph{ order:2 !important; width:46px !important; height:auto;}
.synchrotron-calculator .ke-cell .ke-num{order:3 !important; width:auto !important; text-align:center !important;}
.synchrotron-calculator .ke-cell .ke-umbs{ order:4 !important; width:auto !important; text-align:center !important; white-space:normal !important;}


.kin-figures{ display:flex; flex-direction:column; align-items:center; gap:6px; margin:6px 0; }
.kin-figures img.tonal{ width:40px; }
.kin-figures img.glyph{ height:64px; }

.oracle-mini{ width:100%; border-collapse:separate; border-spacing:0; margin-top:8px; }
.oracle-mini th,.oracle-mini td{ border:1px solid #eee; padding:8px 10px; text-align:center; }
.oracle-mini thead th{ background:var(--c-muted); }
.oracle-mini td:nth-child(2) .mini-kin{ display:flex; flex-direction:row; align-items:center; gap:12px;justify-content:center}
.oracle-mini img.tonal{ width:17px; margin-bottom:2px; }
.oracle-mini img.glyph{ height:21px; }
.oracle-mini .mini-kin,{ display:flex !important; flex-direction:row !important; align-items:center !important; gap:4px !important;}
.week-panel .wk-mini-kin,.synchrotron-calculator .ke-inline {display:flex !important; flex-direction:column !important; align-items:center !important; gap:4px !important;}
.oracle-mini .mini-kin .tonal, .week-panel .wk-mini-kin .tonal{ order:1 !important; }
.oracle-mini .mini-kin .glyph, .week-panel .wk-mini-kin .glyph{ order:2 !important; }
.oracle-mini .mini-kin-images{display: flex; align-items: center; flex-direction: column; align-content: center;}
.oracle-list {display: none;}

/* Tabelle comuni */
.tbl-ift,.tbl-fmcfaa,.tbl-week{ width:100%; border-collapse:separate; border-spacing:0; table-layout:fixed; }
.tbl-ift th,.tbl-ift td,
.tbl-fmcfaa th,.tbl-fmcfaa td,
.tbl-week th,.tbl-week td{ border:1px solid #eee; padding:8px 10px; text-align:center; }
.tbl-ift thead th,.tbl-fmcfaa thead th,.tbl-week thead th{ background:var(--c-muted); }

/* Switch avanzati */
.synchrotron-calculator .advanced-only,
.synchrotron-calculator .advanced-area{ display:none; }
.synchrotron-calculator.show-advanced .advanced-only,
.synchrotron-calculator.show-advanced .advanced-area{ display:revert; } /* ripristina display nativo */

/* ============ 3) VISTA GIORNO (Luna / Cubo / Kin / Oracolo) ============ */
/* Griglia unica a 6 colonne per gestire 2/3–1/3 sopra e 1/2–1/2 sotto */
.day-panel .grid-3{ display:grid; grid-template-columns: repeat(6,1fr); gap:12px; }

/* senza Cubo → Luna full width; sotto 1/2 + 1/2 */
.day-panel .luna-card      { grid-column: 1 / span 6; }
.day-panel .kin-card       { grid-column: 1 / span 3; }
.day-panel .oracolo-card   { grid-column: 4 / span 3; }
.luna-card{ --moon-gap: 8px; }
.rec-so-in-so {display: flex;
  justify-content: space-between;}
  .rec-comp, .rec-somma, .rec-interv {margin: 0 auto;
  display: block;}
  .reciproci p {margin: 0 auto;
  display: flex;
  text-align: center;
  flex-direction: column;}
  .reciproci {margin-bottom:20px};

/* con Cubo → Luna 2/3, Cubo 1/3 (sopra), sotto Kin 1/2 | Oracolo 1/2 */
.day-panel.has-cubo .luna-card    { grid-column: 1 / span 4; }
.day-panel.has-cubo .cubo-card    { grid-column: 5 / span 2; }
.day-panel.has-cubo .kin-card     { grid-column: 1 / span 3; }
.day-panel.has-cubo .oracolo-card { grid-column: 4 / span 3; }
.luna-card{ display: grid; grid-template-columns: 1fr;      /* mobile: 1 colonna */  gap: 12px; align-items: start;}
.luna-card .stack{ display: flex; flex-direction: column; gap: 6px; }
.luna-card .season-text{ margin: 6px 0 0; font-weight: 700; }  /* già usava i colori .season.* */

.luna-card .stack{ grid-column: 1; }
.luna-card .season-text{ grid-column: 1; margin-top: 6px; } /* inglobata visivamente nello stack */
.luna-card .moon-grid{ grid-column: 2; }
.luna-card .moon-title{
  font-weight: 700;
  margin: 0 0 8px 0;
  text-transform: capitalize; /* opzionale, se vuoi “Luna …” in minuscolo iniziale */
}

/* Cubo – blocco */
.cubo-card h3{ margin-top:0; }
.cubo-grid{ display: flex;
  gap: 12px;
  align-items: center;
  flex-direction: column; }
.cubo-left .cubo-svg{ width:120px; height:auto; }
.cubo-right{ display:flex; flex-direction:column; gap:6px; }
.cubo-left .cubo-glifo{ width:56px; height:auto; }
.cubo-aff{ font-weight:700; text-transform:uppercase; }
.cubo-phrase, .oracle-text, .runa-aff, .moap-text, .eptade-phrase, .ciclo-frase {font-family: "Pangolin"; line-height: 19px;
  color: #a4a4a4;
}
  .cubo-left {
    justify-content: center;
    gap: 0 50px;
  }
  
.oracle-text,.eptade-phrase {padding: 0 13px;
}
/* ============ 4) IFT + FMC/FAA (helper colonne 63/FAA) ============ */
.tbl-fmcfaa.hide-m63 .col-m63,
.tbl-ift.hide-m63 .col-m63,
.tbl-fmcfaa.hide-m63 .th-m63,
.tbl-ift.hide-m63 .th-m63{ display:none !important; }

.tbl-fmcfaa.hide-faa thead th:nth-child(4),
.tbl-fmcfaa.hide-faa tbody td:nth-child(4),
.tbl-fmcfaa.hide-faa thead th:nth-child(5),
.tbl-fmcfaa.hide-faa tbody td:nth-child(5){ display:none !important; }

/* sticky prima colonna + thead (solo desktop, vedi media sotto) */
.tbl-ift thead th:first-child,
.tbl-ift tbody td:first-child,
.tbl-fmcfaa thead th:first-child,
.tbl-fmcfaa tbody td:first-child,
.oracle-mini thead th:first-child,
.oracle-mini tbody td:first-child{
  position:sticky; left:0; background:#fff; z-index:2; box-shadow:1px 0 0 rgba(0,0,0,.06); text-align:left;
}

/* ============ 5) HUNAB KU (HK21 + Accumulata) ============ */
.hk21-section{ margin-top:1.25rem; }
.hk-container{ display:grid; grid-template-columns: 2fr 1fr; gap:20px; align-items:end; }

.hk-table,.hk-acc{ width:100%; border-collapse:separate; border-spacing:0; table-layout:fixed; }
.hk-table thead th,.hk-acc thead th{ background:var(--c-muted); text-align:center; padding:8px 10px; border:1px solid #e5e5ee; position:sticky; top:0; z-index:3; box-shadow:0 1px 0 rgba(0,0,0,.06); }
.hk-table td,.hk-table th,.hk-acc td,.hk-acc th{ border:1px solid #e8e8f0; padding:8px 10px; vertical-align:middle;text-align:center;background:#fff; }
.hk-table .left-header,.hk-acc .left-header{ background:var(--c-soft); font-weight:600; width:28ch; text-align:left; }

/* KE dentro HK21 – leggermente più piccoli */
.hk21-section .ke-center img.tonal{ width:28px; height:auto; }
.hk21-section .ke-center img.glyph{ width:40px; height:auto; }

/* ============ 6) SENTIERI ============ */
.sentieri-table{ width:100%; border-collapse: collapse; }
.sentieri-table th,.sentieri-table td{ padding:8px 10px; border-bottom:1px solid #eee; vertical-align:top; }
.sentieri-table .left-header{ background:#f6f6f8; color:#333; white-space:nowrap; }
.sentieri-table .pairs-col{ width:140px; color:#666; font-size:.9em; text-align:right; }
.sentieri-table tfoot td.is-umb{ color:var(--c-umb); font-weight:600; }
td.sent-sum-num, td.sent-sum-freq, td.sent-umb-num, td.sent-umb-freq, td.sent-ke-num, td.sent-ke-freq {background:#fff; text-align:center}

.sent-dot{ display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:.5rem; vertical-align:middle; }
.sent-dot.red{ background:var(--c-red); }
.sent-dot.gray{ background:#cfcfcf; }
.sent-dot.blue{ background:var(--c-blue); }
.sent-dot.yellow{ background:var(--c-yellow); }

.sentieri-section .sentieri-eptade-summary {order:2!important;}
.sentieri-section h3.card-title {order:1!important;}
.sentieri-section table.sentieri-table {order:3!important;}
.sentieri-section .sentieri-mobile {order:4!important;}
.sent-eptade-line {display: flex;  flex-direction: column; padding-bottom: 10px}
.sml-sent, .sml-freq {text-align:center;}

span.kin-corrispondente {position: relative;
  top: -9px;
  margin-right: 10px;}
  
.sent-eptade-line .ke-cell .ke-inner {display: flex;flex-direction: row !important;align-content:flex-end !important}
.piani-summary, .hk21-piani-summary {margin-bottom:20px; text-align:center;}

/* Mobile alt: due tabelle */
.sentieri-mobile{ display:none; }

/* ============ 7) LENTI DEL TEMPO + MOAP + RUNE + CICLO + PRATICA ============ */
.adv-cards{ display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:12px; align-items:stretch; }
.adv-cards > .syncalc-card{ height:100%; display:flex; flex-direction:column; }

/* Lenti (prima card) */
.ldt-grid2{ display:grid; grid-template-columns:140px 1fr; gap:16px; align-items:center; }
.ldt-img img{ max-width:140px; height:auto; display:block; }
.ldt-right{ display:flex; flex-direction:column; gap:10px; }
.ldt-stats{ display:grid; grid-template-columns:auto 1fr; gap:12px 18px; align-items:center; }
.ldt-stat{ display:flex; align-items:center; gap:8px; }
.ldt stat .ke-inner {flex-direction: row!important;}
.ldt-title{ font-weight:700; text-decoration:underline; margin-bottom:4px; }
.ldt-meta strong{ color:#555; }

/* MOAP */
.moap-card .moap-img{ display:flex; align-items:center; justify-content:center; min-height:120px; padding:6px 0; --moap-color:#7a6fa2; }
.moap-mask{
  display:block; width:140px; height:140px; background-color:var(--moap-color);
  -webkit-mask-image: var(--moap-url); mask-image: var(--moap-url);
  -webkit-mask-repeat:no-repeat; mask-repeat:no-repeat;
  -webkit-mask-position:center; mask-position:center;
  -webkit-mask-size:contain; mask-size:contain;
}

/* Rune, Ciclo */
.runa-img img{ width:60px; }
.runa-box {}
.runa-box .runa-img{ display:flex; gap:.5rem; align-items:center; flex-wrap:wrap;justify-content:center; }
.ciclo-row{ display:flex; align-items:center; justify-content:center; gap:10px; }
.hex-img{ width:42px; height:auto; display:inline-block; }
.hex-num{ font-weight:700; font-size:1.1rem; }
.hex-num.black{ color:#111; }
.hex-num.red{ color:#c62828; }
.tbl-week .rune-inline img{ width:33px;height:33px; margin-right:4px; }
.tbl-week .wk-ciclo{ display:flex; align-items:center; gap:6px;justify-content: center; }
.tbl-week .wk-ciclo .hex{ width:26px;height:26px; }
.tbl-week .wk-ciclo .hex-num.red{ color:#c62828; font-weight:700; }
.tbl-week .wk-ciclo .hex-num.black{ color:#111; font-weight:700; }
.ciclo-box, .runa-box, .moap-card, .cubo-card {text-align:center;}

/* ============ 8) VISTA SETTIMANA ============ */
.week-title { color: #fff; padding: .35rem .6rem; border-radius: 0; display: inline-block; width: 100%; text-align: center;}
.week-title.eptade-col-1 { background:var(--c-red); }   /* rosso */
.week-title.eptade-col-2 { background:#7a7a7a; }   /* bianco/grigio */
.week-title.eptade-col-3 { background:var(--c-blue); }   /* blu */
.week-title.eptade-col-4 { background:var(--c-yellow); }   /* giallo */

.plasma-head img {width:50px;}
.plasma-figure {width:50px;}

.week-panel .syncalc-card{ position:relative; overflow:auto; }
.week-nav{ display:none; justify-content:space-between; align-items:center; gap:8px; margin-bottom:.5rem; }
.week-nav .hint{ font-size:.9em; opacity:.8; }
.week-nav button{ border:1px solid #ddd; background:#fff; padding:.25rem .5rem; border-radius:6px; }

.tbl-week th,.tbl-week td{ vertical-align:top; }
.tbl-week .left-header{ text-align:left; white-space:nowrap; min-width:170px; position:sticky; left:0; z-index:2; background:#fff; box-shadow:1px 0 0 rgba(0,0,0,.06); }
.tbl-week thead th{ position:sticky; top:0; z-index:3; background:#fff; box-shadow:0 1px 0 rgba(0,0,0,.06); }
.tbl-week .current-col{ font-weight:600; }
.tbl-week .wk-pack{ display:flex; flex-direction:column; gap:4px; }
.tbl-week .wk-pack .line{ line-height:1.25; }
.tbl-week .wk-pack .wk-mline {display:flex;flex-direction:column;}
.tbl-week .wk-mini-kin{ display:flex; flex-direction:column; align-items:center; gap:4px; }
.tbl-week .wk-mini-kin span.imgs {display: flex;  align-items: center;  flex-direction: column;  align-content: center;  gap: 4px;}
.tbl-week .wk-mini-kin .tonal{ width:20px; } .tbl-week .wk-mini-kin .glyph{ width:24px; height:24px; }
.tbl-week .wk-om .knum{ font-weight:700; margin-top:2px; }
.tbl-week .wk-om {display: flex; flex-direction:column;}
.tbl-week .rune-inline img{ width:40px; height:40px; margin:0 3px; }
.tbl-week .hex-inline img{ width:33px; height:33px; margin:0 3px; }
.tbl-week .ke-inline{
  display:inline-flex; align-items:center; gap:8px; white-space:nowrap;
}
.tbl-week .ke-inline .imgs img{ width:20px; height:20px; display:flex;flex-direction:column; }
.tbl-week .ke-inline .imgs img.glyph{ width:24px; height:24px; display:flex;flex-direction:column; }
.tbl-week .ke-inline .knum{ font-weight:700; }
.tbl-week .ke-inline .umbs .is-umb{ font-weight:600; color:#6f3cff; }

/* Advanced & 63 righe (governate da classi sul root) */
.synchrotron-calculator .week-panel .advanced-only{ display:none; }
.synchrotron-calculator.show-advanced .week-panel .advanced-only{ display:revert; }
.synchrotron-calculator .week-panel .row-m63{ display:revert; }
.synchrotron-calculator:not(.show-m63) .week-panel .row-m63{ display:none; }

/* bordo colonna corrente (continuo) */
.tbl-week .current-col{ box-shadow: inset 2px 0 var(--c-accent), inset -2px 0 var(--c-accent); }
.tbl-week thead th.current-col{ box-shadow: inset 2px 0 var(--c-accent), inset -2px 0 var(--c-accent), inset 0 2px var(--c-accent); }
.tbl-week tbody tr:last-child td.current-col{ box-shadow: inset 2px 0 var(--c-accent), inset -2px 0 var(--c-accent), inset 0 -2px var(--c-accent); }

/* helper parentesi */
.paren::before{ content:"(" }
.paren::after{  content:")" }

/* col nascoste su mobile – il JS applica .hide-mobile */
.tbl-week th.hide-mobile, .tbl-week td.hide-mobile{ display:none !important; }

/* Giorni speciali (29/2 e 25/7) – nascondi card “luna/eptade” nella Week */
.week-panel.special-day .syncalc-card.moon-eptade{ display:none !important; }

/* ============ 9) TOOLTIP UMB (disattivati come ora) ============ */
.synchrotron-calculator .umb-tip{ display:none !important; }
.synchrotron-calculator .has-tip{ text-decoration:none !important; cursor:inherit !important; }

/* ============ 10) MOON GRID / SEASON / PACAL & piccoli ============ */
.season-text{ margin:6px 0 2px;  }
.season-text .season.rosso{ color:var(--c-red); }
.season-text .season.bianco{ color:#7a7a7a; }
.season-text .season.blu{ color:var(--c-blue); }
.season-text .season.giallo{ color:var(--c-yellow); }

.moon-head{ display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: var(--moon-gap); margin: 8px 0 6px;}
.moon-head .head-cell{ display: flex; flex-direction: column;  align-items: center;  gap: 4px;}
.moon-head .plasma{ width: 22px; height: 22px; }
.moon-head .plasma-name{ font-size: .85rem; opacity: .9; }

/* griglia 4x7: usa la stessa griglia e lo stesso gap dell’header */
.moon-grid{ display: grid; gap: var(--moon-gap); }
.moon-row{  display: grid;  grid-template-columns: repeat(7, minmax(0,1fr));  gap: var(--moon-gap);}

/* la singola cella giorno */
.moon-cell{  display: flex;                /* FIX: niente table-grid */
  flex-direction: column;  align-items: center;  gap: 2px;  padding: 6px;  border-radius: 10px;  border: 1px solid #e5e5ef;  background: #fff;  cursor: pointer;  text-align: center;}

.moon-grid{ display:grid; gap:6px; margin-top:8px; }
.moon-row{ display:grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap:6px; }
.moon-row.color-1 .moon-cell{ background:#fdecea; }
.moon-row.color-2 .moon-cell{ background:#eeeeee; }
.moon-row.color-3 .moon-cell{ background:#e7f0fd; }
.moon-row.color-4 .moon-cell{ background:#fff9e6; }
.moon-cell{
  display:revert; gap:2px; padding:6px; border-radius:10px; border:1px solid var(--c-border);
  cursor:pointer; text-align:center;
}
.moon-cell .cell-top{ display:flex; flex-direction:column; align-items:center; gap:2px; min-height:36px; }
.moon-cell .cell-top img.plasma{ width:22px; height:22px; }
.moon-cell .cell-day{ font-weight:800; font-size:1rem; }
.moon-cell .cell-date{ font-size:.85rem; opacity:.8; }
.moon-cell .cell-date:hover, .moon-cell .cell-day:hover, .moon-cell:hover  {color:#000;}
.moon-cell.current{ outline:2px solid var(--c-accent); background:#e9fbf4; }

.moon-head{display:grid;grid-template-columns: repeat(7, minmax(0,1fr)); gap:6px; margin-top:8px;}
.moon-head .head-cell{display:flex; flex-direction:column; align-items:center; gap:4px;padding:6px; border-radius:10px; ; font-weight:600; font-size:.9rem; text-align:center;}
.moon-head .head-cell img.plasma{ width:22px; height:22px; }

/* 2) Nelle celle: nascondi icona + nome del plasma (li mostra l’header) */
.moon-cell .cell-top{ display:none !important; }

/* 3) Micro-ritocchi di spaziatura dopo la rimozione della cell-top */
.moon-cell{ padding:8px 6px; }
.moon-cell .cell-day{ margin-top:0; }

/* 4) Allineamento estetico tra header e griglia */
.moon-head + .moon-grid{ margin-top:6px; }

.pv{ font-style:italic; }
.ns-date {margin-top:10px;}
.sentieri-m-summary, .sentieri-m-list {background: #fff;}
.synchrotron-calculator:not(.show-m63) .tbl-week .ift63 { display:none; }
.tbl-week tr.row-m63 .paren::before { content: "";}
.tbl-week tr.row-m63 .paren::after { content: "";}
.tbl-week .row-m63, .tbl-week .advanced-only {background:#f2f2f2;}

.kin-sentiero, .ldt-stat.ldt-ke.ke-cell .ke-inner  {display: flex; flex-direction: row!important;  gap: 3px;  align-items: flex-end!important;}

.sent-eptade-line .ke-cell .ke-center img.glyph, .ldt-stat .ke-cell .ke-center img.glyph{width:26px !important;}
.sent-eptade-line .ke-cell .ke-center img.tonal,  .ldt-stat.ldt-ke.ke-cell .ke-center img.glyph{width:20px !important;}
/* =========================================================
   11) BREAKPOINT
   ========================================================= */

/* >= 1100px – LDT 1/3 in verticale, altri moduli nei 2/3 */
@media (min-width:1100px){
  .adv-cards{ grid-template-columns: 1fr 1fr 1fr; gap:14px; align-items:start; }
  .adv-cards > .syncalc-card:first-child{ grid-column:1; grid-row:1 / span 10; }
}

/* >= 992px – utility desktop */
@media (min-width:992px){
  .luna-card .stack{ grid-column: 1; }
  .luna-card .moon-head,
  .luna-card .moon-grid{ grid-column: 2; } /* header e griglia nella stessa colonna */
}

/* <= 992px – HK a colonna singola */
@media (max-width:992px){
  .hk-container{ grid-template-columns:1fr; gap:14px; }
  .hk-table thead th, .hk-acc thead th{ position:static; box-shadow:none; }
  
  .luna-card .stack,
  .luna-card .season-text,
  .luna-card .moon-grid{ grid-column: 1; }
  .luna-card{ display:block; }
}
@media (min-width:992px){
  
  
  .luna-card .stack{ grid-column: 1; }
  .luna-card .moon-head,
  .luna-card .moon-grid{ grid-column: 2; }
}

/* <= 900px – Settimana mobile + niente sticky + nav visibile */
@media (max-width:900px){
  .tbl-week thead th, .tbl-week .left-header{ position:static !important; box-shadow:none !important; font-size:.9em; }
  .tbl-week th,.tbl-week td{ padding:6px 6px; }
  .tbl-week tr td{ font-size:.9em; }
  .week-panel .syncalc-card{ overflow:visible; }
  .week-nav{ display:flex; }

  /* HK: 100% larghezza */
  .hk-table, .hk-acc{ width:100%; }
  
  .day-panel .grid-3{ grid-template-columns:1fr !important; }
  .day-panel .luna-card, .day-panel .cubo-card, .day-panel .kin-card, .day-panel .oracolo-card{ grid-column:1 / -1 !important; }
}

/* <= 840px – colonne avanzate in pila */
@media (max-width:840px){
  .adv-cards{ grid-template-columns:1fr; }
  .ldt-grid2{ grid-template-columns:1fr; }
  .ldt-stats{ grid-template-columns:1fr; row-gap:10px; }
}

/* <= 820px – Sentieri mobile (sdoppiati) */
@media (max-width:820px){
  .sentieri-table{ display:none !important; }
  .sentieri-mobile{ display:block !important; width:100%; }
}

/* >= 821px – Sentieri desktop */
@media (min-width:821px){
  .sentieri-table{ display:table; }
  .sentieri-mobile{ display:none !important; }
}

/* <= 768px – Cubo/Lenti immagini più fluide */
@media (max-width:768px){
  .cubo-grid{ grid-template-columns:1fr; }
  .day-panel .grid-3{ grid-template-columns: 1fr; }
  .day-panel .luna-card,
  .day-panel .kin-card,
  .day-panel .oracolo-card,
  .day-panel.has-cubo .luna-card,
  .day-panel.has-cubo .cubo-card{ grid-column: 1 / -1; }
  .cubo-left {display: flex;}
  .ldt-img img {width: 200px;
  margin: 0 auto;}
  
  
}

/* 2 colonne solo desktop: stack | luna */
.luna-card .luna-split{
  display:grid; grid-template-columns: 1fr 1fr; gap:12px; align-items:start;
}
@media (max-width: 991.98px){ .luna-card .luna-split{ display:block; } }

/* header 7 colonne allineato alla griglia */
/* layout 1/2 + 1/2; su mobile 100% */
.luna-split{ display:grid; grid-template-columns: 1fr 1fr; gap:12px; align-items:start; }
@media (max-width: 900px){ 
    .luna-split{ grid-template-columns: 1fr; } 
    
      /* scala base */
  .synchrotron-calculator{
    --fz-1: 1.3rem;   /* testo base */
    --fz-2: 1.2rem;   /* secondario / celle */
    --fz-3: 1rem;   /* note / micro */
    padding:10px;
  }

  /* densità generale */
  .synchrotron-calculator,
  .synchrotron-calculator .syncalc-card{ font-size: var(--fz-1); }
  .syncalc-card{ padding: 10px; }
  .stack{ gap: 4px; }
  .stack .row{ gap: 6px; min-height: 20px; }
.synchrotron-toolbar {gap: 10px 3px; }
  .synchrotron-tabs .syncalc-tab{ padding: 6px 10px; font-size: 15px; }

  /* titoli/sezioni */
  .sec-title{ font-size: 1rem; }
  .ns-date, .piani-summary, .hk21-piani-summary { font-size: var(--fz-2); }
  

  /* tabelle principali */
  .tbl-ift th, .tbl-ift td,
  .tbl-fmcfaa th, .tbl-fmcfaa td,
  .tbl-week th, .tbl-week td,
  .oracle-mini th, .oracle-mini td,
  .sentieri-table th, .sentieri-table td,
  .hk-table th, .hk-table td,
  .hk-acc th, .hk-acc td{
    padding: 6px 8px;
    font-size: var(--fz-2);
    line-height: 1.2;
  }
.syncalc-run.button.button-primary { padding: 13px 9px;}
  /* week title compatto */
  .week-title{ font-size: var(--fz-2); padding: .25rem .5rem; }
  .luna-card .stack{ gap:3px }
  /* mini-kin / oracolo / KE: icone e testi più piccoli */
  .kin-figures img.tonal{ width: 28px; }
  .kin-figures img.glyph{ height: 48px; }

  .ke-cell .ke-center img.tonal{ width: 24px; height: auto; }
  .ke-cell .ke-center img.glyph{ width: 36px; height: auto; }
  .ke-cell .ke-num,
  .is-umb{ font-size: var(--fz-2); }

  .oracle-mini img.tonal{ width: 14px; }
  .oracle-mini img.glyph{ height: 18px; }
  .mini-kin .mini-kin-number{ font-size: var(--fz-2); }

  /* LUNA: titolo+head+griglia compatti ma cliccabili */
  .moon-title{ font-size: 1.5rem; margin-bottom: 4px; text-align:center; }
  .moon-head{ margin-bottom: 6px; }
  .moon-head .head-cell{ gap: 4px; }
  .moon-head img.plasma{ width: 20px; height: 20px; }
  .moon-head .name{ font-size: .95rem; }

  .moon-cell{ padding: 4px; min-height: 44px; } /* tap target sicuro */
  .moon-cell .cell-day{ font-size: 0.95rem; }
  .moon-cell .cell-date{ font-size: .9rem; }

  /* Lenti / MOAP / Rune / Ciclo */
  .ldt-box .ldt-img img{ max-width: 220px; }
  .runa-img img{ width: 50px; }
  .ciclo-imgs img{ width: 34px; }

  /* Sentieri (mobile) */
  .sentieri-m-list th, .sentieri-m-list td,
  .sentieri-m-summary th, .sentieri-m-summary td{
    padding: 6px; font-size: var(--fz-2);};
  }
.moon-title {margin-top:20px}
.sentieri-m-summary th, .sentieri-m-summary td.is-umb, .sentieri-m-summary td.strong {text-align:center}
  /* Navigazione settimana */
  .week-nav .hint{ font-size: .9em; }
}

/* micro-allineamenti ovunque (evita “salti” verticali delle icone) */
.kin-figures img.tonal,
.kin-figures img.glyph,
.ke-center img.tonal,
.ke-center img.glyph,
.oracle-mini img.tonal,
.oracle-mini img.glyph{ vertical-align: middle; }
    
}

/* tabella luna semplice */
.moon-table{ width:100%; border-collapse:separate; border-spacing:6px; }
.moon-table thead th{ padding:0; }

.plasma-pill{
  display:flex; flex-direction:column; align-items:center; gap:4px;
  border:1px solid #e5e5ef; border-radius:12px; background:#fff; padding:8px 10px;
}
.plasma-pill img{ width:28px; height:28px; }

.mcell{
  border:1px solid #e5e5ef; border-radius:12px; background:#fff;
  text-align:center; padding:8px 6px;
}
.mcell .day-num{ font-weight:700; }
.mcell.current{ outline:2px solid #24ae7f; background:#e9fbf4; }

/* colori per le 4 righe (come prima) */
.row-color-1 .mcell{ background:var(--c-red); }
.row-color-2 .mcell{ background:#eeeeee; }
.row-color-3 .mcell{ background:var(--c-blue); }
.row-color-4 .mcell{ background:var(--c-yellow); }

/* season-text inglobata nello stack (già esistente) */
.season-text{ margin:6px 0 2px; font-weight:700; }
.season-text .season.rosso{ color:var(--c-red); }
.season-text .season.bianco{ color:#7a7a7a; }
.season-text .season.blu{ color:var(--c-blue); }
.season-text .season.giallo{ color:var(--c-yellow); }

.sentieri-section {
  display: flex!important;
  flex-direction: column!important;
}

/* Ordiniamo gli elementi nell’ordine voluto */
.sentieri-section h3.card-title {
  order: 1!important;
}
.sentieri-section .sentieri-eptade-summary {
  order: 2!important;
}
.sentieri-section .sentieri-table {
  order: 3!important;
}
.sentieri-section .sentieri-mobile {
  order: 4!important;
}

.day-panel.has-cubo .luna-card { 
  grid-column: 1 / span 4; 
  order:1;
}
.day-panel.has-cubo .cubo-card { 
  grid-column: 5 / span 2; 
  order:2;
}
.day-panel:not(.has-cubo) .luna-card {
  grid-column: 1 / span 6;
}
p:empty,
p:blank,
p:has(br:only-child),
p:has(&nbsp;) {
  display: none !important;
}
.col-outline.show {display:none!important;height:0!important}