/* Rinvay Blog Component Styles - Pure CSS (no @apply) */

html {
  min-height: 100%;
}

body {
  box-sizing: border-box;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 76px;
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans SC', sans-serif;
  background: #f9fafb;
  color: #1f2937;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

button {
  font: inherit;
}

button svg {
  display: block;
  flex: 0 0 auto;
}

body > main {
  flex: 1 0 auto;
}

/* Unified page frame: body already reserves header space, pages should not add
   another 70px top spacer. Keeps PJAX transitions visually stable. */
main.pt-\[70px\] {
  padding-top: 0 !important;
}
.site-main {
  flex: 1 0 auto;
  padding: clamp(24px, 3vw, 38px) 0 56px;
}
.site-main-home {
  padding-top: clamp(20px, 2.6vw, 34px);
}
.page-shell {
  width: min(100% - 40px, 900px);
  margin: 0 auto;
}
.page-shell-wide {
  width: min(100% - 40px, 1080px);
}
.page-shell-article {
  width: min(100% - 40px, 820px);
}
.page-shell-music {
  width: min(100% - 40px, 1080px);
}
.page-head {
  margin: 0 0 24px;
}
.page-title {
  margin: 0;
  color: #111827;
  font-size: clamp(26px, 2.2vw, 32px);
  font-weight: 720;
  line-height: 1.18;
  letter-spacing: -0.035em;
}
.page-title::after {
  content: "";
  display: block;
  width: 44px;
  height: 4px;
  margin-top: 10px;
  border-radius: 999px;
  background: #eb5055;
}
.page-subtitle {
  margin: 12px 0 0;
  color: #98a2b3;
  font-size: 14px;
  line-height: 1.65;
}
.page-meta {
  margin: -10px 0 22px;
  color: #98a2b3;
  font-size: 14px;
  line-height: 1.6;
}
.page-body {
  margin-top: 0;
}
@media (max-width: 640px) {
  .site-main {
    padding: 22px 0 42px;
  }
  .site-main-home {
    padding-top: 18px;
  }
  .page-shell,
  .page-shell-wide,
  .page-shell-article,
  .page-shell-music {
    width: min(100% - 28px, 1080px);
  }
  .page-head {
    margin-bottom: 18px;
  }
  .page-title {
    font-size: 26px;
    line-height: 1.16;
  }
  .page-title::after {
    width: 40px;
    height: 4px;
    margin-top: 9px;
  }
}

/* Desktop scrollbar polish */
@media (min-width: 641px) {
  html {
    scrollbar-color: rgba(148, 163, 184, .48) rgba(248, 250, 252, .72);
    scrollbar-width: thin;
  }
  body::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }
  body::-webkit-scrollbar-track {
    background: rgba(248, 250, 252, .72);
  }
  body::-webkit-scrollbar-thumb {
    border: 3px solid rgba(248, 250, 252, .72);
    border-radius: 999px;
    background: rgba(148, 163, 184, .48);
  }
  body::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, .62);
  }
  .music-album-list,
  .music-track-list,
  .music-lyrics,
  .music-search-results {
    scrollbar-color: rgba(251, 113, 133, .36) transparent;
    scrollbar-width: thin;
  }
  .music-album-list::-webkit-scrollbar,
  .music-track-list::-webkit-scrollbar,
  .music-lyrics::-webkit-scrollbar,
  .music-search-results::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  .music-album-list::-webkit-scrollbar-track,
  .music-track-list::-webkit-scrollbar-track,
  .music-lyrics::-webkit-scrollbar-track,
  .music-search-results::-webkit-scrollbar-track {
    background: transparent;
  }
  .music-album-list::-webkit-scrollbar-thumb,
  .music-track-list::-webkit-scrollbar-thumb,
  .music-lyrics::-webkit-scrollbar-thumb,
  .music-search-results::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: rgba(251, 113, 133, .34);
    background-clip: padding-box;
  }
  .music-album-list::-webkit-scrollbar-thumb:hover,
  .music-track-list::-webkit-scrollbar-thumb:hover,
  .music-lyrics::-webkit-scrollbar-thumb:hover,
  .music-search-results::-webkit-scrollbar-thumb:hover {
    background: rgba(251, 113, 133, .56);
    background-clip: padding-box;
  }
}

.site-footer {
  flex-shrink: 0;
}

/* Header */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 76px;
  background: rgba(255, 255, 255, 0.56);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  box-shadow: none;
  transition: height 0.22s ease, background 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
#site-header.scrolled {
  height: 62px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: rgba(15, 23, 42, 0.075);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}
#site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2.25rem);
}
.header-shell {
  position: relative;
  gap: 1rem;
}
.site-logo img {
  display: block;
  height: 32px;
  width: auto;
  filter: saturate(0.98) contrast(1);
  transition: height 0.22s ease;
}
.site-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 150px;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.site-logo:hover {
  opacity: 0.88;
}
.site-nav {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 18px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  height: 44px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
@media (min-width: 900px) {
  .site-nav { display: flex; }
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  min-width: auto;
  padding: 0 2px;
  border-radius: 0;
  font-size: 15px;
  line-height: 34px;
  font-weight: 460;
  letter-spacing: 0.01em;
  color: #667085;
  position: relative;
  transition: color 0.18s ease;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 3px;
  height: 2px;
  border-radius: 999px;
  background: #eb5055;
  transform: scaleX(0);
  opacity: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.site-nav a:hover,
.site-nav a.active {
  color: #eb5055;
}
.site-nav a:hover::after,
.site-nav a.active::after {
  transform: scaleX(1);
  opacity: 1;
}
#site-header.scrolled .site-logo img {
  height: 29px;
}
#site-header.scrolled .site-nav {
  height: 38px;
}
.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.header-search,
.mobile-menu-btn {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(248, 250, 252, 0.72);
  color: #667085;
  line-height: 1;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.header-search svg,
.mobile-menu-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}
.header-search:hover,
.mobile-menu-btn:hover {
  color: #344054;
  background: rgba(241, 245, 249, 0.95);
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
  transform: translateY(-1px);
}
.mobile-menu-btn {
  cursor: pointer;
}
@media (min-width: 900px) {
  .mobile-menu-btn { display: none; }
}
.mobile-menu {
  display: none;
  position: absolute;
  top: 76px;
  left: clamp(1rem, 3vw, 2.25rem);
  right: clamp(1rem, 3vw, 2.25rem);
  padding: 8px;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255,255,255,0.95);
  box-shadow: 0 18px 44px rgba(15,23,42,0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
#site-header.scrolled .mobile-menu {
  top: 62px;
}
.mobile-menu.active {
  display: block;
}
@media (min-width: 900px) {
  .mobile-menu { display: none !important; }
}
.mobile-menu a {
  display: block;
  padding: 0.82rem 1rem;
  color: #475467;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 520;
  transition: color 0.18s ease, background 0.18s ease;
}
.mobile-menu a:hover,
.mobile-menu a.active {
  color: #eb5055;
  background: rgba(235, 80, 85, 0.08);
}
@media (max-width: 899px) {
  #site-header .container {
    justify-content: space-between;
  }
  .site-logo {
    min-width: 0;
  }
  .site-logo img {
    height: 32px;
  }
}
@media (max-width: 520px) {
  body { padding-top: 68px; }
  #site-header { height: 68px; }
  #site-header.scrolled { height: 58px; }
  .mobile-menu { top: 68px; }
  #site-header.scrolled .mobile-menu { top: 58px; }
  .site-logo img { height: 30px; }
  .header-search,
  .mobile-menu-btn {
    width: 38px;
    height: 38px;
  }
}

/* Post Grid */
.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (min-width: 640px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .post-grid { grid-template-columns: repeat(3, 1fr); }
}
.post-card {
  overflow: hidden;
  border-radius: 0.5rem;
  background: white;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.post-card-thumb {
  height: 12rem;
  background-size: cover;
  background-position: center;
  background-color: #e5e7eb;
}
.post-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.post-card-title {
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
}
.post-card-title a {
  color: #1f2937;
}
.post-card-title a:hover {
  color: #eb5055;
}
.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: #9ca3af;
  margin-bottom: 0.75rem;
}
.post-card-excerpt {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #6b7280;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-tags {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-top: 1px solid #f3f4f6;
  padding-top: 0.75rem;
}
.post-card-tags a {
  font-size: 0.75rem;
  color: #eb5055;
}
.post-card-tags a::before {
  content: "#";
}
.sticky-badge {
  display: inline-block;
  margin-right: 0.5rem;
  border-radius: 0.25rem;
  background: #eb5055;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
}

/* Post Hero */
.post-hero {
  position: relative;
  height: 18rem;
  background-size: cover;
  background-position: center;
  background-color: #1f2937;
}
@media (min-width: 768px) {
  .post-hero { height: 24rem; }
}
.post-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
}
.post-hero-content {
  position: relative;
  z-index: 10;
  display: flex;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 1.5rem;
  text-align: center;
  color: white;
}
.post-hero-title {
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
}
@media (min-width: 768px) {
  .post-hero-title { font-size: 1.875rem; }
}
.post-hero-meta {
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: #e5e7eb;
}
.post-hero-tags {
  display: flex;
  gap: 0.75rem;
}
.post-hero-tags a {
  border-radius: 9999px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  padding: 0.25rem 1rem;
  font-size: 0.75rem;
  color: white;
}
.post-hero-tags a:hover {
  background: rgba(255,255,255,0.3);
}

