/* User Dashboard — i-Poster */
:root {
  --dash-bg: #eef2f8;
  --dash-panel: #fff;
  --dash-text: #152033;
  --dash-muted: #6b7a90;
  --dash-line: #e3e8f0;
  --dash-accent: #2f5bff;
  --dash-soft: #eaf0ff;
  --dash-font: "IBM Plex Sans Thai", "Sarabun", sans-serif;
  --dash-display: "Sora", "IBM Plex Sans Thai", sans-serif;
  --dash-side: 280px;
}

* { box-sizing: border-box; }
body.dash {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--dash-side) 1fr;
  color: var(--dash-text);
  font-family: var(--dash-font);
  background:
    radial-gradient(700px 320px at 70% 0%, rgba(47, 91, 255, 0.08), transparent 55%),
    linear-gradient(180deg, #f4f7fc, var(--dash-bg));
}

/* —— Sidebar —— */
.dash-side {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  padding: 20px 16px 16px;
  background: #f4effe;
  border-right: 1px solid var(--dash-line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dash-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  padding: 4px 6px 14px;
}
.dash-brand strong {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--dash-display);
  font-size: 1.05rem;
}
.dash-brand__spark { color: #7c5cff; font-style: normal; font-size: 0.85rem; }
.dash-brand em {
  display: block;
  font-style: normal;
  font-size: 0.7rem;
  color: var(--dash-muted);
}

.dash-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 2px 10px;
  padding: 10px;
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  color: inherit;
}
.dash-user__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #7c5cff, #2f5bff);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.dash-user__meta { min-width: 0; }
.dash-user__meta strong {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
}
.dash-user__meta small {
  display: block;
  margin-top: 2px;
  color: var(--dash-muted);
  font-size: 0.72rem;
}
.dash-user__pro {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  background: #f4d48a;
  color: #7a4d00;
  font: 700 9px/1.4 var(--dash-font);
  font-style: normal;
}

