:root {
  --bg: #090713;
  --bg-2: #0b0f1a;
  --bg-3: #0f1626;
  --muted: #94a3b8;
  --txt: #e5e7eb;
  --accent: #14b8a6;
  --card: #0b0f1a;
  --radius: 14px;
  --hdr: 0px;
  --vh: 1vh;
  --nav: 0px;
  --nav: 0px;
  --viewer-mobile-w: 96vw;
  /* Increased width slightly */
  --viewer-max-h: min(72vh, 760px);
  --viewer-max-h: min(72vh, 760px);
  --viewer-min-h: 320px;
  --image-max-h: min(56vh, 520px);

  --admin-bg: #f6f2ea;
  --admin-bg-2: #eef4f2;
  --admin-card: #ffffff;
  --admin-ink: #1f2937;
  --admin-muted: #6b7280;
  --admin-accent: #0f766e;
  --admin-accent-2: #eab308;
  --admin-radius: 16px;
  --admin-shadow: 0 10px 30px rgba(17, 24, 39, .12);
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  background: linear-gradient(160deg, var(--bg) 0%, var(--bg-2) 45%, var(--bg-3) 100%);
  color: var(--txt);
}

html.embed-auto,
body.embed-auto {
  height: auto;
}

.mastra-shell {
  display: flex;
  gap: 16px;
  height: calc((var(--vh) * 100) - var(--nav));
  min-height: 0
}

.embed-auto .mastra-shell {
  height: auto;
  min-height: 0
}

.mastra-sidebar {
  width: 305px;
  flex: 0 0 305px;
  background: var(--bg-2);
  color: var(--txt);
  border-radius: var(--radius);
  padding: 16px;
  position: relative
}

.mastra-brand {
  font-weight: 700;
  font-size: 1rem;
  margin: 4px 0 14px;
  color: #fff;
}

.mastra-group {
  background: var(--bg-3);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px
}

.grp {
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--txt);
  border: 0;
  padding: 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700
}

.grp .row {
  display: flex;
  align-items: center;
  gap: 10px
}

.grp .chev {
  width: 18px;
  height: 18px;
  stroke: #94a3b8;
  stroke-width: 2.5;
  fill: none;
  transition: transform .18s ease
}

.grp[aria-expanded="true"] .chev {
  transform: rotate(90deg)
}

.gcount {
  font-size: .75rem;
  color: #9fb2ca;
  opacity: .85;
  padding: 0 14px 8px 42px
}

.grp[aria-expanded="true"]+.gcount {
  display: none
}

.mastra-list {
  list-style: none;
  margin: 0;
  padding: 8px 8px 12px;
  display: none;
  max-height: 52vh;
  overflow: auto
}

.mastra-list.show {
  display: block
}

.mastra-item {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--txt);
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left
}

.mastra-item:hover {
  background: #0d1424
}

.mastra-item.active {
  background: var(--accent);
  color: #021312;
  font-weight: 700
}

.ico-cell {
  flex: 0 0 20px;
  display: grid;
  place-items: center
}

.txt {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.ico-free {
  width: 12px;
  height: 12px;
  border: 2px solid #6b7280;
  border-radius: 999px;
  display: inline-block
}

.ico-lock {
  width: 18px;
  height: 18px;
  fill: #cbd5e1;
  opacity: .95
}

.ico-lock.open {
  fill: #14b8a6
}

.mastra-viewer {
  flex: 1;
  background: var(--card);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  min-height: 320px
}

.mastra-viewer.is-fullscreen,
.mastra-viewer:fullscreen,
.mastra-viewer:-webkit-full-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  border-radius: 0;
  margin: 0;
  padding: 0 !important;
  z-index: 2147483646;
}

.embed-auto .mastra-viewer {
  overflow: visible
}

.mastra-toolbar {
  position: relative;
  z-index: 30;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #0e1525;
  color: #cbd5e1;
  border-bottom: 1px solid #0f1a2c
}

