:root{
  --rr-bg:#f7fbff;
  --rr-card:#ffffff;
  --rr-ink:#0f172a;
  --rr-muted:#64748b;

  --rr-green:#22c55e;
  --rr-blue:#3b82f6;
  --rr-yellow:#fbbf24;
  --rr-red:#ef4444;

  --rr-shadow: 0 14px 35px rgba(15, 23, 42, .10);
  --rr-radius: 18px;
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color:var(--rr-ink);
  background:
    radial-gradient(circle at 10% 10%, rgba(34,197,94,.12), transparent 40%),
    radial-gradient(circle at 90% 20%, rgba(59,130,246,.12), transparent 45%),
    radial-gradient(circle at 40% 95%, rgba(251,191,36,.12), transparent 45%),
    var(--rr-bg);
  min-height:100vh;
}

/* ---------------------------------------------------
   HEADER
--------------------------------------------------- */
.rr-header{
  padding:24px 16px 8px;
  text-align:center;
  position:relative;
}

.rr-back{
  position:absolute;
  top:16px;
  left:16px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 14px;
  border-radius:14px;
  font-weight:900;
  font-size:13px;
  text-decoration:none;
  color:#0f172a;
  background:rgba(15,23,42,.06);
  border:1px solid rgba(15,23,42,.10);
  box-shadow:0 8px 18px rgba(15,23,42,.10);
  transition:transform .12s ease, box-shadow .12s ease;
}
.rr-back:hover{
  transform:translateX(-2px);
  box-shadow:0 12px 26px rgba(15,23,42,.14);
}

.rr-badge{
  display:inline-flex;
  gap:8px;
  align-items:center;
  padding:8px 12px;
  border-radius:999px;
  font-weight:900;
  font-size:13px;
  background:rgba(34,197,94,.12);
  color:#166534;
}

.rr-header h1{
  margin:12px 0 6px;
  font-size: clamp(24px, 4vw, 38px);
  line-height:1.08;
}

.rr-lead{
  margin:0 auto;
  max-width: 920px;
  color:var(--rr-muted);
  font-size: 14px;
  padding: 0 10px;
  line-height:1.65;
}

/* ---------------------------------------------------
   LAYOUT
--------------------------------------------------- */
.rr-wrap{
  max-width: 1100px;
  margin: 12px auto 36px;
  padding: 0 16px;
}

.rr-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media(min-width:900px){
  .rr-grid{grid-template-columns: 1.1fr .9fr}
}

.rr-card{
  background:var(--rr-card);
  border-radius:var(--rr-radius);
  box-shadow:var(--rr-shadow);
  padding: 18px;
  border: 1px solid rgba(15,23,42,.06);
}

.rr-row{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
}

