body.single-post {
  --ht-bg: #07111f;
  --ht-panel: rgba(10, 26, 45, 0.86);
  --ht-border: rgba(95, 173, 255, 0.24);
  --ht-text: #e9f6ff;
  --ht-muted: #9fc4e1;
  --ht-accent: #48d7ff;
  --ht-accent-2: #7b61ff;
  background:
    radial-gradient(circle at top left, rgba(72, 215, 255, 0.18), transparent 34%),
    radial-gradient(circle at top right, rgba(123, 97, 255, 0.16), transparent 30%),
    linear-gradient(180deg, #08111d 0%, #050a12 100%);
  color: var(--ht-text);
}

body.single-post .site,
body.single-post .site-content,
body.single-post main,
body.single-post .content-area {
  background: transparent !important;
}

body.single-post .post,
body.single-post article.post,
body.single-post article.type-post,
body.single-post .single-post-container,
body.single-post .content-wrapper {
  color: var(--ht-text);
}

body.single-post .post-header,
body.single-post header.entry-header,
body.single-post .entry-header {
  padding: 24px;
  border: 1px solid var(--ht-border);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(8, 23, 38, 0.88), rgba(7, 18, 31, 0.94));
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

body.single-post .post-title,
body.single-post .entry-title,
body.single-post h1 {
  color: #f5fbff;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

body.single-post .post-meta,
body.single-post .entry-meta,
body.single-post .post-date,
body.single-post .breadcrumbs,
body.single-post .breadcrumb,
body.single-post .breadcrumb-wrapper {
  color: var(--ht-muted) !important;
  font-family: 'JetBrains Mono', monospace;
}

body.single-post .post-content,
body.single-post .entry-content {
  margin-top: 24px;
  padding: 28px;
  border: 1px solid var(--ht-border);
  border-radius: 24px;
  background: rgba(8, 17, 28, 0.92);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.28);
  color: var(--ht-text) !important;
  text-align: left !important;
}

body.single-post .post-content p,
body.single-post .post-content li,
body.single-post .entry-content p,
body.single-post .entry-content li {
  color: var(--ht-text) !important;
  text-align: left !important;
}

body.single-post .post-content h2,
body.single-post .post-content h3,
body.single-post .post-content h4,
body.single-post .entry-content h2,
body.single-post .entry-content h3,
body.single-post .entry-content h4 {
  color: #f2fbff;
  font-family: 'Orbitron', sans-serif;
  text-transform: uppercase;
}

body.single-post .post-content a,
body.single-post .entry-content a {
  color: var(--ht-accent) !important;
}

body.single-post .post-thumbnail,
body.single-post .featured-image,
body.single-post .entry-thumbnail {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(95, 173, 255, 0.18);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
}

body.single-post .post-thumbnail img,
body.single-post .featured-image img,
body.single-post .entry-thumbnail img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

body.single-post .post-navigation,
body.single-post .comments-area,
body.single-post .widget-area,
body.single-post #secondary,
body.single-post .related-posts {
  margin-top: 24px;
  padding: 22px;
  border: 1px solid var(--ht-border);
  border-radius: 20px;
  background: var(--ht-panel);
  color: var(--ht-text);
}

body.single-post button,
body.single-post .button,
body.single-post .read-aloud-button,
body.single-post .lang-switcher {
  border-radius: 999px;
}

/* Mobile fixes: wider content, safe text wrapping, separate TTS button */
body.single-post,
body.single-post * {
  box-sizing: border-box;
}

body.single-post .post,
body.single-post article.post,
body.single-post article.type-post,
body.single-post .single-post-container,
body.single-post .content-wrapper,
body.single-post .site-main {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body.single-post .post-header,
body.single-post header.entry-header,
body.single-post .entry-header,
body.single-post .post-content,
body.single-post .entry-content,
body.single-post .post-navigation,
body.single-post .comments-area,
body.single-post .widget-area,
body.single-post #secondary,
body.single-post .related-posts {
  max-width: 100%;
}

body.single-post .post-title,
body.single-post .entry-title,
body.single-post h1,
body.single-post h2,
body.single-post h3,
body.single-post h4,
body.single-post .post-content p,
body.single-post .post-content li,
body.single-post .entry-content p,
body.single-post .entry-content li,
body.single-post blockquote,
body.single-post pre,
body.single-post code {
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  max-width: 100%;
}

body.single-post .ht-tts-panel {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 9999;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

body.single-post .ht-tts-fab {
  pointer-events: auto;
  width: min(100%, 420px);
  min-height: 48px;
  border: 1px solid rgba(72,215,255,0.35);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(17,39,64,0.96), rgba(8,21,37,0.98));
  color: #e9f6ff;
  padding: 12px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  line-height: 1.2;
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
}

body.single-post .ht-tts-fab.is-playing {
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 0 24px rgba(72,215,255,0.22);
}

@media (max-width: 767px) {
  body.single-post .post {
    padding: 8px 4px 84px;
  }

  body.single-post .post-header,
  body.single-post header.entry-header,
  body.single-post .entry-header,
  body.single-post .post-content,
  body.single-post .entry-content,
  body.single-post .post-navigation,
  body.single-post .comments-area,
  body.single-post .widget-area,
  body.single-post #secondary,
  body.single-post .related-posts {
    margin-left: 2px;
    margin-right: 2px;
    padding-left: 7px;
    padding-right: 7px;
    border-radius: 16px;
  }

  body.single-post .post-title,
  body.single-post .entry-title,
  body.single-post h1 {
    font-size: clamp(1.5rem, 7vw, 2.1rem);
    line-height: 1.1;
  }

  body.single-post .post-content,
  body.single-post .entry-content,
  body.single-post .post-content p,
  body.single-post .post-content li,
  body.single-post .entry-content p,
  body.single-post .entry-content li {
    font-size: 17px;
    line-height: 1.72;
  }

  body.single-post .post-thumbnail,
  body.single-post .featured-image,
  body.single-post .entry-thumbnail {
    border-radius: 14px;
  }

  body.single-post .ht-tts-panel {
    left: 8px;
    right: 8px;
    bottom: 8px;
  }

  body.single-post .ht-tts-fab {
    width: 100%;
    min-height: 50px;
    font-size: 14px;
  }
}

/* Hide old theme TTS controls on single posts */
body.single-post [data-hightech-tts-ignore="1"] {
  display: none !important;
}

/* Extra fallback selectors for old read-aloud UI */
body.single-post .read-aloud-button,
body.single-post .tts-button,
body.single-post .listen-button,
body.single-post .speech-button,
body.single-post .audio-button,
body.single-post .tts-toolbar,
body.single-post .read-aloud-toolbar,
body.single-post .lang-switcher {
  display: none !important;
}

/* Make the mobile card almost full width */
@media (max-width: 767px) {
  body.single-post .site-main,
  body.single-post .content-area,
  body.single-post .site-content,
  body.single-post .post,
  body.single-post article.post,
  body.single-post article.type-post,
  body.single-post .single-post-container,
  body.single-post .content-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.single-post .post {
    padding-top: 6px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 84px !important;
  }

  body.single-post .post-header,
  body.single-post header.entry-header,
  body.single-post .entry-header,
  body.single-post .post-content,
  body.single-post .entry-content,
  body.single-post .post-navigation,
  body.single-post .comments-area,
  body.single-post .widget-area,
  body.single-post #secondary,
  body.single-post .related-posts {
    width: auto !important;
    max-width: none !important;
    margin-left: 5px !important;
    margin-right: 5px !important;
    padding-left: 7px !important;
    padding-right: 7px !important;
    border-radius: 14px !important;
  }

  body.single-post .post-thumbnail,
  body.single-post .featured-image,
  body.single-post .entry-thumbnail {
    margin-left: 5px !important;
    margin-right: 5px !important;
    border-radius: 12px !important;
  }
}