/* Unified reading layout: article body and comments share one visual axis */
.post-article,
.page-article,
.comments-section {
  width: min(100% - 40px, 820px);
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

/* Post Article */
.post-article,
.page-article {
  padding: 0 0 1rem;
}

.post-article {
  margin-top: clamp(2rem, 4vw, 3.25rem);
}

.post-content {
  width: 100%;
  line-height: 1.86;
  font-size: 15px;
  color: #313131;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.post-content p,
.post-content li,
.post-content a {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.post-content > :first-child {
  margin-top: 0;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  margin: 2.15em 0 0.8em;
  color: #151515;
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: -0.025em;
  scroll-margin-top: 90px;
}

.post-content h1::before,
.post-content h2::before,
.post-content h3::before,
.post-content h4::before,
.post-content h5::before,
.post-content h6::before {
  content: "#";
  flex: 0 0 auto;
  color: #eb5055;
  font-weight: 700;
  font-size: 0.92em;
  opacity: 0.92;
  transform: translateY(-0.02em);
}

.post-content h1 { font-size: 1.55rem; }
.post-content h2 { font-size: 1.35rem; }
.post-content h3 { font-size: 1.18rem; }
.post-content h4,
.post-content h5,
.post-content h6 { font-size: 1rem; }

.post-content p {
  margin: 1em 0;
}

.post-content ol,
.post-content ul {
  margin: 1.05rem 0 1.35rem 1.35rem;
  padding: 0;
}

.post-content li + li {
  margin-top: 0.35rem;
}

.post-content :not(pre) > code {
  display: inline-block;
  max-width: 100%;
  border: 1px solid rgba(235, 80, 85, 0.14);
  border-radius: 0.42rem;
  background: #fff4f4;
  padding: 0.08rem 0.38rem;
  color: #b4232b;
  font-size: 0.9em;
  line-height: 1.5;
  vertical-align: 0.02em;
  overflow-wrap: anywhere;
}

.post-content pre,
.post-content .rinvay-code-card {
  max-width: 100%;
}

.post-content pre {
  margin: 1.4rem 0;
  border: 1px solid #ece7e3;
  border-radius: 0.85rem;
  background: #f7f5f3 !important;
  color: #1f2933 !important;
  box-shadow: 0 14px 34px rgba(31, 41, 55, 0.06);
  overflow: hidden;
}

.post-content pre code {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  background: transparent !important;
  color: inherit !important;
  padding: 1.05rem 1.15rem;
  font-family: "JetBrains Mono", "Fira Code", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.88rem;
  line-height: 1.72;
  white-space: pre;
  word-break: normal;
  overflow-wrap: normal;
  tab-size: 4;
  -webkit-overflow-scrolling: touch;
}

.post-content .rinvay-code-card {
  margin: 1.45rem 0;
  border: 1px solid #ece7e3;
  border-radius: 0.95rem;
  background: #f7f5f3;
  box-shadow: 0 14px 34px rgba(31, 41, 55, 0.06);
  overflow: hidden;
}

.post-content .rinvay-code-card pre {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.post-content .rinvay-code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid #ece7e3;
  background: rgba(255, 255, 255, 0.58);
  padding: 0.58rem 0.72rem 0.5rem;
}

.post-content .rinvay-code-lang {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  border: 1px solid #ded8d2;
  border-radius: 0.55rem;
  background: #fff;
  padding: 0 0.65rem;
  color: #3f3f46;
  font-size: 0.78rem;
  font-family: "JetBrains Mono", Consolas, monospace;
  line-height: 1;
}

.post-content .rinvay-code-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.post-content .rinvay-code-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.8rem;
  min-width: 1.8rem;
  border: 1px solid rgba(37, 99, 235, 0.28);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.72);
  color: #2563eb;
  font-size: 0.76rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.post-content .rinvay-code-btn:hover {
  background: #fff;
  border-color: rgba(37, 99, 235, 0.55);
  transform: translateY(-1px);
}

.post-content .rinvay-code-lines {
  counter-reset: rinvay-code-line;
}

.post-content .rinvay-code-line {
  display: block;
  position: relative;
  min-height: 1.72em;
  padding-left: 3.15rem;
}

.post-content .rinvay-code-line::before {
  counter-increment: rinvay-code-line;
  content: counter(rinvay-code-line);
  position: absolute;
  left: 0;
  width: 2rem;
  color: #9ca3af;
  text-align: right;
  user-select: none;
}

.post-content .rinvay-code-line::after {
  content: "";
  position: absolute;
  left: 2.6rem;
  top: 0.2em;
  bottom: 0.2em;
  width: 1px;
  background: rgba(148, 163, 184, 0.24);
}

.post-content .rinvay-code-card.is-expanded pre code {
  max-height: none;
}

.post-content pre code::-webkit-scrollbar {
  height: 8px;
}

.post-content pre code::-webkit-scrollbar-track {
  background: transparent;
}

.post-content pre code::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.45);
}

.post-content pre code::-webkit-scrollbar-thumb:hover {
  background: rgba(107, 114, 128, 0.62);
}

@media (max-width: 640px) {
  .post-article {
    margin-top: 2rem;
  }

  .post-content {
    font-size: 14.5px;
  }

  .post-content h1 { font-size: 1.32rem; }
  .post-content h2 { font-size: 1.18rem; }
  .post-content h3,
  .post-content h4,
  .post-content h5,
  .post-content h6 { font-size: 0.98rem; }

  .post-content .rinvay-code-toolbar {
    padding: 0.5rem 0.58rem;
  }

  .post-content pre code {
    padding: 0.9rem 0.78rem;
    font-size: 0.82rem;
  }

  .post-content .rinvay-code-line {
    padding-left: 2.55rem;
  }

  .post-content .rinvay-code-line::before {
    width: 1.55rem;
  }

  .post-content .rinvay-code-line::after {
    left: 2.12rem;
  }
}

/* Post License */
.post-license {
  margin: 2rem 0;
  border-radius: 0.5rem;
  border-left: 4px solid #eb5055;
  background: #fff1f1;
  padding: 1rem;
  font-size: 0.875rem;
  color: #6b7280;
}

/* Post Share */
.post-share {
  margin: 1.5rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.post-share a {
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
  padding: 0.375rem 1rem;
  font-size: 0.75rem;
  color: #6b7280;
}
.post-share a:hover {
  border-color: #eb5055;
  color: #eb5055;
}

/* Post Nav */
.post-nav {
  margin: 2rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  border-top: 1px solid #e5e7eb;
  padding-top: 1.5rem;
}
.post-nav-label {
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: #9ca3af;
  text-transform: uppercase;
}
.post-nav a {
  font-size: 0.875rem;
  color: #4b5563;
}
.post-nav a:hover {
  color: #eb5055;
}

/* Bottom Bar */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: 3rem;
  border-top: 1px solid #e5e7eb;
  background: white;
  display: none;
}
@media (min-width: 768px) {
  .bottom-bar { display: block; }
}
.bottom-bar .container {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: space-between;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.bottom-bar-share {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: #6b7280;
}
.bottom-bar-share a:hover {
  color: #eb5055;
}
.bottom-bar-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Comments */
.comments-section {
  margin-top: 2.75rem;
  margin-bottom: 2.75rem;
  padding: 0;
  background: transparent;
}
.comments-title {
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
  font-weight: 600;
}
.comment-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #e5e7eb;
}
.comment-avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  flex-shrink: 0;
}
.comment-reply-btn {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #eb5055;
  cursor: pointer;
}
.comment-reply-btn:hover {
  color: #d44045;
}