.mastra-toolbar .title {
  color: var(--txt);
  font-weight: 700;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #263146;
  background: #14b8a6;
  color: #021312;
  cursor: pointer;
  font-size: 20px;
  font-weight: 800
}

.icon-btn svg {
  width: 18px;
  height: 18px
}

.icon-btn.is-exit {
  background: #ef4444;
  border-color: #991b1b;
  color: #fff;
}

.mastra-iframe {
  border: 0;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  background: #0b0f1a
}

.mastra-viewer.is-fullscreen .mastra-iframe,
.mastra-viewer:fullscreen .mastra-iframe,
.mastra-viewer:-webkit-full-screen .mastra-iframe {
  min-height: 0;
  max-height: none;
}

.mastra-viewer.is-fullscreen .mastra-comment,
.mastra-viewer:fullscreen .mastra-comment,
.mastra-viewer:-webkit-full-screen .mastra-comment,
.mastra-viewer.is-fullscreen .image-comment,
.mastra-viewer:fullscreen .image-comment,
.mastra-viewer:-webkit-full-screen .image-comment,
.mastra-viewer.is-fullscreen #imageCommentBox,
.mastra-viewer:fullscreen #imageCommentBox,
.mastra-viewer:-webkit-full-screen #imageCommentBox,
.mastra-viewer.is-fullscreen .video-comment,
.mastra-viewer:fullscreen .video-comment,
.mastra-viewer:-webkit-full-screen .video-comment,
.mastra-viewer.is-fullscreen #videoCommentBox,
.mastra-viewer:fullscreen #videoCommentBox,
.mastra-viewer:-webkit-full-screen #videoCommentBox,
.mastra-viewer.is-fullscreen .text-comment,
.mastra-viewer:fullscreen .text-comment,
.mastra-viewer:-webkit-full-screen .text-comment,
.mastra-viewer.is-fullscreen #textCommentBox,
.mastra-viewer:fullscreen #textCommentBox,
.mastra-viewer:-webkit-full-screen #textCommentBox {
  display: none !important;
}

.embed-auto .mastra-iframe {
  height: var(--viewer-max-h);
  max-height: var(--viewer-max-h);
  min-height: var(--viewer-min-h);
}

.mastra-overlay {
  position: absolute;
  inset: 46px 0 0 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 25;
  background: rgba(11, 15, 26, .94);
  padding: 24px;
  overflow: auto
}

.embed-auto .mastra-overlay {
  position: relative;
  inset: auto;
  overflow: visible
}

.mastra-overlay.is-image {
  align-items: center;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 16px;
  padding-bottom: 28px;
}

.embed-auto .mastra-overlay.is-image {
  align-items: center
}

.mastra-overlay.is-video {
  align-items: center;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 16px;
  padding-bottom: 28px;
}

.embed-auto .mastra-overlay.is-video {
  align-items: center
}

.mastra-overlay.is-text {
  align-items: center;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 16px;
  padding-bottom: 28px;
}

.embed-auto .mastra-overlay.is-text {
  align-items: center
}

.mastra-overlay.is-image .image-card {
  max-height: none;
}

.mastra-comment {
  border-top: 1px solid #20304d;
  border-bottom: 1px solid #20304d;
  border-left: 3px solid var(--accent);
  background: linear-gradient(120deg, rgba(20, 184, 166, .18), rgba(14, 21, 37, .98));
  color: #e2e8f0;
  padding: 14px 16px;
  font-size: 1rem;
  line-height: 1.6;
  max-height: 32vh;
  overflow: auto;
}

.embed-auto .mastra-comment {
  max-height: none
}

.comment-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-weight: 700;
  margin-bottom: 8px;
}

.comment-body p {
  margin: 0 0 8px
}

.comment-body p:last-child {
  margin-bottom: 0
}

.comment-body ul {
  margin: 0 0 8px 0;
  padding-left: 18px
}