.dash-nav {
  display: grid;
  gap: 2px;
  padding: 6px;
  border-radius: 16px;
  background: #fff;
}
.dash-nav__label {
  margin: 12px 8px 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.dash-nav a,
.dash-nav__soon {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 14px;
  border-radius: 12px;
  color: #475569;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  position: relative;
}
.dash-nav__soon {
  color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.72;
}
.dash-nav__soon em {
  margin-left: auto;
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 700;
  color: #94a3b8;
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: 999px;
}
.dash-nav a em {
  margin-left: auto;
  font-style: normal;
  font-size: 0.75rem;
  color: var(--dash-accent);
  background: #eaf0ff;
  padding: 2px 7px;
  border-radius: 999px;
}
.dash-nav a:hover { background: #f8fafc; color: var(--dash-text); }
.dash-nav a.is-active {
  background: #eef4ff;
  color: var(--dash-accent);
}
.dash-nav a.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--dash-accent);
}
.dash-ico {
  width: 1.35rem;
  height: 1.35rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #64748b;
}
.dash-ico svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dash-nav a.is-active .dash-ico { color: var(--dash-accent); }
.dash-ico--heart { color: #e11d48; }
.dash-ico--heart svg { fill: currentColor; stroke: none; }

.dash-fold {
  margin-top: 6px;
  padding: 6px;
  border-top: 0;
  border-radius: 16px;
  background: #fff;
}
.dash-fold > summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dash-fold > summary::-webkit-details-marker { display: none; }
.dash-fold > summary::after { content: "▴"; font-size: 0.8rem; }
.dash-fold:not([open]) > summary::after { content: "▾"; }
.dash-fold .dash-nav--sub { border-top: 0; padding-top: 0; margin-top: 0; background: transparent; padding: 0; }

.lp-side-cats {
  margin: 8px 0 4px;
  padding: 8px 6px 6px;
  border-radius: 16px;
  background: #fff;
}
.lp-side-cats > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 4px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.lp-side-cats > summary::-webkit-details-marker { display: none; }
.lp-side-cats > summary::after { content: "▴"; }
.lp-side-cats:not([open]) > summary::after { content: "▾"; }
.lp-side-cats__grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lp-side-cats__grid a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px 8px 4px 4px;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-decoration: none;
  color: #334155;
  box-shadow: none;
  position: relative;
}
.lp-side-cats__grid a:hover { background: #f8fafc; }
.lp-side-cats__grid a.is-active {
  background: #eef4ff;
  color: #2f5bff;
}
.lp-side-cats__grid a.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #2f5bff;
}
.lp-side-cats__grid img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  flex: 0 0 32px;
  border-radius: 8px;
}
.lp-side-cats__grid .dash-ico {
  width: 18px;
  height: 18px;
  color: #64748b;
}
.lp-side-cats__grid .dash-ico svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lp-side-cats__grid a.is-active .dash-ico { color: #2f5bff; }
.lp-side-cats__grid b {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  min-width: 0;
}
.lp-side-cats__grid i {
  color: #94a3b8;
  font-style: normal;
  font-size: 16px;
}

.dash-pro {
  margin-top: auto;
  padding: 12px 12px 12px 14px;
  border-radius: 16px;
  background:
    radial-gradient(120px 60px at 80% 0%, rgba(255,255,255,.22), transparent 60%),
    linear-gradient(135deg, #6d4aff, #5b21ea 55%, #4c1d95);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  text-decoration: none;
}
.dash-pro:hover { color: #fff; }
.dash-pro__crown {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #f4d48a;
  flex-shrink: 0;
}
.dash-pro__crown .dash-ico { color: inherit; }
.dash-pro__crown svg { fill: currentColor; stroke: none; }
.dash-pro strong { display: block; font-size: 0.86rem; color: #fff; }
.dash-pro p {
  margin: 3px 0 0;
  color: rgba(255,255,255,.82);
  font-size: 0.72rem;
  line-height: 1.35;
}
.dash-pro__go {
  width: 34px;
  height: 34px;
  margin-left: auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  font: 700 16px/1 inherit;
  color: #6d4aff;
  flex-shrink: 0;
}

.dash-side__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 6px 0;
  font-size: 0.72rem;
  color: var(--dash-muted);
}
.dash-side__foot a {
  color: var(--dash-accent);
  text-decoration: none;
  font-weight: 600;
}
.dash-nav--sub {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--dash-line);
}

/* —— Main —— */
.dash-main {
  min-width: 0;
  padding: 22px 28px 36px;
}
/* Library / account pages: topbar full-bleed ในคอลัมน์เนื้อหา */
body.dash .dash-main.lib-content {
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.dash-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.dash-top h1 {
  margin: 0;
  font-family: var(--dash-display);
  font-size: 1.55rem;
}
.dash-top__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 50;
}

/* Shared user menu (studio_user_menu.php) */
.lib-user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  position: relative;
}
.lib-user__bell {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--dash-line);
}
.lib-user__meta strong { display: block; font-size: 0.88rem; }
.lib-user__meta span {
  display: block;
  color: var(--dash-muted);
  font-size: 0.74rem;
  font-weight: 600;
}
.lib-user__trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--dash-line);
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
}
.lib-user__trigger:hover {
  border-color: #c7d2fe;
  box-shadow: 0 4px 12px rgba(47, 91, 255, 0.08);
}
.lib-user__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #3b6bff, #2f5bff);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}
.lib-user__avatar--lg {
  width: 48px;
  height: 48px;
  font-size: 0.95rem;
}
.lib-user__who {
  display: grid;
  min-width: 0;
  line-height: 1.2;
}
.lib-user__who strong {
  font-size: 0.86rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.lib-user__who em {
  font-style: normal;
  font-size: 0.72rem;
  color: var(--dash-muted);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.lib-user__caret {
  color: var(--dash-muted);
  font-size: 0.7rem;
  margin-right: 4px;
}
.lib-user__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(280px, 86vw);
  background: #fff;
  border: 1px solid var(--dash-line);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
  padding: 10px;
  z-index: 60;
}
.lib-user__panel[hidden] { display: none !important; }
.lib-user__card {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 8px 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid #eef2f7;
}
.lib-user__card strong { display: block; font-size: 0.9rem; }
.lib-user__card em,
.lib-user__card span {
  display: block;
  font-style: normal;
  font-size: 0.74rem;
  color: var(--dash-muted);
  word-break: break-all;
}
.lib-user__item {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  font-size: 0.88rem;
  font-weight: 600;
}
.lib-user__item:hover { background: #f1f5ff; color: var(--dash-accent); }
.lib-user__item--danger { color: #b91c1c; }
.lib-user__item--danger:hover { background: #fef2f2; color: #991b1b; }
.lib-user__sep {
  border: 0;
  border-top: 1px solid #eef2f7;
  margin: 6px 0;
}
.lib-user__login,
.lib-user__register {
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
}
.lib-user__login { color: var(--dash-accent); }
.lib-user__register {
  background: var(--dash-accent);
  color: #fff;
}
.dash-bell {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--dash-line);
  background: #fff;
  cursor: not-allowed;
  font-size: 1rem;
}
.dash-bell span {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.dash-top .dash-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dash-top .dash-user strong { display: block; font-size: 0.9rem; }
.dash-top .dash-user em {
  display: block;
  font-style: normal;
  font-size: 0.72rem;
  color: var(--dash-muted);
}
.dash-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #3b6bff, #1e40af);
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  flex-shrink: 0;
}
.dash-avatar--lg {
  width: 52px;
  height: 52px;
  font-size: 1rem;
}

.dash-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  cursor: pointer;
}
.dash-btn--primary {
  background: var(--dash-accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(47, 91, 255, 0.25);
}
.dash-btn--outline {
  background: #fff;
  color: var(--dash-accent);
  border-color: #c9d6ff;
}
.dash-btn--ghost {
  background: #fff;
  color: var(--dash-text);
  border-color: var(--dash-line);
}
.dash-btn--block { width: 100%; }
.dash-btn:disabled { cursor: not-allowed; opacity: 0.7; }

/* Welcome */
.dash-welcome {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
  align-items: center;
  padding: 24px 28px;
  border-radius: 20px;
  background: linear-gradient(120deg, #e8efff 0%, #dfe9ff 45%, #eef4ff 100%);
  border: 1px solid #d5e0ff;
  margin-bottom: 18px;
  overflow: hidden;
}
.dash-welcome h2 {
  margin: 0 0 6px;
  font-family: var(--dash-display);
  font-size: 1.45rem;
}
.dash-welcome p {
  margin: 0 0 16px;
  color: #4b5c78;
}
.dash-welcome__cta { display: flex; flex-wrap: wrap; gap: 10px; }
.dash-welcome__art {
  position: relative;
  min-height: 140px;
}
.dash-welcome__card {
  position: absolute;
  margin: 0;
  width: 92px;
  height: 118px;
  border-radius: 12px;
  overflow: hidden;
  border: 3px solid #fff;
  background: #c8d4f0;
  box-shadow: 0 12px 24px rgba(21, 32, 51, 0.16);
}
.dash-welcome__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dash-welcome__card--0 { right: 42%; top: 8%; transform: rotate(-8deg); }
.dash-welcome__card--1 { right: 18%; top: 0; transform: rotate(4deg); z-index: 2; }
.dash-welcome__card--2 { right: 0; top: 18%; transform: rotate(-3deg); }

/* Stats */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.dash-stats article,
.dash-stats__link {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  border-radius: 16px;
  background: var(--dash-panel);
  border: 1px solid var(--dash-line);
  box-shadow: 0 8px 20px rgba(21, 32, 51, 0.04);
}
.dash-stats__link {
  color: inherit;
  text-decoration: none;
}
.dash-stats__link:hover {
  border-color: #c7d2fe;
}
.dash-stats__ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 1rem;
}
.dash-stats__ico--violet { background: #efe7ff; }
.dash-stats__ico--blue { background: var(--dash-soft); }
.dash-stats__ico--green { background: #e7f8ee; }
.dash-stats__ico--orange { background: #fff1e6; }
.dash-stats strong {
  display: block;
  font-family: var(--dash-display);
  font-size: 1.35rem;
  line-height: 1.1;
}
.dash-stats span {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
}
.dash-stats em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 0.75rem;
  color: var(--dash-muted);
}

/* Grid */
.dash-grid {
  display: grid;
  grid-template-columns: 1.55fr 0.9fr;
  gap: 16px;
  align-items: start;
}
.dash-col { display: grid; gap: 14px; }
.dash-rail { display: grid; gap: 14px; }

.dash-panel {
  background: var(--dash-panel);
  border: 1px solid var(--dash-line);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 20px rgba(21, 32, 51, 0.04);
}
.dash-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.dash-panel__head h3 {
  margin: 0;
  font-size: 1rem;
}
.dash-panel__head a {
  color: var(--dash-accent);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.dash-empty {
  padding: 28px 12px;
  text-align: center;
  color: var(--dash-muted);
}
.dash-empty .dash-btn { margin-top: 10px; }

.dash-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
/* โปสเตอร์ของฉัน / ร่างงาน — แถวละ 5 · ห้ามยืดความสูงการ์ดให้เท่ากัน */
body.dash .dash-cards.dash-cards--mine {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
  align-items: start;
}
.dash-card {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--dash-line);
  text-decoration: none;
  color: inherit;
  background: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  min-width: 0;
  height: auto;
  align-self: start;
}
.dash-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(21, 32, 51, 0.08);
}
.dash-card__thumb {
  margin: 0;
  position: relative;
  aspect-ratio: var(--poster-w, 1054) / var(--poster-h, 1492);
  width: 100%;
  background: #dbe3f5;
  overflow: hidden;
  flex-shrink: 0;
  pointer-events: none;
}
/* iframe เต็มกรอบ thumb · preview.php?embed=1 เป็นคน scale โปสเตอร์ให้พอดี */
.dash-card__showcase {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  border: 0;
  pointer-events: none;
  background: #111;
  transform: none !important;
}
.dash-card__body {
  padding: 10px 12px 12px;
  display: grid;
  gap: 4px;
  flex: 0 0 auto;
}
.dash-card__body strong {
  font-size: 0.88rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dash-card__body em {
  font-style: normal;
  font-size: 0.74rem;
  color: var(--dash-muted);
}
.dash-tag {
  display: inline-flex;
  width: fit-content;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
}
.dash-tag--draft { background: #fff4e5; color: #b45309; }
.dash-tag--ready { background: #e7f8ee; color: #15803d; }
.dash-tag--archived { background: #f1f5f9; color: #64748b; }

.dash-tip {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #eef5ff;
  border: 1px solid #d7e6ff;
}
.dash-tip__ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #fff;
  flex-shrink: 0;
}
.dash-tip strong { display: block; margin-bottom: 4px; }
.dash-tip p {
  margin: 0;
  color: var(--dash-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.dash-storage {
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--dash-line);
}
.dash-storage__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.dash-storage__head strong { display: block; font-size: 0.9rem; }
.dash-storage__head p {
  margin: 2px 0 0;
  color: var(--dash-muted);
  font-size: 0.78rem;
}
.dash-storage__head em {
  font-style: normal;
  font-weight: 700;
  color: var(--dash-accent);
}
.dash-storage__bar {
  height: 8px;
  border-radius: 99px;
  background: #e8edf5;
  overflow: hidden;
  margin-bottom: 12px;
}
.dash-storage__bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #3b6bff, #2f5bff);
  border-radius: 99px;
}
.dash-storage__bar--soon {
  opacity: 0.45;
}

.dash-popular {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.dash-popular a {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 6px;
  border-radius: 10px;
}
.dash-popular a:hover { background: #f8fafc; }
.dash-popular img,
.dash-popular__media {
  width: 48px;
  height: 60px;
  border-radius: 8px;
  background: #111;
  overflow: hidden;
  position: relative;
  display: block;
  flex-shrink: 0;
}
.dash-popular img {
  object-fit: cover;
  border: 0;
  pointer-events: none;
}
.dash-popular__media iframe.dash-popular__thumb {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
  pointer-events: none;
  background: #111;
}
.dash-popular strong {
  display: block;
  font-size: 0.86rem;
  line-height: 1.3;
}
.dash-popular em {
  display: block;
  font-style: normal;
  font-size: 0.74rem;
  color: var(--dash-muted);
}
.dash-muted { color: var(--dash-muted); font-size: 0.88rem; }

.dash-account {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.dash-account strong { display: block; }
.dash-account em {
  display: block;
  font-style: normal;
  font-size: 0.8rem;
  color: var(--dash-muted);
}
.dash-account__meta {
  margin: 0 0 12px;
  display: grid;
  gap: 8px;
}
.dash-account__meta > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 0.84rem;
}
.dash-account__meta dt { color: var(--dash-muted); }
.dash-account__meta dd { margin: 0; font-weight: 600; }

@media (max-width: 1100px) {
  .dash-stats { grid-template-columns: 1fr 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.dash .dash-cards.dash-cards--mine { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.dash .dash-cards.dash-cards--mine-compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  body.dash { grid-template-columns: 1fr; }
  .dash-side {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--dash-line);
  }
  .dash-nav a,
  .dash-nav__soon {
    min-height: 44px;
  }
  .dash-welcome { grid-template-columns: 1fr; }
  .dash-welcome__art { min-height: 120px; }
  .dash-top { flex-direction: column; align-items: flex-start; }
  .lib-user__who { display: none; }
  .lib-user__caret { display: none; }
  .dash-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.dash .dash-cards.dash-cards--mine { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.dash .dash-cards.dash-cards--mine-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .dash-main { padding: 16px 14px 28px; }
  .dash-stats { grid-template-columns: 1fr; }
  .dash-cards,
  body.dash .dash-cards.dash-cards--mine,
  body.dash .dash-cards.dash-cards--mine-compact {
    grid-template-columns: 1fr;
  }
}