/* Comment Form */
.comment-form {
  margin-top: 2rem;
  border-radius: 0.5rem;
  background: white;
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.comment-form h4 {
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 600;
}
.comment-form-row {
  margin-bottom: 1rem;
  display: flex;
  gap: 0.75rem;
}
.comment-form input {
  flex: 1;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  outline: none;
}
.comment-form input:focus {
  border-color: #eb5055;
}
.comment-form textarea {
  margin-bottom: 1rem;
  width: 100%;
  min-height: 100px;
  resize: vertical;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  outline: none;
}
.comment-form textarea:focus {
  border-color: #eb5055;
}
.comment-form button {
  border-radius: 0.5rem;
  background: #eb5055;
  padding: 0.625rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: white;
  border: none;
  cursor: pointer;
}
.comment-form button:hover {
  background: #d44045;
}

/* Rinvay comment form / OwO emoji panel */
.comments-section {
  width: min(100% - 40px, 820px);
  max-width: 820px;
  margin: 2.75rem auto;
  padding: 0;
  background: transparent;
}
.comment-form {
  position: relative;
  margin: 0 0 40px;
  padding: 18px 22px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #f0f0f0;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}
.comment-form .form-control {
  font-size: 14px;
  display: block;
  width: 100%;
  height: 34px;
  color: #313131;
  outline: 0;
}
.comment-form .form-control:focus {
  border-color: #eb5055;
  outline: 0;
}
.comment-form textarea.form-control {
  overflow: hidden;
  height: 168px;
  min-height: 168px;
  padding: 10px 0;
  resize: none;
  border-radius: 0;
  border: none;
  border-bottom: 1px dashed #ddd;
}
.comment-form .input-control {
  float: left;
  width: 100%;
  max-width: 240px;
  border: none;
  border-bottom: 1px dashed #ddd;
  border-radius: 0;
  background: transparent;
  padding: 0;
}
.comment-form .input-control:focus {
  border-color: #eb5055;
}
.comment-form .submit {
  font-size: 12px;
  position: absolute;
  right: 20px;
  bottom: 18px;
  display: block;
  height: 28px;
  margin: 0 auto;
  padding: 0 20px;
  transition-duration: 0.4s;
  text-align: center;
  line-height: 28px;
  color: #313131;
  border: 1px solid #f7f7f7;
  border-radius: 30px;
  background-color: #f7f7f7;
  cursor: pointer;
}
.comment-form .submit:hover,
.comment-form .submit:active,
.comment-form .submit:focus {
  color: #eb5055;
  border: 1px solid #eb5055;
  outline-style: none;
  background-color: #fff;
}
.comment-form .submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.comment-form .OwO {
  display: inline-block;
  position: relative;
  margin-top: 14px;
}
.comment-form .OwO .OwO-logo {
  display: inline-block;
  color: #888;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  padding: 2px 5px;
  cursor: pointer;
  height: 22px;
  box-sizing: border-box;
  z-index: 1;
  line-height: 16px;
  transition: color .2s;
}
.comment-form .OwO .OwO-logo:hover {
  color: #444;
}
.comment-form .OwO.OwO-open .OwO-logo {
  border-radius: 4px 4px 0 0;
  border-bottom: none;
  color: #444;
}
.comment-form .OwO .OwO-body {
  display: none;
  position: absolute;
  top: 26px;
  bottom: auto;
  left: 0;
  width: min(400px, calc(100vw - 48px));
  background: #fff;
  border: 1px solid #ddd;
  z-index: 10;
  border-radius: 0 4px 4px 4px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}
.comment-form .OwO.OwO-open .OwO-body {
  display: block;
}
.comment-form .OwO .OwO-body .OwO-items {
  display: none;
  padding: 10px;
  margin: 0;
  overflow-y: auto;
  overflow-x: hidden;
  font-size: 0;
  max-height: 197px;
}
.comment-form .OwO .OwO-body .OwO-items-show {
  display: block;
}
.comment-form .OwO .OwO-body .OwO-items .OwO-item {
  list-style: none;
  background: #f7f7f7;
  padding: 5px 10px;
  border-radius: 5px;
  display: inline-block;
  font-size: 12px;
  line-height: 14px;
  margin: 0 6px 6px 0;
  cursor: pointer;
  transition: 0.3s;
  user-select: none;
}
.comment-form .OwO .OwO-body .OwO-items .OwO-item:hover {
  background: #eee;
  box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14),0 3px 1px -2px rgba(0,0,0,0.2),0 1px 5px 0 rgba(0,0,0,0.12);
}
.comment-form .OwO .OwO-body .OwO-items-emoji .OwO-item {
  font-size: 20px;
  line-height: 19px;
  padding: 6px;
  margin: 0 4px 4px 0;
}
.comment-form .OwO .OwO-body .OwO-bar {
  width: 100%;
  height: 30px;
  border-top: 1px solid #ddd;
  background: #fff;
  border-radius: 0 0 4px 4px;
  color: #444;
}
.comment-form .OwO .OwO-body .OwO-bar .OwO-packages {
  margin: 0;
  padding: 0;
  font-size: 0;
}
.comment-form .OwO .OwO-body .OwO-bar .OwO-packages li {
  list-style: none;
  display: inline-block;
  line-height: 30px;
  font-size: 14px;
  padding: 0 10px;
  cursor: pointer;
  margin-right: 3px;
}
.comment-form .OwO .OwO-body .OwO-bar .OwO-packages li:first-child {
  border-radius: 0 0 0 3px;
}
.comment-form .OwO .OwO-body .OwO-bar .OwO-packages li.OwO-package-active {
  background: #f0f0f0;
}
.comment-success {
  padding: 1rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 3px;
  color: #166534;
  text-align: center;
}
.comment-error {
  padding: 0.5rem 0.75rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 3px;
  color: #991b1b;
  font-size: 12px;
  margin-bottom: 0.5rem;
}
.reply-hint {
  padding: 0.5rem 0.75rem;
  background: #f5f3ff;
  border: 1px solid #c4b5fd;
  border-radius: 3px;
  color: #5b21b6;
  font-size: 12px;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.reply-cancel {
  background: none !important;
  border: none !important;
  color: #eb5055 !important;
  cursor: pointer;
  font-size: 12px !important;
  padding: 0 !important;
}
.comment-body {
  flex: 1;
  min-width: 0;
}
.comment-author {
  font-weight: 500;
  color: #313131;
  font-size: 13px;
}
.comment-author a {
  color: #5e6ad2;
  text-decoration: none;
}
.comment-author a:hover {
  text-decoration: underline;
}
.comment-time {
  font-size: 12px;
  color: #999;
  margin-left: 0.5rem;
}
.comment-content {
  margin: 0.5rem 0;
  font-size: 13px;
  color: #313131;
  line-height: 1.6;
  word-break: break-word;
}

@media (max-width: 760px) {
  .post-article,
  .page-article,
  .comments-section {
    width: min(100% - 28px, 820px);
  }
  .post-article,
  .page-article {
    padding-top: 0;
    overflow-x: hidden;
  }
  .comment-form {
    padding: 16px;
  }
  .comment-form .input-control {
    float: none;
    max-width: none;
  }
  .comment-form .submit {
    position: static;
    margin-top: 12px;
  }
}

/* Footer */
.site-footer {
  background: white;
  border-top: 1px solid #e5e7eb;
  margin-top: 2rem;
}
.footer-social {
  border-bottom: 1px solid #f3f4f6;
  padding: 1.5rem 0;
}
.footer-social .container {
  display: flex;
  justify-content: center;
  gap: 2rem;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2.25rem);
}
.footer-social a {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #9ca3af;
  text-transform: uppercase;
}
.footer-social a:hover {
  color: #eb5055;
}
.footer-meta {
  padding: 2.5rem 0;
}
.footer-meta .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2.25rem);
  align-items: start;
}
@media (min-width: 768px) {
  .footer-meta .container {
    grid-template-columns: minmax(220px, 320px) minmax(260px, 320px) minmax(300px, 360px);
    justify-content: space-between;
    column-gap: clamp(2rem, 7vw, 7.5rem);
  }
}
.footer-brand {
  min-width: 0;
}
.footer-brand-inner {
  display: inline-flex;
  max-width: 100%;
  flex-direction: column;
  align-items: flex-start;
}
.footer-brand-logo {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.82rem;
}
.footer-logo {
  display: block;
  width: auto;
  height: 32px;
}
.footer-column {
  min-width: 0;
}
.footer-meta-title {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  font-weight: 680;
  letter-spacing: 0.06em;
  color: #9ca3af;
  text-transform: uppercase;
}
.footer-meta ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-meta li {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #6b7280;
  margin-bottom: 0.42rem;
}
.footer-meta a {
  color: #6b7280;
  transition: color 0.18s ease, transform 0.18s ease;
}
.footer-meta a:hover {
  color: #eb5055;
}
.footer-copyright {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.34rem;
  font-size: 0.86rem;
  line-height: 1.45;
  color: #98a2b3;
}
.footer-copyright p {
  margin: 0;
}
.footer-copyright p:first-child {
  color: #667085;
}
.footer-copyright a {
  color: #98a2b3;
}
.footer-copyright a:hover {
  color: #eb5055;
}
.footer-running {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  font-size: 0.78rem;
  line-height: 1.25;
  color: #a8b0bf;
  white-space: nowrap;
}
@media (min-width: 768px) {
  .footer-posts {
    padding-left: clamp(2.2rem, 5vw, 5.3rem);
  }
  .footer-comments {
    padding-left: clamp(1rem, 1.6vw, 1.5rem);
  }
}
@media (max-width: 767px) {
  .footer-meta .container {
    gap: 1.6rem;
  }
  .footer-brand {
    text-align: center;
  }
  .footer-brand-inner {
    align-items: center;
  }
  .footer-brand-logo,
  .footer-copyright {
    align-items: center;
  }
  .footer-copyright {
    text-align: center;
  }
  .footer-column {
    text-align: center;
  }
  .footer-meta ul {
    display: grid;
    gap: 0.35rem;
  }
  .footer-meta li {
    margin-bottom: 0;
  }
}
@media (max-width: 640px) {
  .site-footer {
    margin-top: 34px;
  }
  .footer-social {
    padding: 18px 0;
  }
  .footer-social .container {
    gap: 18px;
    flex-wrap: wrap;
  }
  .footer-meta {
    padding: 24px 0 30px;
  }
  .footer-meta .container {
    gap: 0;
  }
  .footer-posts,
  .footer-comments {
    display: none;
  }
  .footer-brand-inner {
    gap: 14px;
  }
  .footer-brand-logo {
    margin-bottom: 0;
  }
  .footer-running {
    margin: 8px auto 0;
  }
}

/* Archive */
.archive-group {
  margin-bottom: 2rem;
}
.archive-group h2 {
  margin-bottom: 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #eb5055;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 0.5rem;
}
.archive-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px dashed #f3f4f6;
}
.archive-list .date {
  font-size: 0.75rem;
  color: #9ca3af;
}

/* Category Grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (min-width: 768px) {
  .category-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .category-grid { grid-template-columns: repeat(4, 1fr); }
}
.category-card {
  border-radius: 0.5rem;
  background: white;
  padding: 1.25rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: all 0.3s;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.category-card h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.category-card .count {
  font-size: 0.75rem;
  color: #9ca3af;
}

/* Search */
.search-box {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.search-box input {
  flex: 1;
  border-radius: 9999px;
  border: 2px solid #e5e7eb;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  outline: none;
}
.search-box input:focus {
  border-color: #eb5055;
}
.search-box button {
  border-radius: 9999px;
  background: #eb5055;
  padding: 0.75rem 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: white;
  border: none;
  cursor: pointer;
}
.search-box button:hover {
  background: #d44045;
}
.search-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem 0;
}
.search-tags a {
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
  padding: 0.375rem 1rem;
  font-size: 0.75rem;
  color: #6b7280;
}
.search-tags a:hover {
  border-color: #eb5055;
  color: #eb5055;
}

/* Links */
.links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
@media (min-width: 768px) {
  .links-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .links-grid { grid-template-columns: repeat(4, 1fr); }
}
.link-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 0.5rem;
  background: white;
  padding: 0.75rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: all 0.3s;
}
.link-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.link-card img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  object-fit: cover;
  flex-shrink: 0;
}
.link-card-name {
  font-size: 0.875rem;
  font-weight: 500;
}
.link-card-desc {
  font-size: 0.75rem;
  color: #9ca3af;
}
.link-rules {
  border-radius: 0.5rem;
  border-left: 4px solid #eb5055;
  background: #fff1f1;
  padding: 1rem;
  font-size: 0.875rem;
  color: #6b7280;
}

/* 404 Page */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
}
.error-page h1 {
  font-size: 6rem;
  font-weight: 800;
  background: linear-gradient(to right, #eb5055, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.error-page p {
  margin-top: 1rem;
  color: #6b7280;
}
.error-page a {
  margin-top: 1.5rem;
  display: inline-block;
  border-radius: 9999px;
  background: #eb5055;
  padding: 0.75rem 2rem;
  color: white;
}
.error-page a:hover {
  background: #d44045;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 0;
}
.pagination a,
.pagination span {
  display: inline-flex;
  height: 2.25rem;
  min-width: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  color: #6b7280;
}
.pagination a:hover {
  border-color: #eb5055;
  color: #eb5055;
}
.pagination .current {
  background: #eb5055;
  color: white;
  border-color: #eb5055;
}

/* Scroll to Top */
#scroll-top.scroll-top,
#scroll-top {
  position: fixed;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(18px, 4vw, 42px);
  z-index: 80;
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.92);
  color: #667085;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.10);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  transition: transform 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
#scroll-top.visible,
#scroll-top.scroll-top.visible {
  display: flex;
}
#scroll-top svg {
  width: 20px;
  height: 20px;
}
#scroll-top:hover {
  color: #eb5055;
  border-color: rgba(235, 80, 85, 0.42);
  box-shadow: 0 14px 32px rgba(235, 80, 85, 0.16);
  transform: translateY(-2px);
}

/* Progress Bar */
#nprogress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: none;
}
#nprogress.active {
  display: block;
}
.nprogress-bar {
  height: 2px;
  background: #eb5055;
  animation: nprogress 0.5s ease-in-out;
}
@keyframes nprogress {
  0% { width: 0; }
  100% { width: 100%; }
}

/* Lazy Image */
img[data-src] {
  opacity: 0;
  transition: opacity 0.3s;
}
img.loaded {
  opacity: 1;
}

html.is-pjax-loading main {
  opacity: .72;
  transition: opacity .16s ease;
}

/* Reply indicator */
.reply-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: #fff1f1;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: #eb5055;
}

/* Simple Search Page */
.search-page {
  min-height: auto;
}
.search-shell {
  width: min(900px, calc(100% - 40px));
  margin: 0 auto;
}
.search-header {
  max-width: 760px;
  margin: 0 auto 22px;
}
.search-summary {
  margin: -0.15rem auto 1.35rem;
  color: #8a8f98;
  font-size: 14px;
  line-height: 1.75;
}
.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  max-width: 620px;
  margin: 0 auto;
  padding: 6px;
  border: 1px solid #ececec;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.045);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.search-form:focus-within {
  border-color: rgba(235, 80, 85, 0.28);
  box-shadow: 0 10px 26px rgba(235, 80, 85, 0.08);
}
.search-input-wrap {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  padding-left: 14px;
  color: #a4a8ae;
}
.search-input-wrap svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}
.search-form input {
  width: 100%;
  height: 42px;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #333;
  font-size: 14px;
}
.search-form input::placeholder {
  color: #b1b5bb;
}
.search-form button {
  height: 42px;
  border: 0;
  border-radius: 12px;
  padding: 0 20px;
  color: #fff;
  background: #eb5055;
  font-size: 14px;
  font-weight: 520;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.search-form button:hover {
  background: #e2444a;
  transform: translateY(-1px);
}
.search-panel {
  margin-top: 18px;
  padding: 18px 22px;
  border: 1px solid #f0f0f0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.035);
}
.search-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 12px;
}
.search-section-head h2 {
  margin: 0;
  color: #333;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 540;
  letter-spacing: -0.02em;
}
.search-section-head em {
  color: #aaa;
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}
.search-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 9px;
  padding: 0;
}
.search-tags a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 5px 6px 5px 12px;
  border-radius: 999px;
  border: 1px solid #eeeeee;
  background: #fafafa;
  color: #696f7a;
  font-size: 13px;
  font-weight: 450;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}