.comment-body a {
  color: #7dd3fc
}

.mastra-comment .comment-title {
  color: #7dd3fc
}

.mastra-comment .comment-body {
  color: #e2e8f0
}

.item-downloads {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(125, 211, 252, .35);
}

.item-download-list {
  display: grid;
  gap: 8px;
}

.item-download-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, .36);
  background: rgba(15, 23, 42, .45);
  color: #e2e8f0;
  text-decoration: none;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}

.item-download-link:hover {
  border-color: rgba(20, 184, 166, .9);
  background: rgba(20, 184, 166, .16);
  transform: translateY(-1px);
}

.item-download-link .ico-download {
  width: 16px;
  height: 16px;
  color: #7dd3fc;
}

.item-download-text {
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-download-size {
  margin-left: auto;
  font-size: 12px;
  color: #cbd5e1;
}

.teaser-premium {
  max-width: 900px;
  width: 100%;
  padding: 22px;
  border-radius: 12px;
  background: #0e1525;
  color: #e5e7eb;
  border: 1px solid #1d2740;
  text-align: center
}

.teaser-premium p {
  margin: 0 0 8px
}

.btn-mastra {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid #263146;
  background: #14b8a6;
  color: #021312;
  font-weight: 700;
  cursor: pointer
}

.btn-outline {
  background: transparent;
  color: #cbd5e1
}

.image-card {
  max-width: min(920px, 92vw, calc(100% - 24px));
  max-height: min(78vh, calc(100% - 24px));
  width: fit-content;
  padding: 24px;
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.65);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: center;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.image-frame {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-card img {
  max-width: 100%;
  max-height: var(--image-max-h);
  width: auto;
  height: auto;
  border-radius: 12px;
  background: #0f172a;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: opacity .22s ease, transform .22s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.embed-auto .image-card {
  max-height: none;
}

.image-card img.is-swapping {
  opacity: 0;
  transform: scale(.985);
}

.image-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.image-nav {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #0f172a;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .12);
}

.image-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
}

.image-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid #cbd5f5;
  background: #e2e8f0;
  cursor: pointer;
}

.image-dot.active {
  background: var(--accent);
  border-color: var(--accent);
}

.image-card .image-title {
  font-weight: 700;
  margin: 0;
  color: #fff;
}

.image-card .image-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.image-card .image-extra-text {
  margin-top: 12px;
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.55;
  text-align: center;
  white-space: normal;
  word-break: break-word;
}

.image-comment {
  width: 100%;
  max-width: min(920px, 92vw, calc(100% - 24px));
  margin: 22px auto 0;
  padding: 18px 20px 20px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-left: 4px solid var(--accent);
  border-radius: 16px;
  background: linear-gradient(140deg, rgba(20, 184, 166, .12), rgba(15, 23, 42, .92));
  box-shadow: 0 18px 40px rgba(2, 6, 23, .35);
  color: #e2e8f0;
  backdrop-filter: blur(6px);
  position: relative;
  overflow: hidden;
}

.image-comment .comment-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: 700;
  color: #7dd3fc;
  margin: 0 0 10px;
}

.image-comment .comment-title::before {
  content: "";
  width: 20px;
  height: 2px;
  background: #7dd3fc;
  border-radius: 999px;
  opacity: .65;
}

.image-comment .comment-body {
  color: #e2e8f0;
  font-size: 0.98rem;
  font-size: 0.98rem;
  line-height: 1.65;
  font-weight: 400;
}

.image-comment .comment-body a {
  color: #7dd3fc
}

.text-card {
  width: 100%;
  max-width: min(920px, 92vw);
  margin: 0 auto;
  padding: 20px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, .28);
  background: linear-gradient(145deg, rgba(15, 23, 42, .94), rgba(2, 6, 23, .95));
  color: #e2e8f0;
  box-shadow: 0 18px 40px rgba(2, 6, 23, .35);
}

