:root{
  --apt-mf-bg: var(--bg, #0b0e14);
  --apt-mf-panel: rgba(17,22,34,.72);
  --apt-mf-panel-2: rgba(15,20,32,.78);
  --apt-mf-text: var(--text, #f1f5f9);
  --apt-mf-muted: var(--muted, #9aa4b2);
  --apt-mf-line: var(--line, rgba(255,255,255,.08));
  --apt-mf-blue: var(--blue2, #66a3ff);
  --apt-mf-gold: var(--gold, #b89f5a);
  --apt-mf-radius: 18px;
}

.apt-mf-root{
  color: var(--apt-mf-text);
}

.apt-mf-notice{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:16px 18px;
  margin:0 0 18px;
  border-radius:16px;
  border:1px solid var(--apt-mf-line);
  background:linear-gradient(180deg, rgba(17,22,34,.88), rgba(14,18,30,.72));
}
.apt-mf-notice.compact{margin-bottom:20px}
.apt-mf-notice-copy{
  color:rgba(241,245,249,.86);
  line-height:1.6;
  font-size:14px;
}
.apt-mf-notice-actions{display:flex; gap:10px; flex-wrap:wrap}

.apt-mf-hero{
  display:grid;
  grid-template-columns: minmax(0,1fr) 280px;
  gap:18px;
  align-items:start;
  margin-bottom:20px;
}

.apt-mf-mini-cards{
  display:grid;
  gap:14px;
}
.apt-mf-mini-card{
  padding:18px;
  border-radius:18px;
  border:1px solid var(--apt-mf-line);
  background:linear-gradient(180deg, rgba(17,22,34,.84), rgba(14,18,30,.70));
}
.apt-mf-mini-metric{
  font-size:34px;
  font-weight:700;
  letter-spacing:-.03em;
  margin-top:6px;
}
.apt-mf-mini-label{
  color:rgba(154,164,178,.92);
  font-size:13px;
  margin-top:4px;
}

.apt-mf-tabs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:18px;
}
.apt-mf-tab{
  appearance:none;
  border:1px solid rgba(255,255,255,.1);
  background:rgba(255,255,255,.03);
  color:rgba(241,245,249,.86);
  padding:12px 16px;
  border-radius:999px;
  font-size:13px;
  letter-spacing:.02em;
  cursor:pointer;
  transition:.18s ease;
}
.apt-mf-tab:hover{background:rgba(255,255,255,.06); border-color:rgba(255,255,255,.18)}
.apt-mf-tab.is-active{
  background:linear-gradient(90deg, rgba(184,159,90,.85), rgba(47,107,255,.85));
  border-color: rgba(184,159,90,.35);
  color:#fff;
  box-shadow:0 10px 30px rgba(47,107,255,.16);
}

.apt-mf-panel{display:none}
.apt-mf-panel.is-active{display:block}

.apt-mf-grid{
  display:grid;
  grid-template-columns:minmax(0,1.1fr) 340px;
  gap:18px;
  align-items:start;
}
.apt-mf-grid.apt-mf-grid-single,
.apt-mf-grid-single{
  grid-template-columns:minmax(0,1fr);
}
.apt-mf-col-main,
.apt-mf-col-side{
  display:grid;
  gap:18px;
}

.apt-mf-card{
  padding:18px;
  border-radius:18px;
  background:linear-gradient(180deg, rgba(17,22,34,.78), rgba(14,18,30,.60));
  border:1px solid rgba(255,255,255,.08);
  box-shadow: 0 0 0 1px rgba(255,255,255,.03), 0 18px 60px rgba(0,0,0,.20);
}

.apt-mf-heading{
  font-size:24px;
  line-height:1.15;
  margin:10px 0 0;
  letter-spacing:-.02em;
}

.apt-mf-form{margin-top:18px; display:grid; gap:18px}
.apt-mf-field{display:grid; gap:10px}
.apt-mf-label{
  font-size:13px;
  color:rgba(241,245,249,.88);
  font-weight:600;
  letter-spacing:.02em;
}

.apt-mf-two-up,
.apt-mf-three-up{
  display:grid;
  gap:14px;
}
.apt-mf-two-up{grid-template-columns:repeat(2,minmax(0,1fr))}
.apt-mf-three-up{grid-template-columns:repeat(3,minmax(0,1fr))}

.apt-mf-mood-grid,
.apt-mf-chip-grid{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.apt-mf-mood,
.apt-mf-chip{
  appearance:none;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.03);
  color:rgba(241,245,249,.86);
  border-radius:14px;
  cursor:pointer;
  transition:.18s ease;
}
.apt-mf-chip{
  padding:10px 12px;
  font-size:13px;
}
.apt-mf-chip:hover,
.apt-mf-mood:hover{background:rgba(255,255,255,.06); border-color:rgba(255,255,255,.18)}
.apt-mf-chip.is-selected,
.apt-mf-mood.is-selected{
  border-color: rgba(184,159,90,.35);
  background: linear-gradient(90deg, rgba(184,159,90,.16), rgba(47,107,255,.16));
  box-shadow: inset 0 0 0 1px rgba(184,159,90,.18), 0 10px 24px rgba(47,107,255,.10);
}
.apt-mf-mood{
  min-width:86px;
  padding:12px 10px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  font-size:26px;
}
.apt-mf-mood span{
  font-size:12px;
  color:rgba(241,245,249,.86);
}

.apt-mf-root textarea,
.apt-mf-root select,
.apt-mf-root input[type="text"]{
  width:100%;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(7,10,16,.55);
  color:rgba(241,245,249,.95);
  padding:13px 14px;
  font:inherit;
  line-height:1.5;
  outline:none;
}
.apt-mf-root textarea:focus,
.apt-mf-root select:focus,
.apt-mf-root input[type="text"]:focus{
  border-color: rgba(102,163,255,.45);
  box-shadow: 0 0 0 4px rgba(102,163,255,.08);
}

.apt-mf-root input[type="range"]{
  width:100%;
  accent-color: var(--apt-mf-blue);
}

.apt-mf-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.apt-mf-helper{
  color:rgba(154,164,178,.92);
  font-size:13px;
}

.apt-mf-output-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-top:16px;
}
.apt-mf-output-card{
  border-radius:16px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
  padding:14px;
}
.apt-mf-output-label{
  color:rgba(154,164,178,.9);
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.12em;
  margin-bottom:8px;
}
.apt-mf-output-text{
  color:rgba(241,245,249,.9);
  line-height:1.65;
  font-size:14px;
  white-space:pre-wrap;
}
.apt-mf-output-text.apt-mf-reply{
  cursor:pointer;
  position:relative;
  padding-right:24px;
}
.apt-mf-output-text.apt-mf-reply:after{
  content:'Copy';
  position:absolute;
  right:0;
  top:0;
  color:rgba(154,164,178,.85);
  font-size:11px;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.apt-mf-support{
  margin-top:14px;
  color:rgba(154,164,178,.9);
  font-size:13px;
  line-height:1.55;
}

.apt-mf-post-cta{
  margin-top:2px;
  padding:18px;
  border-radius:18px;
  border:1px solid rgba(184,159,90,.22);
  background:linear-gradient(120deg, rgba(184,159,90,.12), rgba(47,107,255,.12));
  box-shadow:0 18px 50px rgba(0,0,0,.18), inset 0 0 0 1px rgba(255,255,255,.04);
}
.apt-mf-post-cta.is-hidden{display:none}
.apt-mf-post-cta-copy{display:grid; gap:8px}
.apt-mf-post-cta-title{
  margin:0;
  font-size:22px;
  line-height:1.15;
  letter-spacing:-.02em;
}
.apt-mf-post-cta-text{
  margin:0;
  color:rgba(241,245,249,.9);
  line-height:1.65;
  font-size:14px;
}
.apt-mf-post-cta-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px;
}
.apt-mf-post-cta-note{
  margin-top:12px;
  color:rgba(154,164,178,.92);
  font-size:12px;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.apt-mf-stat-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-top:16px;
}
.apt-mf-stat{
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
  border-radius:16px;
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.apt-mf-stat-value{
  font-size:28px;
  font-weight:700;
  letter-spacing:-.03em;
}
.apt-mf-stat-label{
  font-size:12px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:rgba(154,164,178,.85);
}

.apt-mf-chart-wrap{
  margin-top:16px;
}
.apt-mf-chart-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:8px;
  color:rgba(241,245,249,.86);
  font-size:14px;
}
.apt-mf-chart{
  width:100%;
  height:auto;
  display:block;
}

.apt-mf-history{
  display:grid;
  gap:10px;
  margin-top:16px;
}
.apt-mf-history-item{
  padding:14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
}
.apt-mf-history-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}
.apt-mf-history-date{
  color:rgba(154,164,178,.9);
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.apt-mf-history-badge{
  color:rgba(241,245,249,.9);
  font-size:11px;
  letter-spacing:.08em;
  text-transform:uppercase;
  border-radius:999px;
  padding:6px 10px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
}
.apt-mf-history-title{
  font-size:14px;
  font-weight:600;
  color:rgba(241,245,249,.92);
}
.apt-mf-history-copy{
  margin-top:6px;
  font-size:13px;
  line-height:1.55;
  color:rgba(200,210,230,.80);
}
.apt-mf-empty{
  color:rgba(154,164,178,.86);
  font-size:14px;
  line-height:1.55;
  padding:4px 0;
}

@media (max-width: 1100px){
  .apt-mf-grid,
  .apt-mf-hero{
    grid-template-columns:1fr;
  }
}

@media (max-width: 760px){
  .apt-mf-two-up,
  .apt-mf-three-up,
  .apt-mf-output-grid,
  .apt-mf-stat-grid{
    grid-template-columns:1fr;
  }
  .apt-mf-notice,
  .apt-mf-actions,
  .apt-mf-post-cta-actions{
    flex-direction:column;
    align-items:flex-start;
  }
  .apt-mf-post-cta .btn{width:100%}
  .apt-mf-mood-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .apt-mf-mood{min-width:0}
}