.search-tags a:hover {
  border-color: rgba(235, 80, 85, 0.22);
  background: #fff7f7;
  color: #eb5055;
}
.search-tag-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #fff;
  color: #a2a7ae;
  font-size: 12px;
  font-weight: 520;
  box-shadow: inset 0 0 0 1px #eeeeee;
}
.search-tags a:hover .search-tag-count {
  color: #eb5055;
}
.search-result-list {
  display: grid;
  gap: 0;
}
.search-result-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 14px 0;
  border-bottom: 1px solid #f3f3f3;
}
.search-result-item:last-child {
  border-bottom: 0;
}
.search-result-item a {
  display: inline-flex;
  color: #333;
  font-size: 15px;
  font-weight: 540;
  line-height: 1.45;
}
.search-result-item a:hover {
  color: #eb5055;
}
.search-result-item p {
  margin: 0.35rem 0 0;
  color: #777;
  font-size: 13px;
  line-height: 1.65;
}
.search-result-item time {
  flex: 0 0 auto;
  margin-top: 2px;
  color: #aaa;
  font-size: 12px;
  white-space: nowrap;
}
.search-empty {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  padding: 2rem 1rem;
  color: #9aa0a8;
  text-align: center;
  font-size: 14px;
}
.search-empty strong {
  color: #555;
  font-size: 15px;
  font-weight: 540;
}
.search-empty p {
  margin: 0;
}
.search-empty-compact {
  width: 100%;
  padding: 1rem;
}
@media (max-width: 640px) {
  .search-shell {
    width: min(100% - 28px, 900px);
  }
  .search-form {
    grid-template-columns: 1fr;
    border-radius: 18px;
    padding: 8px;
  }
  .search-input-wrap {
    min-height: 42px;
    padding-left: 10px;
  }
  .search-form button {
    width: 100%;
  }
  .search-panel {
    padding: 18px 16px;
    border-radius: 16px;
  }
  .search-result-item {
    flex-direction: column;
    gap: 0.35rem;
  }
}



.footer-logo {
  display: block;
  height: 32px;
  width: auto;
}

/* Comment polish: unified reply flow and avatar fallback */
.comments-heading {
  margin: 0 0 18px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 520;
  color: #222;
  letter-spacing: -0.02em;
}
.comment-item {
  align-items: flex-start;
  gap: 14px;
  padding: 18px 0;
}
.comment-body {
  flex: 1;
  min-width: 0;
}
.comment-avatar {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 50%;
  background: #f6f7fb url('/static/img/default-avatar.svg') center/cover no-repeat;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}
.comment-author { font-size: 14px; font-weight: 520; color: #2f3441; }
.comment-time { margin-left: 8px; font-size: 12px; color: #9ca3af; }
.comment-content { margin-top: 8px; color: #4b5563; line-height: 1.75; font-size: 14px; }
.comment-reply-btn {
  border: 0;
  background: transparent;
  padding: 0;
  margin-top: 8px;
  color: #eb5055;
  font-size: 12px;
  line-height: 1.6;
}
.comment-reply-btn:hover { color: #d44045; background: transparent; }
.reply-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(235, 80, 85, 0.16);
  border-radius: 12px;
  background: rgba(235, 80, 85, 0.055);
  color: #d44045;
  font-size: 13px;
}
.reply-cancel {
  border: 0 !important;
  background: transparent !important;
  color: #8b95a5 !important;
  padding: 0 !important;
  font-size: 12px !important;
  cursor: pointer;
}
.comment-success,
.comment-error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
}
.comment-success { color: #15803d; background: rgba(34, 197, 94, 0.10); }
.comment-error { color: #dc2626; background: rgba(239, 68, 68, 0.10); }
.comment-children {
  margin-top: 14px;
  padding-left: 16px;
  border-left: 2px solid rgba(15, 23, 42, 0.06);
}
.comment-children .comment-avatar { width: 36px; height: 36px; }
.comment-children .comment-item { padding: 12px 0; }
@media (max-width: 640px) {
  .comments-section { width: min(100% - 28px, 820px); }
  .comment-item { gap: 10px; }
  .comment-avatar { width: 38px; height: 38px; }
}

/* Threaded comments: compact infinite reply tree */
.comment-tree {
  margin-top: 22px;
}
.comment-tree > .comment-item:first-child {
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}
.comment-tree .comment-item {
  position: relative;
  display: flex;
  gap: 13px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.comment-tree .comment-children {
  margin-top: 10px;
  margin-left: clamp(12px, calc(10px + min(var(--depth, 0), 2) * 4px), 24px);
  padding-left: 18px;
  border-left: 1px solid rgba(235, 80, 85, 0.16);
}
.comment-tree .comment-children .comment-item {
  padding: 12px 0;
  border-bottom: 0;
}
.comment-tree .comment-children .comment-item::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 30px;
  width: 12px;
  height: 1px;
  background: rgba(235, 80, 85, 0.18);
}
.comment-headline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.comment-tree .comment-content {
  margin-top: 6px;
  line-height: 1.72;
}
.comment-tree .comment-reply-btn {
  margin-top: 6px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(235, 80, 85, 0.06);
  color: #dc474d;
  font-size: 12px;
}
.comment-tree .comment-reply-btn:hover {
  background: rgba(235, 80, 85, 0.11);
}
.reply-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  height: 28px;
  margin: 8px 0 2px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(235, 80, 85, 0.07);
  color: #d44045;
  font-size: 12px;
}
.reply-chip .reply-cancel {
  color: #8b95a5 !important;
}
@media (max-width: 640px) {
  .comment-tree .comment-children {
    margin-left: 4px;
    padding-left: 12px;
  }
  .comment-tree .comment-children .comment-item::before {
    left: -12px;
    width: 8px;
  }
}

/* Comment v2: airy threaded discussion without boxed nesting */
.comment-tree {
  margin-top: 26px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}
.comment-tree .comment-item {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  padding: 22px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
  background: transparent !important;
  box-shadow: none !important;
}
.comment-tree .comment-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}
.comment-tree .comment-body {
  min-width: 0;
}
.comment-headline {
  display: flex;
  align-items: baseline;
  gap: 9px;
  flex-wrap: wrap;
  min-height: 24px;
}
.comment-tree .comment-author,
.comment-tree .comment-author a {
  color: #1f2937;
  font-size: 15px;
  font-weight: 520;
  line-height: 1.35;
}
.comment-tree .comment-author a:hover {
  color: #eb5055;
  text-decoration: none;
}
.comment-tree .comment-time {
  margin-left: 0;
  color: #9aa4b2;
  font-size: 12px;
}
.comment-tree .comment-content {
  margin-top: 7px;
  color: #334155;
  font-size: 15px;
  line-height: 1.78;
  letter-spacing: 0.005em;
}
.comment-tree .comment-reply-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  margin-top: 8px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #eb5055;
  font-size: 12px;
  line-height: 1;
  transition: .16s ease;
}
.comment-tree .comment-reply-btn:hover {
  background: rgba(235, 80, 85, 0.08);
  color: #d83f45;
}
.comment-tree .comment-children {
  position: relative;
  grid-column: 2;
  margin-top: 14px;
  margin-left: 0;
  padding-left: 20px;
  border-left: 1px solid rgba(148, 163, 184, 0.34);
}
.comment-tree .comment-children::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 0;
  width: 1px;
  height: 34px;
  background: linear-gradient(#eb5055, rgba(235,80,85,0));
}
.comment-tree .comment-children .comment-item {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 16px 0 0;
  border-bottom: 0;
}
.comment-tree .comment-children .comment-item::before {
  display: none;
}
.comment-tree .comment-children .comment-avatar {
  width: 34px;
  height: 34px;
  box-shadow: none;
}
.comment-tree .comment-children .comment-author,
.comment-tree .comment-children .comment-author a {
  font-size: 14px;
}
.comment-tree .comment-children .comment-content {
  font-size: 14px;
  line-height: 1.72;
}
.comment-tree .comment-children .comment-children {
  margin-top: 10px;
  padding-left: 16px;
}
.comment-tree .comment-children .comment-children .comment-item {
  grid-template-columns: 30px minmax(0, 1fr);
}
.comment-tree .comment-children .comment-children .comment-avatar {
  width: 30px;
  height: 30px;
}
.reply-chip {
  background: rgba(235, 80, 85, 0.08);
  border: 1px solid rgba(235, 80, 85, 0.12);
}
@media (max-width: 640px) {
  .comment-tree .comment-item {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 11px;
    padding: 18px 0;
  }
  .comment-tree .comment-avatar {
    width: 36px;
    height: 36px;
  }
  .comment-tree .comment-children {
    grid-column: 1 / -1;
    margin-left: 18px;
    padding-left: 14px;
  }
  .comment-tree .comment-children .comment-item,
  .comment-tree .comment-children .comment-children .comment-item {
    grid-template-columns: 30px minmax(0, 1fr);
  }
}

/* Comment v4: compact modern thread, no boxed nesting */
.comments-section {
  width: min(100% - 40px, 820px);
  max-width: 820px;
  margin: 3.2rem auto 3.8rem;
  padding: 0;
  background: transparent;
}
.comments-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: #1f2937;
  font-size: 17px;
  font-weight: 520;
  line-height: 1.35;
  letter-spacing: -0.015em;
}
.comments-heading::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #eb5055;
  box-shadow: 0 0 0 6px rgba(235, 80, 85, 0.08);
}
.comment-form {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 28px;
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.055);
  backdrop-filter: blur(14px);
}
.comment-form .input-control {
  float: none;
  width: 100%;
  max-width: none;
  height: 40px;
  padding: 0 2px;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 0;
  background: transparent;
  color: #1f2937;
  font-size: 13px;
}
.comment-form .input-control:focus,
.comment-form textarea.form-control:focus {
  border-color: rgba(235, 80, 85, 0.72);
}
.comment-form textarea.form-control {
  grid-column: 1 / -1;
  width: 100%;
  height: 132px;
  min-height: 132px;
  margin: 0;
  padding: 12px 2px;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 0;
  background: transparent;
  color: #313131;
  font-size: 14px;
  line-height: 1.72;
  resize: vertical;
}
.reply-chip,
.reply-hint {
  grid-column: 1 / -1;
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin: 2px 0 0;
  padding: 7px 10px 7px 12px;
  border: 1px solid rgba(235, 80, 85, 0.14);
  border-radius: 999px;
  background: rgba(235, 80, 85, 0.07);
  color: #d83f45;
  font-size: 12px;
  line-height: 1;
}
.reply-chip span,
.reply-hint span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reply-cancel {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 18px !important;
  padding: 0 2px !important;
  border: 0 !important;
  background: transparent !important;
  color: #8b95a5 !important;
  font-size: 12px !important;
  line-height: 1 !important;
  cursor: pointer;
}
.comment-form .submit {
  position: static;
  grid-column: 3;
  justify-self: end;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  height: 34px;
  margin: 2px 0 0;
  padding: 0 18px;
  border: 1px solid rgba(235, 80, 85, 0.16);
  border-radius: 999px;
  background: #eb5055;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(235, 80, 85, 0.18);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.comment-form .submit:hover,
.comment-form .submit:active,
.comment-form .submit:focus {
  border-color: rgba(216, 63, 69, 0.22);
  background: #d83f45;
  color: #fff;
  box-shadow: 0 12px 26px rgba(235, 80, 85, 0.24);
  transform: translateY(-1px);
}
.comment-form .OwO {
  grid-column: 1 / 3;
  align-self: center;
  margin: 2px 0 0;
}
.comment-form .OwO .OwO-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.86);
  color: #64748b;
  font-size: 12px;
  line-height: 1;
}
.comment-form .OwO.OwO-open .OwO-logo {
  border-radius: 999px;
  border-color: rgba(235, 80, 85, 0.26);
  color: #d83f45;
  background: rgba(235, 80, 85, 0.06);
}
.comment-form .OwO .OwO-body {
  top: 38px;
  bottom: auto;
  width: min(420px, calc(100vw - 48px));
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.14);
  overflow: hidden;
}
.comment-success,
.comment-error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
  text-align: left;
}
.comment-success {
  border: 1px solid rgba(34, 197, 94, 0.14);
  background: rgba(34, 197, 94, 0.08);
  color: #15803d;
}
.comment-error {
  border: 1px solid rgba(239, 68, 68, 0.14);
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626;
}
.comment-tree {
  margin-top: 20px;
  border-top: 1px solid rgba(15, 23, 42, 0.075);
}
.comment-tree .comment-item {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background: transparent !important;
  box-shadow: none !important;
}
.comment-tree .comment-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: #f6f7fb url('/static/img/default-avatar.svg') center/cover no-repeat;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}
.comment-tree .comment-body {
  min-width: 0;
}
.comment-tree .comment-headline {
  display: flex;
  align-items: baseline;
  gap: 9px;
  flex-wrap: wrap;
  min-height: 22px;
}
.comment-tree .comment-author,
.comment-tree .comment-author a {
  color: #1f2937;
  font-size: 15px;
  font-weight: 520;
  line-height: 1.35;
}
.comment-tree .comment-author a:hover {
  color: #eb5055;
  text-decoration: none;
}
.comment-tree .comment-time {
  margin-left: 0;
  color: #9aa4b2;
  font-size: 12px;
}
.comment-tree .comment-content {
  margin: 7px 0 0;
  color: #334155;
  font-size: 15px;
  line-height: 1.78;
  letter-spacing: 0.005em;
}
.comment-tree .comment-reply-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  margin-top: 8px;
  padding: 0 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #eb5055;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transition: .16s ease;
}
.comment-tree .comment-reply-btn:hover {
  background: rgba(235, 80, 85, 0.08);
  color: #d83f45;
}
.comment-tree .comment-children {
  position: relative;
  display: block;
  margin: 14px 0 0 !important;
  padding: 0 0 0 18px !important;
  border: 0 !important;
  border-left: 1px solid rgba(148, 163, 184, 0.32) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.comment-tree .comment-children::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 0;
  width: 1px;
  height: 30px;
  background: linear-gradient(#eb5055, rgba(235, 80, 85, 0));
}
.comment-tree .comment-children .comment-item {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0 0;
  border-bottom: 0;
}
.comment-tree .comment-children .comment-item::before {
  display: none !important;
}
.comment-tree .comment-children .comment-avatar {
  width: 34px;
  height: 34px;
  box-shadow: none;
}
.comment-tree .comment-children .comment-author,
.comment-tree .comment-children .comment-author a,
.comment-tree .comment-children .comment-content {
  font-size: 14px;
}
.comment-tree .comment-children .comment-content {
  line-height: 1.72;
}
.comment-tree .comment-children .comment-children {
  margin-top: 10px !important;
  padding-left: 15px !important;
}
.comment-tree .comment-children .comment-children .comment-item {
  grid-template-columns: 30px minmax(0, 1fr);
}
.comment-tree .comment-children .comment-children .comment-avatar {
  width: 30px;
  height: 30px;
}
@media (max-width: 760px) {
  .comments-section {
    width: min(100% - 28px, 820px);
    margin-top: 2.4rem;
  }
  .comment-form {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 16px;
    border-radius: 18px;
  }
  .comment-form textarea.form-control,
  .reply-chip,
  .reply-hint,
  .comment-form .OwO,
  .comment-form .submit {
    grid-column: 1;
  }
  .comment-form .submit {
    justify-self: stretch;
    width: 100%;
  }
  .comment-tree .comment-item {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 11px;
    padding: 18px 0;
  }
  .comment-tree .comment-avatar {
    width: 36px;
    height: 36px;
  }
  .comment-tree .comment-children {
    margin-left: 0 !important;
    padding-left: 13px !important;
  }
  .comment-tree .comment-children .comment-item,
  .comment-tree .comment-children .comment-children .comment-item {
    grid-template-columns: 30px minmax(0, 1fr);
  }
}
.comment-tree .comment-item.reply-target::after {
  content: "";
  position: absolute;
  inset: 10px -12px 10px -12px;
  z-index: -1;
  border-radius: 18px;
  background: rgba(235, 80, 85, 0.055);
  animation: reply-target-fade 1.4s ease forwards;
}
@keyframes reply-target-fade {
  0% { opacity: 0; transform: scale(0.995); }
  18% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1); }
}
.comment-form .submit,
.comment-form .submit[type="submit"] {
  background: #eb5055 !important;
  color: #fff !important;
}
.comment-form .submit:hover,
.comment-form .submit:active,
.comment-form .submit:focus,
.comment-form .submit[type="submit"]:hover,
.comment-form .submit[type="submit"]:active,
.comment-form .submit[type="submit"]:focus {
  background: #d83f45 !important;
  color: #fff !important;
}
.reply-float-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin-top: 9px;
  padding: 6px 9px 6px 10px;
  border-radius: 999px;
  background: rgba(235, 80, 85, 0.075);
  color: #d83f45;
  font-size: 12px;
  line-height: 1;
}
.reply-float-bar span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reply-float-bar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: #8b95a5;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