.text-card .text-title {
  font-weight: 700;
  margin-bottom: 12px;
  color: #fff;
}

.text-card .text-body {
  color: #e2e8f0;
  font-size: 0.98rem;
  line-height: 1.65;
}

.text-card .text-body p:first-child {
  margin-top: 0;
}

.text-comment {
  width: 100%;
  max-width: min(920px, 92vw, calc(100% - 24px));
  margin: 18px auto 0;
  padding: 18px 20px 20px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-left: 4px solid #7dd3fc;
  border-radius: 16px;
  background: linear-gradient(140deg, rgba(125, 211, 252, .1), rgba(15, 23, 42, .92));
  box-shadow: 0 18px 40px rgba(2, 6, 23, .35);
  color: #e2e8f0;
}

#textCommentBox {
  width: 100%;
  max-width: min(920px, 92vw, calc(100% - 24px));
  margin: 16px auto 0;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  padding: 18px 20px 20px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-left: 4px solid #7dd3fc;
  border-radius: 16px;
  background: linear-gradient(140deg, rgba(125, 211, 252, .1), rgba(15, 23, 42, .92));
  color: #e2e8f0;
}

#textCommentBox > .user-comments,
#textCommentBox > .uc-post-box {
  width: 100% !important;
  max-width: 100% !important;
}

#textCommentBox > .user-comments {
  display: flex !important;
  flex-direction: column !important;
}

.video-card {
  width: 100%;
  max-width: min(980px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, .28);
  background: linear-gradient(145deg, rgba(15, 23, 42, .94), rgba(2, 6, 23, .95));
  box-shadow: 0 26px 60px rgba(2, 6, 23, .5);
}

.video-head {
  margin-bottom: 12px;
}

.video-kicker {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  letter-spacing: .2em;
  font-weight: 700;
  color: #7dd3fc;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.video-title {
  color: #f8fafc;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  font-weight: 700;
}

.video-player-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 14px;
  overflow: hidden;
  background: radial-gradient(circle at top, rgba(20, 184, 166, .28), rgba(2, 6, 23, .95));
  border: 1px solid rgba(125, 211, 252, .25);
}

.video-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-error {
  border-radius: 12px;
  border: 1px dashed rgba(248, 113, 113, .7);
  background: rgba(127, 29, 29, .22);
  color: #fecaca;
  padding: 14px 16px;
}

.video-comment {
  width: 100%;
  max-width: min(980px, calc(100vw - 48px));
  margin: 18px auto 0;
  padding: 18px 20px 20px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-left: 4px solid var(--accent);
  border-radius: 16px;
  background: linear-gradient(140deg, rgba(20, 184, 166, .12), rgba(15, 23, 42, .92));
  color: #e2e8f0;
  backdrop-filter: blur(6px);
}

.video-comment .comment-title {
  color: #7dd3fc;
}

.video-comment .comment-body {
  color: #e2e8f0;
}

#videoCommentBox {
  width: 100%;
  max-width: min(980px, calc(100vw - 48px));
  margin: 16px auto 0;
  padding: 18px 20px 20px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-left: 4px solid var(--accent);
  border-radius: 16px;
  background: linear-gradient(140deg, rgba(20, 184, 166, .12), rgba(15, 23, 42, .92));
  color: #e2e8f0;
}

.image-card .btn-mastra {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

.image-card .btn-download {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--accent);
  transition: all 0.2s ease;
}

.image-card .btn-download:hover {
  background: var(--accent);
  color: #021312;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(20, 184, 166, 0.3);
}

.image-card .btn-download .ico-download {
  width: 18px;
  height: 18px;
}

.image-card .btn-mastra:hover {
  background: #115e59;
}

.image-card .btn-download:hover {
  background: #e2e8f0;
}

