/* Home preview. Scoped to the dashboard drawn when home=preview is set. */

.dash {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  color: #141b4d;
}

.dash-hello {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.dash-hello h1 {
  margin: 0;
  font-family: Fredoka, Nunito, sans-serif;
  font-size: clamp(1.55rem, 2vw, 1.9rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #141b4d;
}
.dash-hello p {
  margin: 0.1rem 0 0;
  color: #5c6284;
  font-size: 0.98rem;
}
.dash-preview {
  flex: 0 0 auto;
  margin-top: 0.45rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: #efe8ff;
  color: #5b3f91;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dash-top {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(16rem, 2fr);
  gap: 1.1rem;
  align-items: stretch;
}

.dash-banner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(7.5rem, 0.85fr);
  min-height: 0;
  height: 100%;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(105deg, #f4edff 0%, #f8f4ff 48%, #efe6ff 100%);
  box-shadow: 0 16px 40px rgba(20, 27, 77, 0.08);
  text-decoration: none;
  color: inherit;
}
.dash-banner:hover { box-shadow: 0 18px 44px rgba(20, 27, 77, 0.12); }
.dash-banner:focus-visible { outline: 3px solid #c4b5e8; outline-offset: 3px; }
.dash-banner__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.18rem;
  padding: 0.8rem 0.4rem 0.8rem 1.15rem;
}
.dash-banner__copy em {
  font-style: normal;
  font-weight: 800;
  color: #6d4eaa;
}
.dash-banner__copy strong {
  max-width: 16ch;
  font-family: Fredoka, Nunito, sans-serif;
  font-size: clamp(1.25rem, 1.6vw, 1.5rem);
  line-height: 1.15;
}
.dash-banner__copy > span {
  color: #5c6284;
}
.dash-banner__art {
  position: relative;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.dash-banner__art img {
  position: absolute;
  top: 0.7rem;
  right: 0.85rem;
  bottom: 0.7rem;
  left: 0.35rem;
  width: auto;
  height: auto;
  max-width: calc(100% - 1.2rem);
  max-height: calc(100% - 1.4rem);
  margin: auto;
  object-fit: contain;
  object-position: center;
  border-radius: 18px;
}

.dash-go {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  margin-top: 0.35rem;
  padding: 0.55rem 1.05rem;
  border-radius: 999px;
  background: #f6c445;
  color: #141b4d;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(20, 27, 77, 0.12);
}
.dash-go svg { width: 18px; height: 18px; }
.dash-go--small { margin-top: 0.85rem; }

.dash-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}
.dash-panel--cast {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
}

.dash-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  margin: 0 0 0.4rem;
}
.dash-head h2, .dash-panel > h2 {
  margin: 0;
  font-family: Fredoka, Nunito, sans-serif;
  font-size: 1.2rem;
  font-weight: 650;
}
.dash-head a {
  color: #6d4eaa;
  font-weight: 800;
  font-size: 0.92rem;
  text-decoration: none;
}
.dash-head a:hover, .dash-head a:focus-visible { text-decoration: underline; }
.dash-panel > h2 { margin-bottom: 0.85rem; }

.dash-books, .dash-plays, .dash-explore {
  display: grid;
  gap: 0.9rem;
}
.dash-books { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dash-plays { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dash-explore { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.dash-book, .dash-play, .dash-panel, .dash-vacant, .dash-explore__card {
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 10px 28px rgba(20, 27, 77, 0.06);
}
.dash-book, .dash-play, .dash-explore__card {
  display: flex;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.dash-book, .dash-play { flex-direction: column; overflow: hidden; }
.dash-book:hover, .dash-play:hover, .dash-explore__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(20, 27, 77, 0.1);
}
.dash-book:focus-visible, .dash-play:focus-visible, .dash-explore__card:focus-visible,
.dash-cast__person:focus-visible, .dash-list a:focus-visible {
  outline: 3px solid #c4b5e8;
  outline-offset: 2px;
}

.dash-book__art, .dash-play__art {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(246, 196, 69, 0.45), transparent 36%),
    linear-gradient(160deg, #efe6ff, #d9cff5);
}
.dash-play__art { aspect-ratio: 16 / 10; }
.dash-book__art img, .dash-play__art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.dash-book__body, .dash-play__body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0.75rem 0.65rem;
}
.dash-book em, .dash-play em {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6d4eaa;
}
.dash-book strong, .dash-play strong, .dash-explore__card strong {
  font-family: Fredoka, Nunito, sans-serif;
  font-size: 1rem;
  line-height: 1.25;
}
.dash-book__meta, .dash-play__body > span, .dash-explore__card span span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  color: #5c6284;
  font-size: 0.86rem;
  font-weight: 700;
}
.dash-book__meta svg, .dash-play > svg, .dash-explore__card > svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: #6d4eaa;
}
.dash-play {
  position: relative;
}
.dash-play > svg {
  position: absolute;
  right: 0.75rem;
  bottom: 0.85rem;
}

.dash-vacant {
  padding: 1.3rem 1.35rem 1.4rem;
}
.dash-vacant strong {
  font-family: Fredoka, Nunito, sans-serif;
  font-size: 1.2rem;
}
.dash-vacant p { margin: 0.3rem 0 0; color: #5c6284; }
.dash-vacant .dash-go { text-decoration: none; }

.dash-panel { padding: 0.7rem 0.85rem 0.65rem; }
.dash-note { margin: 0.75rem 0 0; color: #5c6284; font-size: 0.92rem; }

.dash-cast {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem 0.3rem;
}
.dash-cast__person {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  color: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}
.dash-avatar {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(160deg, #f4edff, #e4d8fb);
  color: #5b3f91;
  font-family: Fredoka, Nunito, sans-serif;
  font-size: 1.35rem;
}
.dash-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dash-avatar.home-portrait {
  width: 3.25rem;
  height: 3.25rem;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
}
.dash-avatar.home-portrait img { object-fit: cover; object-position: center; }
.dash-avatar--add {
  background: #f6f3fb;
  border: 2px dashed #c4b5e8;
  color: #6d4eaa;
  font-size: 1.6rem;
}
.dash-cast__progress {
  margin: 0.35rem 0 0;
  padding-top: 0;
  color: #5c6284;
  font-size: 0.86rem;
  font-weight: 700;
}
.dash-cast__progress b {
  color: #141b4d;
  font-family: Fredoka, Nunito, sans-serif;
  font-size: 1.05rem;
}

.dash-stats, .dash-list { margin: 0; padding: 0; list-style: none; }
.dash-stats li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem 0;
}
.dash-stats li + li { border-top: 1px solid rgba(20, 27, 77, 0.06); }
.dash-stats__icon {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 14px;
  background: #f4edff;
  color: #6d4eaa;
}
.dash-stats__icon svg { width: 1.2rem; height: 1.2rem; }
.dash-stats strong, .dash-list a { display: block; font-size: 0.98rem; }
.dash-stats small, .dash-list span { color: #5c6284; font-size: 0.8rem; font-weight: 700; }
.dash-stats b {
  font-family: Fredoka, Nunito, sans-serif;
  font-size: 1.35rem;
}
.dash-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 0;
}
.dash-list li + li { border-top: 1px solid rgba(20, 27, 77, 0.06); }
.dash-list a { color: inherit; font-weight: 800; text-decoration: none; }

.dash-explore__card {
  align-items: center;
  gap: 0.7rem;
  min-height: 5.4rem;
  padding: 0.85rem 0.9rem;
}
.dash-explore__card--lilac { background: linear-gradient(180deg, #fff, #f6f0ff); }
.dash-explore__card--gold { background: linear-gradient(180deg, #fff, #fff6dd); }
.dash-explore__card--sky { background: linear-gradient(180deg, #fff, #eef1ff); }
.dash-explore__card--blush { background: linear-gradient(180deg, #fff, #fdeff6); }
.dash-explore__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.85);
  color: #5b3f91;
}
.dash-explore__icon svg { width: 1.25rem; height: 1.25rem; }
.dash-explore__card strong { display: block; }
.dash-explore__card span span { display: block; margin-top: 0.12rem; }

@media (min-width: 1181px) {
  .dash-book__art { aspect-ratio: 1 / 1; }
}
@media (max-width: 1180px) {
  .dash-books, .dash-explore { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1040px) {
  .dash-top { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .dash-banner { grid-template-columns: 1fr; }
  .dash-banner__art { order: -1; min-height: 11.5rem; }
  .dash-banner__copy { padding: 1rem 1.1rem 1.15rem; }
  .dash-books { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-plays, .dash-explore { grid-template-columns: 1fr; }
  .dash-hello h1 { font-size: 1.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  .dash-book:hover, .dash-play:hover, .dash-explore__card:hover { transform: none; }
}