/* Comment v6: fix emoji popover hit area and scroll */
.comment-form {
  overflow: visible !important;
}
.comment-form .OwO {
  position: relative;
  z-index: 8;
}
.comment-form .OwO.OwO-open {
  z-index: 40;
}
.comment-form .OwO .OwO-body {
  top: 38px !important;
  bottom: auto !important;
  left: 0;
  z-index: 999 !important;
  display: none;
  max-height: 300px;
  overflow: hidden !important;
  pointer-events: auto;
}
.comment-form .OwO.OwO-open .OwO-body {
  display: flex !important;
  flex-direction: column;
}
.comment-form .OwO .OwO-body .OwO-items {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 246px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain;
  padding: 12px 14px !important;
  scrollbar-width: thin;
}
.comment-form .OwO .OwO-body .OwO-items .OwO-item {
  position: relative;
  z-index: 1;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  min-height: 34px;
  margin: 0 7px 8px 0 !important;
  padding: 6px 10px !important;
  border-radius: 9px !important;
  background: rgba(248, 250, 252, 0.92) !important;
  color: #334155;
  cursor: pointer;
  user-select: none;
  pointer-events: auto;
}
.comment-form .OwO .OwO-body .OwO-items .OwO-item:hover {
  background: rgba(235, 80, 85, 0.08) !important;
  color: #d83f45;
  box-shadow: none !important;
}
.comment-form .OwO .OwO-body .OwO-bar {
  flex: 0 0 38px;
  height: 38px !important;
  border-top: 1px solid rgba(15, 23, 42, 0.08) !important;
  background: rgba(255, 255, 255, 0.96) !important;
  color: #64748b;
}
.comment-form .OwO .OwO-body .OwO-bar .OwO-packages li {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  height: 38px;
  line-height: 1 !important;
}
.comment-form .OwO .OwO-body .OwO-bar .OwO-packages li.OwO-package-active {
  background: rgba(235, 80, 85, 0.08) !important;
  color: #d83f45;
}
@media (max-width: 760px) {
  .comment-form .OwO .OwO-body {
    width: min(360px, calc(100vw - 56px));
  }
}

/* Comment v7: emoji panel stays inside form, no overlap with comment list */
.comment-form:has(.OwO-open) {
  z-index: 30;
}
.comment-form .OwO.OwO-open {
  grid-column: 1 / -1;
  width: 100%;
}
.comment-form .OwO.OwO-open .OwO-body {
  position: static !important;
  display: flex !important;
  width: min(620px, 100%) !important;
  max-height: 286px !important;
  margin-top: 10px;
  border-radius: 18px;
  transform: none !important;
}
.comment-form .OwO.OwO-open .OwO-body .OwO-items {
  max-height: 232px !important;
  -webkit-overflow-scrolling: touch;
}
.comment-form .OwO.OwO-open + .submit,
.comment-form .OwO:has(.OwO-body) + .submit {
  align-self: end;
}