#imageCommentBox {
  width: 100%;
  margin: 16px 0 0 0;
  padding: 18px 20px 20px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-left: 4px solid var(--accent);
  border-radius: 16px;
  background: linear-gradient(140deg, rgba(20, 184, 166, .12), rgba(15, 23, 42, .92));
  color: #e2e8f0;
  backdrop-filter: blur(6px);
}

@media (max-width:720px) {
  :root {
    --image-max-h: min(50vh, 420px);
  }

  .image-comment {
    margin-top: 18px;
    padding: 16px 16px 18px;
  }

  .image-card {
    max-width: min(94vw, calc(100% - 16px));
    max-height: min(82vh, calc(100% - 16px));
  }

  .image-card img {
    max-width: 100%;
    max-height: var(--image-max-h);
  }

  .image-controls {
    gap: 8px;
  }

  .image-nav {
    width: 32px;
    height: 32px;
    font-size: 20px;
  }

  .video-card {
    max-width: calc(100vw - 16px);
    padding: 14px;
    border-radius: 14px;
  }

  .video-comment,
  #videoCommentBox {
    max-width: calc(100vw - 16px);
    padding: 14px 14px 16px;
  }
}

.mastra-fs {
  position: fixed;
  inset: 0;
  z-index: 2147483645;
  background: #0b0f1a;
  display: none;
  flex-direction: column
}

.mastra-fs .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #0e1525;
  color: #e5e7eb;
  border-bottom: 1px solid #1d2740;
  position: absolute;
  /* Changed from default flow */
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  border: 1px solid #263146;
  border-radius: 999px;
  z-index: 2147483647;
  /* Maximum z-index */
  background: rgba(14, 21, 37, 0.9);
  backdrop-filter: blur(4px);
  gap: 16px;
}

.mastra-fs .bar .btn {
  border: 1px solid #263146;
  background: transparent;
  color: #cbd5e1;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 700
}

.mastra-fs iframe {
  border: 0;
  width: 100%;
  height: 100%
}

.mobile-nav {
  display: none
}

@media (max-width:1024px) {
  :root {
    --viewer-max-h: min(60vh, 520px);
    --viewer-min-h: 240px;
  }

  .mastra-sidebar {
    display: none !important
  }

  .mobile-nav {
    display: block !important;
    margin: 0 0 12px 0
  }

  .mobile-track {
    background: var(--bg-2);
    border-radius: 12px;
    padding: 10px
  }

  .mobile-mod {
    background: var(--bg-3);
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden
  }

  .mobile-mod>.mgrp {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
    background: transparent;
    border: 0;
    color: var(--txt);
    padding: 16px 18px;
    /* Increased padding */
    font-size: 1.1rem;
    /* Larger font */
    font-weight: 700;
    cursor: pointer
  }

  .mchev {
    display: inline-block;
    transition: transform .18s ease;
    font-size: 18px;
    line-height: 1
  }

  .mobile-mod.open .mchev {
    transform: rotate(90deg)
  }

  .mcount {
    font-size: .75rem;
    color: #9fb2ca;
    opacity: .85;
    padding: 0 14px 10px 14px
  }

  .mobile-mod.open .mcount {
    display: none
  }

  .mobile-mod .mlist {
    list-style: none;
    margin: 0;
    padding: 8px 10px 10px 10px;
    display: none
  }

  .mobile-mod .mlist.show {
    display: block
  }

  .chip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0;
    padding: 14px 16px;
    /* Increased padding */
    border-radius: 12px;
    background: #0d1424;
    color: #e5e7eb;
    border: 1px solid #1d2740;
    cursor: pointer
  }

  .chip .chip-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 82vw;
    font-size: 1rem;
    /* Larger font */
    font-weight: 500;
  }

  .mastra-toolbar .title {
    font-size: clamp(13px, 4vw, 18px)
  }

  .mastra-viewer {
    width: var(--viewer-mobile-w);
    margin-left: auto;
    margin-right: auto;
    /* Wrapper padding for scroll area */
    padding: 0 10px;
    box-sizing: border-box;
  }

  .mastra-iframe {
    height: auto
  }
}