.rr-controls{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

/* ---------------------------------------------------
   BUTTONS / CHIPS
--------------------------------------------------- */
.rr-btn{
  border:1px solid rgba(34,197,94,.25);
  background:linear-gradient(135deg, rgba(34,197,94,.14), rgba(59,130,246,.10));
  padding:10px 14px;
  border-radius:999px;
  font-weight:900;
  font-size:12px;
  cursor:pointer;
  box-shadow:0 10px 20px rgba(15,23,42,.08);
  transition:transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.rr-btn:hover{ transform: translateY(-1px); }
.rr-btn:active{ transform: translateY(0px) scale(.99); }

.rr-btn.rr-danger{
  border:1px solid rgba(239,68,68,.25);
  background:linear-gradient(135deg, rgba(239,68,68,.14), rgba(251,191,36,.10));
}

.rr-btn:disabled{
  opacity:.5;
  cursor:not-allowed;
  box-shadow:none;
  transform:none;
}

.rr-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:999px;
  background:rgba(15,23,42,.05);
  border:1px solid rgba(15,23,42,.08);
  font-weight:900;
  font-size:12px;
  color:#334155;
}

/* ---------------------------------------------------
   TEXT
--------------------------------------------------- */
.rr-sub{
  color:var(--rr-muted);
  font-size:13px;
  line-height:1.6;
  margin:8px 0 0;
}

.rr-label{
  font-size:12px;
  color:var(--rr-muted);
  font-weight:800;
}

.rr-big{
  font-weight:1000;
  font-size:18px;
  letter-spacing:.2px;
}

/* ---------------------------------------------------
   SIM LAYOUT
--------------------------------------------------- */
.rr-sim{
  margin-top:14px;
  display:grid;
  grid-template-columns: 1fr;
  gap:14px;
}
@media(min-width:900px){
  .rr-sim{grid-template-columns: 1fr 1fr}
}

.rr-panel{
  border-radius:16px;
  padding:14px;
  border:1px solid rgba(15,23,42,.08);
  background: rgba(15,23,42,.02);
}

.rr-panel h3{
  margin:0 0 8px;
  font-size:14px;
}

.rr-meter{
  height:12px;
  border-radius:999px;
  background:rgba(15,23,42,.08);
  overflow:hidden;
  border:1px solid rgba(15,23,42,.08);
}
.rr-meter > div{
  height:100%;
  width:0%;
  border-radius:999px;
  background: linear-gradient(90deg, rgba(34,197,94,.9), rgba(251,191,36,.9), rgba(239,68,68,.9));
  transition:width .25s ease;
}

.rr-stage{
  border-radius:16px;
  background: #fff;
  border: 1px solid rgba(15,23,42,.08);
  padding:14px;
  min-height: 260px;
  position:relative;
  overflow:hidden;
}

/* ---------------------------------------------------
   ACCORDION
--------------------------------------------------- */
.rr-accordion{
  margin-top: 14px;
  border-radius:16px;
  border:1px solid rgba(15,23,42,.08);
  overflow:hidden;
  background:#fff;
}

.rr-acc-btn{
  width:100%;
  border:0;
  cursor:pointer;
  padding:12px 14px;
  background:linear-gradient(135deg, rgba(59,130,246,.10), rgba(34,197,94,.08));
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-weight:1000;
}

.rr-acc-body{
  display:none;
  padding:12px 14px;
  color:var(--rr-muted);
  line-height:1.65;
  font-size:13px;
}
.rr-acc-body.active{ display:block; }

.rr-note{
  font-size:12px;
  color:var(--rr-muted);
  margin-top:10px;
  text-align:center;
}

/* ---------------------------------------------------
   SIMPLE VISUALS (optional reusable)
--------------------------------------------------- */

/* food/square stage (single clean version) */
.rr-food{
  width: 220px;
  height: 220px;
  border-radius: 18px;
  margin: 10px auto 0;
  background: linear-gradient(135deg, rgba(34,197,94,.25), rgba(251,191,36,.18));
  border:1px solid rgba(15,23,42,.08);
  position:relative;
  overflow:hidden;
  display:grid;
  place-items:center;
  font-size: 52px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.15),
              0 20px 40px rgba(0,0,0,.12);
  transition: filter .25s ease, opacity .25s ease;
}

.rr-odor{
  position:absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.55);
  color: #fff;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 999px;
  font-weight:1000;
}

/* smoke puffs */
.rr-smoke{
  position:absolute;
  width:10px;height:10px;
  border-radius:999px;
  background:rgba(100,116,139,.35);
  filter: blur(.2px);
  animation: rr-float 2.4s linear infinite;
}
@keyframes rr-float{
  from{ transform: translateY(0) translateX(0) scale(1); opacity:.85; }
  to{ transform: translateY(-90px) translateX(16px) scale(1.8); opacity:0; }
}

/* flame */
.rr-flame{
  position:absolute;
  bottom:16px;
  left:50%;
  transform:translateX(-50%);
  font-size:54px;
  display:none;
}
.rr-flame.active{ display:block; }

/* statue/rust demo */
.rr-statue{
  width: 160px;
  height: 190px;
  border-radius: 22px;
  margin: 10px auto 0;
  background: linear-gradient(135deg, rgba(148,163,184,.55), rgba(203,213,225,.5));
  border:1px solid rgba(15,23,42,.10);
  position:relative;
  overflow:hidden;
  display:grid;
  place-items:center;
  font-size: 52px;
}

.rr-rust{
  position:absolute;
  inset:0;
  background: radial-gradient(circle at 30% 40%, rgba(180,83,9,.55), transparent 40%),
              radial-gradient(circle at 70% 60%, rgba(124,45,18,.45), transparent 45%);
  opacity:0;
  transition: opacity .25s ease;
}

/* cloud + rain */
.rr-cloud{
  position:absolute;
  top:14px;
  left:50%;
  transform:translateX(-50%);
  font-size:48px;
  opacity:.9;
}

.rr-raindrop{
  position:absolute;
  top:60px;
  width:8px;height:14px;
  border-radius: 999px;
  background: rgba(59,130,246,.45);
  animation: rr-rain 1s linear forwards;
}
@keyframes rr-rain{
  from{ transform: translateY(0); opacity:.9; }
  to{ transform: translateY(220px); opacity:0; }
}