/* Comment v8: floating emoji popover with correct stacking and compact action row */
#comment-form-app {
  position: relative;
  z-index: 30;
}
.comment-tree {
  position: relative;
  z-index: 1;
}
.comment-form {
  overflow: visible !important;
  grid-template-areas:
    "author email url"
    "preview preview preview"
    "content content content"
    "emoji spacer submit";
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
}
.comment-form .input-control:nth-of-type(1) { grid-area: author; }
.comment-form .input-control:nth-of-type(2) { grid-area: email; }
.comment-form .input-control:nth-of-type(3) { grid-area: url; }
.comment-form textarea.form-control { grid-area: content; }
.comment-form .comment-live-preview {
  grid-area: preview;
  align-self: stretch;
  min-height: 36px;
  margin: 2px 0 -2px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.72);
  color: #1f2937;
  font-size: 15px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
  pointer-events: auto;
}
.comment-form textarea.form-control.has-live-preview {
  color: #1f2937 !important;
  caret-color: auto;
}
.comment-form .comment-preview-emoji {
  width: 28px;
  height: 28px;
  display: inline-block;
  object-fit: contain;
  vertical-align: -7px;
  margin: 0 2px;
}
.comment-form .reply-chip,
.comment-form .reply-hint {
  grid-column: 1 / -1;
}
.comment-form .OwO,
.comment-form .OwO.OwO-open {
  grid-area: emoji !important;
  position: relative;
  z-index: 80;
  width: max-content !important;
  align-self: center;
}
.comment-form .submit {
  grid-area: submit !important;
  justify-self: end;
  align-self: center;
  margin-top: 0;
}
.comment-form .OwO .OwO-body,
.comment-form .OwO.OwO-open .OwO-body {
  position: absolute !important;
  left: 0 !important;
  top: calc(100% + 10px) !important;
  bottom: auto !important;
  display: none;
  width: min(520px, calc(100vw - 72px)) !important;
  max-height: 292px !important;
  margin-top: 0 !important;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.18);
  overflow: hidden !important;
  transform: none !important;
  z-index: 9999 !important;
  pointer-events: auto;
}
.comment-form .OwO.OwO-open .OwO-body {
  display: flex !important;
  flex-direction: column;
}
.comment-form .OwO.OwO-open .OwO-body .OwO-items {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 238px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.comment-form .OwO.OwO-open .OwO-body .OwO-bar {
  flex: 0 0 38px;
}
@media (max-width: 760px) {
  .comment-form {
    grid-template-areas:
      "author"
      "email"
      "url"
      "preview"
      "content"
      "emoji"
      "submit";
    grid-template-columns: 1fr;
  }
  .comment-form .OwO,
  .comment-form .OwO.OwO-open,
  .comment-form .submit {
    grid-column: auto !important;
  }
  .comment-form .submit {
    justify-self: stretch;
  }
  .comment-form .OwO .OwO-body,
  .comment-form .OwO.OwO-open .OwO-body {
    width: min(360px, calc(100vw - 56px)) !important;
  }
}

/* Comment v9: OwO image packs from local biaoqing assets */
.comment-form .OwO .OwO-body .OwO-items-image .OwO-item {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 5px !important;
}
.comment-form .OwO .OwO-body .OwO-items-image .OwO-item img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
  pointer-events: none;
}
.comment-form .OwO .OwO-body .OwO-items .OwO-item span {
  pointer-events: none;
}
.comment-content .comment-emoji-img {
  width: 28px;
  height: 28px;
  display: inline-block;
  object-fit: contain;
  vertical-align: -7px;
  margin: 0 2px;
}
.comment-content .comment-emoji-img.aru,
.comment-content .comment-emoji-img.alu,
.comment-content .comment-emoji-img.newpaopao {
  border: 0;
  background: transparent;
}

/* Link page pro layout override */
.links-page .links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 16px;
  align-items: stretch;
  padding: 0;
}
.links-page .link-card img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: contain;
  flex-shrink: 0;
}
.links-page .link-rules {
  border-left: 0;
}



/* Footer comment emoji */
.footer-comment-link .comment-emoji-img {
  width: 18px;
  height: 18px;
  display: inline-block;
  object-fit: contain;
  vertical-align: -4px;
  margin: 0 1px;
}

/* Link page v2: align link groups with page body/comment axis */
.links-page .links-section {
  width: min(100%, 820px);
  margin-left: auto;
  margin-right: auto;
}
.links-page .links-section-head,
.links-page .links-grid {
  width: 100%;
}
@media (max-width: 640px) {
  .links-page .links-section {
    width: 100%;
  }
}



/* Link page v3: force body-width alignment after inline styles */
.links-page .links-section {
  width: min(100%, 820px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.links-page .links-section-head,
.links-page .links-grid {
  width: 100% !important;
}
@media (max-width: 640px) {
  .links-page .links-section {
    width: 100% !important;
  }
}

.post-content .markdown-emoji-img {
  width: 24px;
  height: 24px;
  display: inline-block;
  object-fit: contain;
  vertical-align: -6px;
  margin: 0 3px;
}

/* Music page v1: Meting album player */
.music-page {
  width: min(100%, 1080px);
}
.music-content {
  width: min(100%, 820px);
  margin: 0 auto 28px;
}
.music-content:empty {
  display: none;
}
.music-player-host {
  width: 100%;
}
.music-dashboard {
  display: grid;
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.music-albums,
.music-player-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 20px 54px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}
.music-albums {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
  padding: 18px;
}
.music-panel-title {
  color: #1f2937;
  font-size: 13px;
  font-weight: 520;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.music-album-list,
.music-track-list,
.music-search-results {
  display: grid;
  gap: 8px;
}
.music-album,
.music-track,
.music-search-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: #344054;
  text-align: left;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.music-album {
  padding: 12px 13px;
}
.music-album:hover,
.music-track:hover,
.music-search-item:hover {
  transform: translateY(-1px);
  border-color: rgba(248, 113, 113, .25);
  background: rgba(255, 247, 247, .9);
}
.music-album.active,
.music-track.active {
  border-color: rgba(248, 113, 113, .42);
  background: linear-gradient(135deg, rgba(255, 240, 240, .95), rgba(255, 255, 255, .82));
  box-shadow: inset 3px 0 0 #f87171;
}
.music-album span,
.music-search-item span {
  display: block;
  color: #1f2937;
  font-size: 14px;
  font-weight: 520;
}
.music-album small,
.music-search-item small,
.music-track small {
  display: block;
  margin-top: 4px;
  color: #98a2b3;
  font-size: 12px;
}
.music-search {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}
.music-search-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 8px;
}
.music-search-row select,
.music-search-row input,
.music-search-row button {
  height: 38px;
  min-width: 0;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 13px;
  background: rgba(255, 255, 255, .86);
  color: #344054;
  font-size: 13px;
}
.music-search-row input {
  grid-column: 1 / -1;
  padding: 0 12px;
}
.music-search-row button {
  grid-column: 1 / -1;
  color: #fff;
  background: linear-gradient(135deg, #fb7185, #f97373);
  border: 0;
  cursor: pointer;
}
.music-search-item {
  padding: 10px 12px;
}
.music-search-empty,
.music-loading,
.music-error {
  padding: 14px;
  border-radius: 16px;
  background: rgba(248, 250, 252, .78);
  color: #98a2b3;
  font-size: 13px;
}
.music-error {
  color: #dc2626;
  background: rgba(254, 226, 226, .72);
}
.music-player-card {
  overflow: hidden;
}
.music-hero {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  padding: 28px;
  background:
    radial-gradient(circle at 18% 8%, rgba(251, 113, 133, .20), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(255, 247, 247, .72));
}
.music-cover-wrap {
  position: relative;
  aspect-ratio: 1;
  border-radius: 30px;
  padding: 10px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 24px 58px rgba(15, 23, 42, .16);
}
.music-cover {
  width: 100%;
  height: 100%;
  border-radius: 23px;
  object-fit: cover;
  display: block;
}
.music-cover-loading .music-cover {
  opacity: .18;
  filter: grayscale(.2);
}
.music-cover-loading::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 23px;
  background:
    linear-gradient(90deg, rgba(255, 228, 230, .72), rgba(255,255,255,.96), rgba(255, 228, 230, .72));
  background-size: 220% 100%;
  animation: music-skeleton 1.35s ease-in-out infinite;
  z-index: 1;
}
.music-now {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.music-kicker {
  width: max-content;
  max-width: 100%;
  padding: 6px 11px;
  border-radius: 999px;
  color: #fb7185;
  background: rgba(251, 113, 133, .10);
  font-size: 12px;
}
.music-now h2 {
  margin: 16px 0 8px;
  color: #1f2937;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 520;
  letter-spacing: -0.04em;
  line-height: 1.08;
}
.music-now p {
  margin: 0;
  color: #667085;
  font-size: 15px;
}
.music-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 26px;
}
.music-controls button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: #344054;
  line-height: 1;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .10);
  cursor: pointer;
}
.music-controls button svg {
  width: 20px;
  height: 20px;
}
.music-controls .music-play {
  width: 58px;
  height: 58px;
  color: #fff;
  background: linear-gradient(135deg, #fb7185, #f97373);
}
.music-controls .music-play svg {
  width: 22px;
  height: 22px;
}
.music-progress {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 22px;
  color: #98a2b3;
  font-size: 12px;
}
.music-progress input {
  width: 100%;
  accent-color: #fb7185;
}
.music-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .88fr);
  gap: 0;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}
.music-track-panel,
.music-lyric-panel {
  min-height: 360px;
  padding: 22px;
}
.music-track-panel {
  border-right: 1px solid rgba(15, 23, 42, 0.08);
}
.music-track-list {
  margin-top: 12px;
  max-height: 440px;
  overflow: auto;
  padding-right: 4px;
}
.music-track {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
}
.music-track-skeleton {
  pointer-events: none;
  background: transparent !important;
  border-color: transparent !important;
  transform: none !important;
}
.music-track-skeleton .music-track-index,
.music-track-skeleton .music-track-name i,
.music-track-skeleton .music-track-name small,
.music-track-skeleton .music-track-album,
.music-lyric-skeleton span {
  display: block;
  border-radius: 999px;
  color: transparent;
  background: linear-gradient(90deg, rgba(226, 232, 240, .72), rgba(248, 250, 252, .96), rgba(226, 232, 240, .72));
  background-size: 220% 100%;
  animation: music-skeleton 1.35s ease-in-out infinite;
}
.music-track-skeleton .music-track-index {
  width: 20px;
  height: 12px;
}
.music-track-skeleton .music-track-name i {
  width: min(68%, 220px);
  height: 13px;
  margin-bottom: 8px;
}
.music-track-skeleton .music-track-name small {
  width: min(42%, 140px);
  height: 10px;
}
.music-track-skeleton .music-track-album {
  width: 72px;
  height: 12px;
  justify-self: center;
}
.music-lyric-skeleton {
  display: flex;
  justify-content: center;
}
.music-lyric-skeleton span {
  width: min(76%, 240px);
  height: 14px;
}
.music-lyric-skeleton:nth-child(2n) span {
  width: min(58%, 190px);
}
@keyframes music-skeleton {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}
.music-track-index {
  color: #98a2b3;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.music-track-name {
  min-width: 0;
  color: #344054;
  font-size: 14px;
}
.music-lyrics {
  height: 440px;
  overflow: auto;
  margin-top: 12px;
  padding: 10px 4px 120px;
  scroll-behavior: smooth;
}
.music-lyric-line {
  margin: 0;
  padding: 8px 2px;
  color: #98a2b3;
  font-size: 14px;
  line-height: 1.65;
  transition: color .18s ease, transform .18s ease;
}
.music-lyric-line.active {
  color: #fb7185;
  transform: translateX(6px);
  font-size: 16px;
}
.music-empty {
  width: min(100%, 820px);
  margin: 0 auto;
  padding: 22px;
  border: 1px dashed rgba(251, 113, 133, .35);
  border-radius: 22px;
  background: rgba(255, 247, 247, .72);
  color: #667085;
}
.music-empty code {
  display: block;
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .85);
  color: #fb7185;
  white-space: pre-wrap;
}
@media (max-width: 900px) {
  .music-dashboard,
  .music-hero,
  .music-main-grid {
    grid-template-columns: 1fr;
  }
  .music-albums {
    position: static;
  }
  .music-cover-wrap {
    width: min(260px, 100%);
    margin: 0 auto;
  }
  .music-track-panel {
    border-right: 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  }
}
@media (max-width: 640px) {
  .music-page {
    padding-left: 0;
    padding-right: 0;
  }
  .music-hero,
  .music-track-panel,
  .music-lyric-panel,
  .music-albums {
    padding: 16px;
  }
  .music-now h2 {
    font-size: 28px;
  }
}