body.mobile-on .mastra-sidebar {
  display: none !important
}

body.mobile-on .mobile-nav {
  display: block !important
}

body.fs-open {
  overflow: hidden;
}

body.fs-open .split-toggle {
  display: none !important
}

@media (min-width:1025px) {
  .grp {
    transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
  }

  .grp:hover {
    background: var(--accent);
    color: #021312;
  }

  .grp[aria-expanded="true"] {
    background: transparent;
    color: var(--txt);
  }

  .grp[aria-expanded="true"]:hover {
    background: var(--accent);
    color: #021312;
  }

  .grp:focus,
  .grp:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    background: transparent;
    color: var(--txt);
  }

  .grp:active:not(:hover) {
    background: transparent;
    color: var(--txt);
  }
}

.admin-toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  color: #021312;
  font-weight: 700;
  cursor: pointer;
  z-index: 2147483000;
  box-shadow: 0 12px 28px rgba(20, 184, 166, .35);
  display: none;
}

.admin-scrim {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, .5);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 2147482000;
}

.admin-scrim.open {
  opacity: 1;
  pointer-events: auto;
}

.admin-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(600px, 96vw);
  background: linear-gradient(140deg, var(--admin-bg), var(--admin-bg-2));
  color: var(--admin-ink);
  transform: translateX(100%);
  transition: transform .25s ease;
  z-index: 2147482500;
  display: flex;
  flex-direction: column;
}

.admin-panel.open {
  transform: translateX(0)
}

.admin-header {
  padding: 22px 24px 12px 24px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.admin-kicker {
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: 11px;
  color: var(--admin-muted);
  margin-bottom: 6px;
}

.admin-header h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 24px;
}

.admin-meta {
  margin: 8px 0 0 0;
  font-size: 12px;
  color: var(--admin-muted);
  line-height: 1.5;
}

.admin-body {
  padding: 0 24px 24px 24px;
  overflow: auto;
}

.admin-card {
  background: var(--admin-card);
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-shadow);
  padding: 16px;
  margin-bottom: 14px;
}

.admin-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.admin-label {
  font-size: 13px;
  color: #374151;
  /* Gray 700 - mais escuro */
  font-weight: 600;
  display: block;
  margin-bottom: 5px;
}

.admin-input,
.admin-textarea,
.admin-select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #94a3b8;
  /* Slate 400 - borda mais visivel */
  font-family: inherit;
  font-size: 16px;
  /* Maior para leitura facil */
  background: #fff;
  color: #0f172a;
  /* Slate 900 - quase preto */
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.admin-input:focus,
.admin-textarea:focus,
.admin-select:focus {
  outline: 2px solid var(--admin-accent);
  border-color: var(--admin-accent);
}

