.quote-layout{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(360px,1fr));
  gap:24px;
  margin-bottom:28px;
}

.card{
  background:var(--dark-gray);
  border:1px solid var(--light-gray);
  border-radius:18px;
  padding:24px;
  min-height:100%;
}

.card h3{
  font-family:'Fredoka',sans-serif;
  color:var(--gold);
  font-size:1.3em;
  margin-bottom:16px;
}

.quote-display{
  border:1px dashed var(--light-gray);
  border-radius:18px;
  padding:24px;
  min-height:220px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:16px;
  background:#141414;
}

.quote-text{
  font-size:1.4rem;
  font-family:'Fredoka',sans-serif;
  line-height:1.5;
}

.quote-author{
  font-size:1rem;
  text-align:right;
  opacity:.8;
}

.controls-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
  gap:14px;
  margin:16px 0;
}

.button-row{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}

.tag-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
}

.tag{
  padding:6px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  font-size:.85rem;
  opacity:.85;
}

.history{
  margin-top:32px;
  border:1px solid var(--light-gray);
  border-radius:18px;
  padding:24px;
  background:#111;
}

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

.history-list{
  margin-top:18px;
  border:1px dashed var(--light-gray);
  border-radius:14px;
  padding:18px;
  max-height:360px;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:12px;
}

.history-entry{
  background:#151515;
  border:1px solid rgba(251,139,36,.45);
  border-radius:14px;
  padding:16px;
}

.history-entry p{
  margin:0 0 8px;
  line-height:1.4;
}

.history-entry span{
  font-size:.85rem;
  opacity:.7;
}

.favorites-list{
  margin-top:18px;
  border:1px dashed var(--light-gray);
  border-radius:14px;
  padding:18px;
  max-height:220px;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.favorite-item{
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  padding:10px 12px;
  font-size:.95rem;
}

.favorite-item button{
  margin-top:8px;
}

@media(max-width:640px){
  .quote-text{font-size:1.2rem}
}