/* Music page v2: compact header and inline search */
.music-content {
  margin-bottom: 16px !important;
}
.music-player-host {
  margin-top: 18px !important;
}
.music-dashboard {
  gap: 16px !important;
}
.music-albums {
  gap: 12px !important;
  padding: 16px !important;
}
.music-search {
  gap: 9px !important;
}
.music-search-row {
  display: grid !important;
  grid-template-columns: 76px minmax(0, 1fr) 58px !important;
  gap: 8px !important;
  align-items: center !important;
}
.music-search-row select,
.music-search-row input,
.music-search-row button {
  grid-column: auto !important;
  height: 36px !important;
  margin: 0 !important;
}
.music-search-row select {
  appearance: none;
  -webkit-appearance: none;
  padding: 0 24px 0 10px;
  background:
    linear-gradient(45deg, transparent 50%, #98a2b3 50%) calc(100% - 13px) 15px / 5px 5px no-repeat,
    linear-gradient(135deg, #98a2b3 50%, transparent 50%) calc(100% - 8px) 15px / 5px 5px no-repeat,
    rgba(255, 255, 255, .9);
  color: #475467;
  font-size: 12px !important;
}
.music-search-row input {
  padding: 0 11px !important;
}
.music-search-row button {
  padding: 0 !important;
  font-size: 12px !important;
}
.music-hero {
  grid-template-columns: 210px minmax(0, 1fr) !important;
  gap: 22px !important;
  padding: 22px !important;
}
.music-cover-wrap {
  border-radius: 26px !important;
  padding: 8px !important;
}
.music-now h2 {
  margin: 12px 0 6px !important;
  font-size: clamp(24px, 3.2vw, 36px) !important;
}
.music-controls {
  margin-top: 20px !important;
}
.music-progress {
  margin-top: 16px !important;
}
.music-kicker {
  max-width: min(100%, 320px) !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .music-hero {
    grid-template-columns: 1fr !important;
  }
  .music-cover-wrap {
    width: min(220px, 100%) !important;
  }
}
@media (max-width: 640px) {
  .music-search-row {
    grid-template-columns: 74px minmax(0, 1fr) !important;
  }
  .music-search-row button {
    grid-column: 1 / -1 !important;
  }
}

/* Music page v3: search polish, per-song lyric viewport */
.music-search {
  padding-top: 12px !important;
}
.music-search-row {
  grid-template-columns: 74px minmax(0, 1fr) 52px !important;
}
.music-select-wrap {
  position: relative;
  display: block;
  min-width: 0;
}
.music-select-wrap::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #98a2b3;
  border-bottom: 1.5px solid #98a2b3;
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}
.music-search-row select {
  width: 100% !important;
  border: 1px solid rgba(251, 113, 133, .18) !important;
  background: linear-gradient(135deg, rgba(255, 247, 247, .96), rgba(255, 255, 255, .92)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.music-search-row select:focus,
.music-search-row input:focus {
  outline: 0;
  border-color: rgba(251, 113, 133, .45) !important;
  box-shadow: 0 0 0 3px rgba(251, 113, 133, .12);
}
.music-search-row button {
  border-radius: 12px !important;
  box-shadow: 0 10px 20px rgba(251, 113, 133, .18);
}
.music-lyrics {
  overflow-x: hidden !important;
  text-align: center;
  scroll-behavior: smooth;
  scrollbar-width: thin;
}
.music-lyric-line {
  width: 100%;
  max-width: 100%;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 10px !important;
  padding-right: 10px !important;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  transform: none !important;
}
.music-lyric-line.active {
  transform: none !important;
  font-weight: 520;
}
@media (max-width: 640px) {
  .music-search-row {
    grid-template-columns: 70px minmax(0, 1fr) !important;
  }
  .music-search-row button {
    grid-column: 1 / -1 !important;
  }
}

/* Music page v4: tighter title, custom type menu, album column */
.music-content[hidden] {
  display: none !important;
}
.music-content-pending {
  display: none !important;
}
.music-content[hidden] + .music-player-host {
  margin-top: 6px !important;
}
.music-player-host {
  margin-top: 10px !important;
}
.music-search-row {
  grid-template-columns: 74px minmax(0, 1fr) 54px !important;
}
.music-type-select {
  position: relative;
  min-width: 0;
  z-index: 30;
}
.music-type-current {
  width: 100%;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 0 11px 0 12px;
  border: 1px solid rgba(251, 113, 133, .22);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,247,247,.96), rgba(255,255,255,.92));
  color: #475467;
  font-size: 13px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82), 0 8px 18px rgba(251,113,133,.08);
}
.music-type-current i {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #98a2b3;
  border-bottom: 1.5px solid #98a2b3;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .18s ease;
}
.music-type-select.open .music-type-current {
  border-color: rgba(251, 113, 133, .48);
  box-shadow: 0 0 0 3px rgba(251, 113, 133, .12);
}
.music-type-select.open .music-type-current i {
  transform: translateY(2px) rotate(225deg);
}
.music-type-options {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: 100%;
  padding: 6px;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 16px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 18px 42px rgba(15,23,42,.16);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}
.music-type-select.open .music-type-options {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.music-type-options button {
  width: 100%;
  height: 32px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #475467;
  font-size: 13px;
  text-align: center;
  cursor: pointer;
}
.music-type-options button:hover {
  color: #fb7185;
  background: rgba(251,113,133,.10);
}
.music-track {
  grid-template-columns: 34px minmax(0, 1fr) minmax(96px, 128px) !important;
}
.music-track-album {
  min-width: 0;
  color: #98a2b3;
  font-size: 13px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  align-self: center;
}
.music-track.active .music-track-album {
  color: #fb7185;
}
.music-lyrics {
  overflow-x: hidden !important;
  text-align: center;
}
.music-lyric-line {
  max-width: 100% !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}
@media (max-width: 640px) {
  .music-search-row {
    grid-template-columns: 72px minmax(0, 1fr) !important;
  }
  .music-search-row > button[type="submit"] {
    grid-column: 1 / -1 !important;
  }
  .music-track {
    grid-template-columns: 30px minmax(0, 1fr) !important;
  }
  .music-track-album {
    grid-column: 2;
    text-align: left;
    font-size: 12px;
  }
}

/* Music page v5: refined dropdown, contained search results, stable lyrics */
.music-search-row {
  grid-template-columns: 72px minmax(0, 1fr) 54px !important;
}
.music-search-row .music-type-current {
  height: 36px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 10px !important;
  align-items: center !important;
  justify-items: center !important;
  gap: 6px !important;
  padding: 0 10px 0 12px !important;
  border: 1px solid rgba(15, 23, 42, .10) !important;
  border-radius: 13px !important;
  background: rgba(255, 255, 255, .92) !important;
  color: #344054 !important;
  line-height: 1 !important;
  box-shadow: none !important;
}
.music-search-row .music-type-current span {
  display: block;
  width: 100%;
  min-width: 0;
  line-height: 1;
  text-align: center;
}
.music-search-row .music-type-current i {
  position: relative;
  justify-self: center;
  width: 10px;
  height: 10px;
  margin-top: 0;
  border: 0 !important;
  transform: none !important;
}
.music-search-row .music-type-current i::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  opacity: .62;
  transform: translate(-50%, -62%) rotate(45deg);
}
.music-type-current:hover,
.music-type-select.open .music-type-current {
  border-color: rgba(251, 113, 133, .34) !important;
  background: rgba(255, 247, 247, .88) !important;
  box-shadow: 0 0 0 3px rgba(251, 113, 133, .08) !important;
}
.music-type-select.open .music-type-current i {
  margin-top: 0;
  transform: none !important;
}
.music-type-select.open .music-type-current i::before {
  transform: translate(-50%, -38%) rotate(225deg);
}
.music-type-options {
  z-index: 50 !important;
  width: 100% !important;
  min-width: 72px !important;
  padding: 4px !important;
  border: 1px solid rgba(15, 23, 42, .14) !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: 0 10px 24px rgba(15,23,42,.14) !important;
  backdrop-filter: none;
  overflow: hidden;
}
.music-type-options button {
  position: relative;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 32px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #475467 !important;
  line-height: 32px !important;
  box-shadow: none !important;
  transition: color .16s ease, background .16s ease;
}
.music-type-options button + button {
  margin-top: 1px;
}
.music-type-options button:hover {
  color: #fb7185 !important;
  background: rgba(255,241,242,.72) !important;
}
.music-type-options button.active {
  color: #fb7185 !important;
  background: rgba(255,241,242,.78) !important;
  box-shadow: none !important;
}
.music-search-results {
  max-height: 224px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 3px;
  overscroll-behavior: contain;
}
.music-search-item {
  min-height: 50px;
  padding: 9px 11px !important;
}
.music-search-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.music-lyrics {
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  overflow-anchor: none;
}
@media (max-width: 640px) {
  .music-search-row {
    grid-template-columns: 72px minmax(0, 1fr) !important;
  }
  .music-type-options {
    width: 82px !important;
  }
}