.admin-textarea {
  min-height: 140px;
  resize: vertical
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.admin-toolbar button {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #111827;
  font-weight: 700;
  cursor: pointer;
}

.admin-toolbar button:hover {
  border-color: var(--admin-accent);
}

.admin-toolbar button:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.admin-toolbar button[aria-pressed="true"] {
  background: var(--admin-accent);
  color: #fff;
  border-color: var(--admin-accent);
}

.admin-editor {
  min-height: 180px;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #0f172a;
  /* Slate 900 */
  color: #f1f5f9;
  /* Slate 100 - Texto bem claro */
  padding: 14px;
  width: 100%;
  font-size: 16px;
  line-height: 1.6;
}

.admin-editor[hidden],
.admin-editor-code[hidden] {
  display: none !important;
}

.admin-editor-code {
  min-height: 260px;
  font-family: "Consolas", "Courier New", monospace;
  white-space: pre-wrap;
  display: block;
  width: 100%;
  resize: vertical;
}

.admin-editor:focus {
  outline: 2px solid rgba(20, 184, 166, .35);
  border-color: var(--accent);
}

.admin-editor a {
  color: #7dd3fc
}

.admin-editor a {
  color: #7dd3fc
}

.admin-editor ul,
.admin-editor ol {
  padding-left: 1.2em;
  margin: 0.5em 0;
}

.admin-editor li {
  margin-bottom: 0.25em;
}

.admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--admin-accent);
  background: var(--admin-accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.admin-btn.secondary {
  background: #fff;
  color: var(--admin-accent);
}

.admin-btn.ghost {
  background: transparent;
  color: var(--admin-muted);
  border-color: #e5e7eb;
}

.admin-btn.small {
  padding: 6px 10px;
  font-size: 12px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.admin-section-title {
  margin: 0 0 10px 0;
  font-size: 16px;
  font-weight: 700;
}

.admin-notice {
  padding: 10px 12px;
  border-radius: 10px;
  background: #ecfeff;
  color: #155e75;
  border: 1px solid #a5f3fc;
  margin-bottom: 12px;
  font-size: 13px;
}

.admin-notice.error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.admin-module {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
  background: #fff;
}

.admin-module-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.admin-module-head .grow {
  flex: 1
}

.admin-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  color: var(--admin-muted);
}

.admin-checks label {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 0;
}

.admin-move {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}

.admin-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px dashed #e5e7eb;
  background: #fff;
  color: var(--admin-muted);
  cursor: grab;
  font-weight: 700;
  line-height: 1;
  padding: 0;
}

.admin-drag-handle:active {
  cursor: grabbing
}

.admin-move-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: var(--admin-muted);
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
  padding: 0;
}

.admin-move-btn:active {
  transform: translateY(1px)
}

.admin-module.is-dragging,
.admin-item-wrap.is-dragging {
  opacity: .6
}

.admin-item-wrap {
  padding: 10px 0;
  border-bottom: 1px dashed #e5e7eb;
}

.admin-item-wrap:last-child {
  border-bottom: 0
}

.admin-item-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.admin-tab-btn {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #111827;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
}

.admin-tab-btn.is-active {
  background: var(--admin-accent);
  color: #fff;
  border-color: var(--admin-accent);
}

.admin-item-pane[hidden] {
  display: none !important
}

.admin-item {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: start;
  padding: 8px 0;
}

/* Move handle */
.admin-item> :nth-child(1) {
  flex: 0 0 auto;
  margin-top: 28px;
}

/* Title */
.admin-item> :nth-child(2) {
  flex: 1 1 280px;
  min-width: 200px;
}

/* Type */
.admin-item> :nth-child(3) {
  flex: 0 0 130px;
}

/* Source */
.admin-item> :nth-child(4) {
  flex: 1 1 280px;
  min-width: 200px;
}

/* Checks */
.admin-item> :nth-child(5) {
  flex: 1 1 100%;
  padding-top: 6px;
  margin-top: 4px;
  border-top: 1px dashed #e2e8f0;
}

/* Actions */
.admin-item> :nth-child(6) {
  flex: 0 0 auto;
  margin-top: 28px;
}

.item-comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.item-comment-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--admin-muted);
}

.item-comment-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.item-comment-toolbar button {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #111827;
  font-weight: 700;
  cursor: pointer;
}

.item-comment-toolbar button:hover {
  border-color: var(--admin-accent);
}

.admin-image-text {
  margin-top: 10px;
}

.item-image-text {
  min-height: 90px;
}

.admin-text-content {
  margin-top: 10px;
}

.item-text-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

.item-text-toolbar button {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #111827;
  font-weight: 700;
  cursor: pointer;
}

.item-text-toolbar button:hover {
  border-color: var(--admin-accent);
}

.item-text-editor {
  min-height: 170px;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #f1f5f9;
  padding: 14px;
  font-size: 15px;
  line-height: 1.5;
}

.item-text-editor:focus {
  outline: 2px solid #0f766e;
  outline-offset: 2px;
}

