.kd-shell{ max-width: min(960px, 96vw); margin: 0 auto 40px; padding: 0 12px; display: grid; gap: 14px; }
.kd-pill{
  margin-inline-start: auto;
  padding: 4px 14px;
  background: rgba(241,213,151,.15);
  border: 1px solid rgba(241,213,151,.4);
  border-radius: 999px; font-size: 12px; color: #f1d597;
}

.kd-hero{ text-align: center; padding: 24px 12px 8px; }
.kd-icon{ font-size: 40px; }
.kd-hero h1{
  font-family: 'Frank Ruhl Libre', serif; font-size: clamp(28px, 5vw, 44px); margin: 6px 0;
  background: linear-gradient(135deg, #f1d597, #d4b07a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.kd-hero p{ opacity: .8; max-width: 56ch; margin: 0 auto; line-height: 1.6; }

.kd-today{ padding: 20px; }
.kd-today-label{
  display: inline-block;
  padding: 4px 14px;
  background: linear-gradient(135deg, #d4b07a, #f1d597);
  color: #0B1F3A;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  margin-bottom: 14px;
}

.kd-grid-card{ padding: 14px; }
.kd-grid-card .mini-title{ display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 12px; }

.kd-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.kd-card{
  position: relative;
  padding: 18px 14px;
  border-radius: 16px;
  border: 1px solid rgba(241,213,151,.3);
  cursor: pointer;
  text-align: center;
  color: #fff;
  transition: transform .2s, box-shadow .25s;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.kd-card:hover{
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 18px 40px rgba(0,0,0,.4);
}
.kd-card-emoji{ font-size: 38px; margin-bottom: 6px; }
.kd-card-name{
  font-family: 'Frank Ruhl Libre', serif;
  font-weight: 800;
  font-size: 17px;
  text-shadow: 0 2px 8px rgba(0,0,0,.5);
}
.kd-card-time{
  margin-top: 6px;
  font-size: 11px;
  opacity: .8;
  background: rgba(0,0,0,.3);
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  align-self: center;
}
.kd-card-read{
  position: absolute;
  top: 8px; inset-inline-end: 8px;
  background: rgba(74,222,128,.7);
  color: #fff;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px;
  font-weight: 700;
}

/* Modal */
.kd-modal{
  position: fixed; inset: 0;
  z-index: 99999;
  display: grid; place-items: center;
}
.kd-modal[hidden]{ display: none; }
.kd-modal-back{
  position: absolute; inset: 0;
  background: rgba(11,31,58,.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.kd-story{
  position: relative;
  width: min(720px, 96vw);
  max-height: 92vh;
  overflow-y: auto;
  padding: 32px 28px;
  background: linear-gradient(160deg, #14315b, #0B1F3A);
  border: 1px solid rgba(241,213,151,.4);
  border-radius: 22px;
  color: #f6e6c2;
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
}
.kd-x{
  position: absolute; top: 12px; inset-inline-end: 12px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(212,176,122,.4);
  color: #d4b07a;
  cursor: pointer; font-size: 20px;
}
.kd-story-emoji{ font-size: 56px; text-align: center; margin-bottom: 6px; }
.kd-story-title{
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 32px;
  text-align: center;
  margin: 0 0 18px;
  background: linear-gradient(135deg, #f1d597, #d4b07a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.kd-story-controls{
  display: flex; gap: 8px; justify-content: center;
  margin-bottom: 18px;
}
.kd-story-btn{
  padding: 8px 18px;
  background: rgba(212,176,122,.15);
  border: 1px solid rgba(212,176,122,.4);
  color: #d4b07a;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
}
.kd-story-btn:hover{ background: rgba(212,176,122,.25); }
.kd-story-btn.is-on{
  background: linear-gradient(135deg, #d4b07a, #f1d597);
  color: #0B1F3A;
  border-color: transparent;
}

.kd-story-text p{
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 19px;
  line-height: 2;
  margin: 0 0 14px;
}
.kd-lesson{
  margin-top: 18px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(241,213,151,.15), rgba(212,176,122,.08));
  border: 1px solid rgba(241,213,151,.5);
  border-radius: 14px;
  text-align: center;
}
.kd-lesson-label{
  display: inline-block;
  padding: 2px 12px;
  background: rgba(212,176,122,.25);
  color: #d4b07a;
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
  margin-bottom: 8px;
}
.kd-lesson-text{
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 17px;
  font-weight: 600;
  color: #f1d597;
  line-height: 1.7;
}

.kd-story-actions{
  margin-top: 16px;
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
}
.kd-action{
  padding: 10px 18px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(212,176,122,.4);
  color: #d4b07a;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.kd-action.is-primary{
  background: linear-gradient(135deg, #d4b07a, #f1d597);
  color: #0B1F3A;
  border-color: transparent;
}