/* Music mobile compact */
@media (max-width: 640px) {
  .music-page {
    width: min(100% - 28px, 1080px) !important;
    padding: 0 !important;
  }
  .music-player-host {
    margin-top: 8px !important;
  }
  .music-dashboard {
    gap: 12px !important;
  }
  .music-albums,
  .music-player-card {
    border-radius: 20px !important;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .07) !important;
  }
  .music-albums {
    padding: 14px !important;
    gap: 10px !important;
  }
  .music-album-list {
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto;
    padding: 0 2px 4px;
    scroll-snap-type: x proximity;
  }
  .music-album {
    min-width: 154px;
    padding: 10px 12px !important;
    scroll-snap-align: start;
  }
  .music-search {
    padding-top: 10px !important;
  }
  .music-search-row {
    grid-template-columns: 72px minmax(0, 1fr) !important;
    gap: 8px !important;
  }
  .music-search-row > button[type="submit"] {
    grid-column: 1 / -1 !important;
    height: 36px !important;
  }
  .music-search-results {
    max-height: 188px !important;
  }
  .music-hero {
    grid-template-columns: 96px minmax(0, 1fr) !important;
    gap: 14px !important;
    padding: 16px !important;
    align-items: center;
  }
  .music-cover-wrap {
    width: 96px !important;
    padding: 5px !important;
    border-radius: 18px !important;
    margin: 0 !important;
  }
  .music-cover {
    border-radius: 14px !important;
  }
  .music-now {
    justify-content: center;
  }
  .music-kicker {
    padding: 4px 8px;
    font-size: 11px;
  }
  .music-now h2 {
    margin: 8px 0 4px !important;
    font-size: clamp(22px, 8vw, 30px) !important;
    line-height: 1.08 !important;
  }
  .music-now p {
    font-size: 13px !important;
    line-height: 1.35;
  }
  .music-controls {
    gap: 9px !important;
    margin-top: 14px !important;
  }
  .music-controls button {
    width: 38px;
    height: 38px;
  }
  .music-controls .music-play {
    width: 48px;
    height: 48px;
  }
  .music-progress {
    grid-column: 1 / -1;
    margin-top: 14px !important;
  }
  .music-main-grid {
    grid-template-columns: 1fr !important;
  }
  .music-track-panel,
  .music-lyric-panel {
    min-height: auto !important;
    padding: 16px !important;
  }
  .music-track-panel {
    border-right: 0 !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  }
  .music-track-list {
    max-height: 260px !important;
    margin-top: 10px !important;
  }
  .music-track {
    grid-template-columns: 28px minmax(0, 1fr) !important;
    padding: 10px 9px !important;
    border-radius: 14px !important;
  }
  .music-track-album {
    grid-column: 2;
    text-align: left !important;
    font-size: 12px !important;
  }
  .music-lyrics {
    height: 300px !important;
    margin-top: 10px !important;
    padding: 8px 0 96px !important;
  }
  .music-lyric-line {
    padding: 7px 6px !important;
    font-size: 13px !important;
  }
  .music-lyric-line.active {
    font-size: 14px !important;
  }
}

/* Music mobile player redesign */
@media (max-width: 640px) {
  .music-dashboard {
    display: flex !important;
    flex-direction: column;
  }
  .music-player-card {
    order: 1;
  }
  .music-albums {
    order: 2;
  }
  .music-hero {
    display: block !important;
    padding: 18px 18px 16px !important;
    text-align: center;
  }
  .music-cover-wrap {
    width: min(214px, 68vw) !important;
    margin: 0 auto 16px !important;
    border-radius: 26px !important;
    padding: 8px !important;
  }
  .music-cover {
    border-radius: 20px !important;
  }
  .music-now {
    align-items: center;
  }
  .music-kicker {
    margin: 0 auto;
  }
  .music-now h2 {
    max-width: 100%;
    margin: 10px auto 5px !important;
    font-size: clamp(25px, 8vw, 34px) !important;
    text-align: center;
    text-wrap: balance;
  }
  .music-now p {
    max-width: 100%;
    color: #7b8798;
    text-align: center;
  }
  .music-controls {
    justify-content: center;
    margin-top: 16px !important;
  }
  .music-progress {
    width: 100%;
    margin-top: 16px !important;
  }
  .music-main-grid {
    display: block !important;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
  }
  .music-mobile-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin: 12px 14px 0;
    padding: 4px;
    border-radius: 999px;
    background: rgba(248, 250, 252, .92);
    border: 1px solid rgba(15, 23, 42, .06);
  }
  .music-mobile-tabs button {
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #7b8798;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
  }
  .music-mobile-tabs button.active {
    background: #fff;
    color: #fb7185;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
  }
  .music-track-panel,
  .music-lyric-panel {
    padding: 14px !important;
    border: 0 !important;
  }
  [data-mobile-active="tracks"] .music-lyric-panel,
  [data-mobile-active="lyrics"] .music-track-panel {
    display: none !important;
  }
  .music-track-list {
    max-height: 300px !important;
    padding-right: 0 !important;
  }
  .music-track {
    grid-template-columns: 30px minmax(0, 1fr) !important;
    min-height: 58px;
  }
  .music-track-name {
    font-size: 14px;
  }
  .music-track-album {
    grid-column: 2 !important;
    margin-top: 3px;
  }
  .music-lyrics {
    height: 360px !important;
    padding: 18px 4px 150px !important;
  }
  .music-lyric-line {
    font-size: 14px !important;
    line-height: 1.7 !important;
  }
  .music-lyric-line.active {
    font-size: 16px !important;
  }
  .music-albums {
    border-radius: 18px !important;
    background: rgba(255, 255, 255, .78) !important;
    box-shadow: none !important;
  }
  .music-album-list {
    margin: 0 -4px;
  }
  .music-search-row {
    grid-template-columns: 72px minmax(0, 1fr) !important;
  }
}
@media (min-width: 641px) {
  .music-mobile-tabs {
    display: none;
  }
}

/* Music mobile album-first playlist rows */
@media (max-width: 640px) {
  .music-albums {
    order: 1 !important;
  }
  .music-player-card {
    order: 2 !important;
  }
  .music-albums {
    padding: 10px 12px !important;
    gap: 8px !important;
  }
  .music-albums .music-panel-title {
    display: none;
  }
  .music-album-list {
    padding: 0 2px 2px !important;
  }
  .music-album {
    min-width: auto !important;
    width: auto !important;
    flex: 0 0 auto;
    padding: 8px 12px !important;
    border-radius: 999px !important;
    background: rgba(248, 250, 252, .9);
    white-space: nowrap;
  }
  .music-album span {
    font-size: 13px !important;
    line-height: 1;
  }
  .music-album small {
    display: none !important;
  }
  .music-album.active {
    box-shadow: none !important;
    background: rgba(255, 241, 242, .96) !important;
  }
  .music-search {
    display: none !important;
  }
  .music-track {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 12px !important;
    min-height: 46px !important;
    padding: 9px 10px !important;
  }
  .music-track-index {
    display: none !important;
  }
  .music-track-name {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(76px, auto);
    gap: 10px;
    align-items: baseline;
    width: 100%;
  }
  .music-track-name,
  .music-track-name small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .music-track-name small {
    margin-top: 0 !important;
    text-align: right;
    color: #98a2b3;
  }
  .music-track-skeleton .music-track-name {
    display: block !important;
  }
  .music-track-skeleton .music-track-name small {
    width: min(36%, 96px);
    margin-left: auto;
  }
  .music-track-album {
    display: none !important;
  }
}

/* Mobile scrollbar polish */
@media (max-width: 640px) {
  html,
  body {
    scrollbar-width: none;
  }
  html::-webkit-scrollbar,
  body::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }
  .music-albums {
    position: relative;
    overflow: hidden;
  }
  .music-albums::after {
    content: "";
    position: absolute;
    top: 8px;
    right: 0;
    bottom: 8px;
    width: 34px;
    pointer-events: none;
    border-radius: 0 18px 18px 0;
    background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.92));
  }
  .music-album-list,
  .music-track-list,
  .music-lyrics,
  .music-search-results {
    scrollbar-width: none !important;
    -ms-overflow-style: none;
    overscroll-behavior: contain;
  }
  .music-album-list::-webkit-scrollbar,
  .music-track-list::-webkit-scrollbar,
  .music-lyrics::-webkit-scrollbar,
  .music-search-results::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none;
  }
  .music-album-list {
    position: relative;
    padding-right: 26px !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
  }
  .music-album-list::after {
    content: "";
    flex: 0 0 18px;
    width: 18px;
  }
  .music-track-list,
  .music-lyrics {
    -webkit-overflow-scrolling: touch;
  }
}

/* Mobile album overlap fix */
@media (max-width: 640px) {
  .music-dashboard {
    position: relative;
    isolation: isolate;
  }
  .music-albums {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    z-index: 4;
    margin-bottom: 12px !important;
  }
  .music-player-card {
    position: relative;
    z-index: 1;
    margin-top: 0 !important;
  }
  .music-cover-wrap,
  .music-cover {
    z-index: 0;
  }
}

/* Mobile music stretch stability */
@media (max-width: 760px) {
  .music-page {
    width: min(100% - 28px, 1080px) !important;
    max-width: 1080px !important;
    box-sizing: border-box;
  }
  .music-player-host,
  .music-dashboard {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    box-sizing: border-box;
  }
  .music-dashboard {
    align-items: stretch !important;
  }
  .music-albums,
  .music-player-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    box-sizing: border-box;
  }
  .music-hero,
  .music-main-grid {
    width: 100% !important;
    min-width: 0;
    box-sizing: border-box;
  }
  .music-cover-wrap {
    max-width: 100%;
  }
}

/* Global floating music player */
.global-music {
  position: fixed;
  bottom: 22px;
  z-index: 80;
  font-family: inherit;
}
.global-music.is-right {
  right: 22px;
}
.global-music.is-left {
  left: 22px;
}
.global-music.is-page-muted {
  display: none;
}
.global-music-orb {
  width: 54px;
  height: 54px;
  padding: 4px;
  border: 1px solid rgba(15, 23, 42, .10);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .14);
  cursor: pointer;
  position: relative;
}
.global-music-orb img,
.global-music-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.global-music-orb img {
  border-radius: inherit;
}
.global-music-orb span {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fb7185;
  color: #fff;
  font-size: 11px;
  box-shadow: 0 4px 12px rgba(251, 113, 133, .32);
}
.global-music-card {
  width: 292px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, .10);
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 42px rgba(15, 23, 42, .16);
}
.global-music-cover {
  position: relative;
  width: 52px;
  height: 52px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: #f8fafc;
  cursor: pointer;
}
.global-music-cover span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, .18);
  color: #fff;
  font-size: 16px;
}
.global-music-main {
  min-width: 0;
}
.global-music-title {
  color: #1f2937;
  font-size: 14px;
  font-weight: 520;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.global-music-artist,
.global-music-time {
  color: #98a2b3;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.global-music-progress {
  height: 4px;
  margin: 8px 0 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, .08);
}
.global-music-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #fb7185;
}
.global-music-actions {
  display: grid;
  grid-template-columns: repeat(3, 24px);
  gap: 4px;
}
.global-music-actions button {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(248, 250, 252, .92);
  color: #667085;
  line-height: 1;
  cursor: pointer;
}
.global-music-actions button:hover {
  color: #fb7185;
  background: rgba(255, 241, 242, .92);
}
.global-music.is-right ~ #scroll-top {
  bottom: 92px;
}
.global-music.is-left ~ #scroll-top {
  left: 22px;
  right: auto;
  bottom: 92px;
}
@media (max-width: 640px) {
  .global-music {
    bottom: 16px;
  }
  .global-music.is-right {
    right: 16px;
  }
  .global-music.is-left {
    left: 16px;
  }
  .global-music-card {
    width: min(292px, calc(100vw - 32px));
  }
  .global-music.is-right ~ #scroll-top,
  .global-music.is-left ~ #scroll-top {
    bottom: 84px;
  }
  .global-music.is-left ~ #scroll-top {
    left: 16px;
  }
}