.item-text-editor:empty::before {
  content: attr(data-placeholder);
  color: #64748b;
}

.item-comment-editor {
  min-height: 150px;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #f1f5f9;
  padding: 14px;
  font-size: 15px;
  line-height: 1.5;
}

.item-comment-editor:focus {
  outline: 2px solid rgba(20, 184, 166, .35);
  border-color: var(--accent);
}

.admin-editor {
  text-align: left;
}

.item-comment-editor:empty:before {
  content: attr(data-placeholder);
  color: #94a3b8;
}

.item-comment-editor ul,
.item-comment-editor ol {
  padding-left: 1.2em;
  margin: 0.5em 0;
}

.item-comment-editor li {
  margin-bottom: 0.25em;
}

.admin-subitems {
  margin-top: 10px;
}

.admin-subitems-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.admin-subitem {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.admin-subitem:last-child {
  margin-bottom: 0
}

.admin-item-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-downloads {
  margin-top: 14px;
  border-top: 1px dashed #e2e8f0;
  padding-top: 12px;
}

.admin-downloads-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.admin-downloads-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-download-list {
  display: grid;
  gap: 8px;
}

.admin-download-item {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 8px;
  align-items: center;
}

@media (max-width:980px) {
  .admin-item {
    grid-template-columns: 1fr
  }

  .admin-subitem {
    grid-template-columns: 1fr
  }

  .admin-download-item {
    grid-template-columns: 1fr;
  }

  .admin-actions {
    flex-direction: column;
    align-items: flex-start
  }
}

/* User Comments System */
.user-comments {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
  border-top: 1px solid #1e293b;
  padding-top: 20px;
}

.u-comment {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.uc-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #94a3b8;
}

.uc-name {
  font-weight: 700;
  color: #e2e8f0;
}

.uc-author {
  color: #14b8a6
}

/* Author Reply Color */
.badge-author {
  background: #14b8a6;
  color: #0f172a;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 800;
}

.badge-fake {
  color: #f59e0b;
  font-weight: bold;
  cursor: help;
}

.uc-date {
  font-size: 11px;
  opacity: 0.75
}

.uc-body {
  color: #cbd5e1;
  line-height: 1.5;
  font-size: 15px;
}

.uc-actions {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.btn-text {
  background: transparent;
  border: 0;
  padding: 0;
  color: #64748b;
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
}

.btn-text:hover {
  color: #94a3b8;
  text-decoration: underline
}

.text-red {
  color: #ef4444
}

.text-red:hover {
  color: #f87171
}

.uc-reply {
  margin-left: 20px;
  margin-top: 8px;
  padding-left: 14px;
  border-left: 2px solid #334155;
}

.uc-reply-box {
  margin-top: 10px;
  margin-left: 20px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 8px;
}

.uc-reply-box .uc-input {
  width: 100%;
  min-height: 60px;
  background: #0f172a;
  border: 1px solid #334155;
  color: #e2e8f0;
  border-radius: 6px;
  padding: 8px;
  font-family: inherit;
  resize: vertical;
}

.uc-form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

/* Post Box */
.uc-post-box {
  margin-top: 24px;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 16px;
}

.uc-post-head {
  font-size: 14px;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.uc-input.main {
  width: 100%;
  min-height: 80px;
  background: #0b0f1a;
  border: 1px solid #334155;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  font-family: inherit;
  resize: vertical;
  margin-bottom: 10px;
  font-size: 15px;
}

.uc-input:focus {
  outline: 2px solid #0f766e;
  border-color: #0f766e
}

.uc-admin-opts {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #94a3b8;
}

.uc-login-msg {
  margin-top: 20px;
  padding: 16px;
  text-align: center;
  color: #94a3b8;
  border: 1px dashed #334155;
  border-radius: 10px;
}

.uc-login-msg a {
  color: #14b8a6;
  font-weight: 700
}
