.mfr {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.35;
}

.mfr-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin: 10px 0 18px;
}

.mfr-title {
  margin: 0;
  font-size: 26px;
}

.mfr-sub {
  color: #666;
  font-size: 14px;
  margin-top: 4px;
}

.mfr-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
}

.mfr-grid-dashboard {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 980px) {
  .mfr-grid { grid-template-columns: 1fr; }
  .mfr-grid-dashboard { grid-template-columns: 1fr; }
}

.mfr-card {
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0,0,0,.05);
  overflow: hidden;
}

.mfr-card-header {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  background: rgba(0,0,0,.02);
}

.mfr-card-header h3, .mfr-card-header h4 {
  margin: 0;
  font-size: 16px;
}

.mfr-card-body { padding: 14px 16px; }

.mfr-row { margin-bottom: 12px; }

.mfr-label {
  display: block;
  font-size: 13px;
  color: #444;
  margin-bottom: 6px;
}

.mfr-input, .mfr-textarea, select {
  width: 100%;
  border: 1px solid rgba(0,0,0,.18);
  border-radius: 12px;
  padding: 10px 10px;
  font-size: 14px;
  background: #fff;
}

.mfr-input-small { max-width: 140px; }

.mfr-input.required { bagckground: #fdf4f3; }

.mfr-textarea { min-height: 90px; resize: vertical; }

.mfr-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mfr-wrap { flex-wrap: wrap; }

.mfr-muted {
  color: #666;
  font-size: 13px;
  margin-top: 6px;
}

.mfr-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #333;
  user-select: none;
}

.mfr-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #333;
}

.mfr-distractions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.mfr-micro label {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.mfr-btn {
  border: 1px solid rgba(0,0,0,.2);
  background: #111;
  color: #fff;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  cursor: pointer;
}

.mfr-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.mfr-btn-ghost {
  background: #fff;
  color: #111;
}

.mfr-btn-danger {
  background: #b3261e;
  border-color: rgba(0,0,0,.15);
}

.mfr-hr {
  border: 0;
  border-top: 1px solid rgba(0,0,0,.08);
  margin: 14px 0;
}

.mfr-timer { text-align: center; }

.mfr-time {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: 1px;
  margin: 10px 0 10px;
}

.mfr-timer-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.mfr-banner {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(17,17,17,.06);
  font-size: 13px;
  color: #222;
}

.mfr-audio-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mfr-playlist-frame {
  margin-top: 10px;
}

.mfr-fun-box {
  border: 1px dashed rgba(0,0,0,.25);
  border-radius: 14px;
  padding: 12px;
  background: rgba(0,0,0,.02);
}

.mfr-fun-title { font-weight: 700; margin-bottom: 8px; }

.mfr-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.42);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  padding: 20px;
}

.mfr-modal-card {
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  width: min(460px, 100%);
  box-shadow: 0 16px 40px rgba(0,0,0,.2);
}

.mfr-modal-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 6px;
}

.mfr-modal-text { color: #333; margin-bottom: 14px; }

.mfr-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.mfr-modal-actions-wide {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.mfr-celebrate-reward {
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(0,0,0,.02);
  padding: 12px;
  border-radius: 14px;
}

.mfr-loot {
  margin-top: 14px;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 16px;
  padding: 12px;
  background: rgba(0,0,0,.02);
}

.mfr-loot-title { font-weight: 800; margin-bottom: 6px; }
.mfr-loot-body { color: #222; margin-bottom: 10px; }

.mfr-stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.mfr-stat:last-child { border-bottom: 0; }
.mfr-stat-label { color: #555; font-size: 13px; }
.mfr-stat-value { font-size: 22px; font-weight: 800; }

.mfr-list-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.mfr-list-row:last-child { border-bottom: 0; }

/* Confetti */
.mfr-confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999999;
  overflow: hidden;
  display: none;
}

.mfr-confetti.is-on {
  display: block;
}

.mfr-confetti-piece {
  position: absolute;
  top: -20px;
  border-radius: 2px;
  opacity: 0.95;
  transform: translate3d(0,0,0) rotate(var(--mfr-rot, 0deg));
  animation-name: mfr-confetti-fall;
  animation-timing-function: linear;
  animation-iteration-count: 1;
  background: hsl(var(--mfr-h, 0) 70% 55%);
}

.mfr-confetti-piece:nth-child(6n+1) { --mfr-h: 12; }
.mfr-confetti-piece:nth-child(6n+2) { --mfr-h: 42; }
.mfr-confetti-piece:nth-child(6n+3) { --mfr-h: 170; }
.mfr-confetti-piece:nth-child(6n+4) { --mfr-h: 210; }
.mfr-confetti-piece:nth-child(6n+5) { --mfr-h: 280; }
.mfr-confetti-piece:nth-child(6n+6) { --mfr-h: 330; }

@keyframes mfr-confetti-fall {
  0%   { transform: translate3d(0, -10px, 0) rotate(var(--mfr-rot, 0deg)); }
  100% { transform: translate3d(var(--mfr-drift, 0vw), 110vh, 0) rotate(calc(var(--mfr-rot, 0deg) + 540deg)); }
}

/* Print */
@media print {
  .mfr .mfr-timer-actions,
  .mfr .mfr-audio,
  .mfr .mfr-modal,
  .mfr .mfr-wrapup,
  .mfr .mfr-fun,
  .mfr .mfr-confetti,
  .mfr .mfr-loot {
    display: none !important;
  }

  .mfr-card { box-shadow: none; }
  .mfr-grid { grid-template-columns: 1fr; }
}

/* Print blank: hide values */
.mfr-print-blank input,
.mfr-print-blank textarea {
  color: transparent !important;
  text-shadow: 0 0 0 transparent !important;
}
.mfr-print-blank input::placeholder,
.mfr-print-blank textarea::placeholder {
  color: #888 !important;
}