:root {
  --bg: #f7f8fa;
  --bg-elev: #ffffff;
  --text: #1f2937;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --primary: #0f9d58;
  --primary-contrast: #ffffff;
  --shadow: 0 2px 16px rgba(15, 23, 42, 0.06);
}

:root[data-theme="dark"] {
  --bg: #0f172a;
  --bg-elev: #111827;
  --text: #e5e7eb;
  --text-muted: #9ca3af;
  --border: #1f2937;
  --primary: #60a5fa;
  --primary-contrast: #0b1020;
  --shadow: 0 4px 22px rgba(0, 0, 0, 0.35);
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Inter, sans-serif;
  margin: 0;
  line-height: 1.6;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  position: relative;
}

.brand {
  font-weight: 800;
  color: var(--primary);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.topnav {
  display: none !important;
  gap: 14px;
  color: var(--text-muted);
  font-size: 14px;
  margin-right: auto;
}

.menu-toggle {
  margin-right: auto;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 8px;
  width: 42px;
  height: 32px;
  padding: 0;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.side-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
  border: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 48;
}

.side-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: min(84vw, 320px);
  height: 100dvh;
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  box-shadow: var(--shadow);
  transform: translateX(0);
  transition: transform 0.22s ease;
  z-index: 49;
  display: flex;
  flex-direction: column;
}

.side-menu-nav {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.side-menu-link {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

.side-menu-link:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--border) 45%, transparent);
}

.side-menu-link.is-active {
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
}

body.menu-open .side-menu {
  transform: translateX(0);
}

body.menu-open .side-menu-overlay {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 991px) {
  .menu-toggle {
    display: inline-flex;
  }

  .side-menu {
    transform: translateX(-100%);
  }

  body.menu-open {
    overflow: hidden;
  }
}

.topnav-link {
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 8px;
}

.topnav-link:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--border) 40%, transparent);
}

.topnav-link.is-active {
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
}

.theme-toggle {
  margin-left: auto;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 8px;
  width: 42px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.theme-icon {
  font-size: 16px;
  line-height: 1;
}

.theme-icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-icon-sun {
  display: inline;
}

:root[data-theme="dark"] .theme-icon-moon {
  display: none;
}

.scroll-top-btn {
  position: fixed;
  left: 18px;
  bottom: 18px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  border-radius: 999px;
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 40;
}

.scroll-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.page-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 16px 20px 22px;
  text-align: center;
  color: var(--text-muted);
}

.site-footer a {
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elev);
}

.auth-page {
  min-height: calc(100svh - 140px);
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(100%, 420px);
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-elev);
  padding: 22px;
  box-shadow: var(--shadow);
}

.auth-title {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.2;
}

.auth-subtitle {
  margin: 0 0 18px;
  color: var(--text-muted);
}

.auth-form {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.auth-label {
  font-size: 13px;
  color: var(--text-muted);
}

.auth-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--bg);
  color: var(--text);
}

.auth-error {
  margin: 0;
  color: #dc2626;
  font-size: 13px;
}

.auth-submit-btn {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--primary);
  color: var(--primary-contrast);
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

.auth-submit-btn:hover {
  filter: brightness(0.96);
}

.auth-google-btn {
  display: inline-flex;
  width: 100%;
  box-sizing: border-box;
  justify-content: center;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  font-weight: 700;
}

.auth-google-btn:hover {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
}

.vk-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
}

.article-page .content-col {
  max-width: 760px;
  margin: 0 auto;
}

.feed-col {
  max-width: 760px;
  margin: 0 auto;
}

.page-title,
.article-title {
  margin: 0 0 8px;
  font-size: 34px;
  line-height: 1.2;
}

.page-subtitle,
.article-subtitle {
  color: var(--text-muted);
  margin: 0 0 8px;
  line-height: 1.45;
  max-width: 100%;
}

.muted {
  color: var(--text-muted);
}

.gfg-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--border));
}

.card-title {
  margin: 4px 0 8px;
  font-size: 26px;
}

.card-title a:hover {
  color: var(--primary);
}

.card-excerpt {
  margin: 0;
}

.feed-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.feed-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
}

.feed-link {
  display: flex;
  gap: 16px;
  padding: 14px;
}

.feed-main {
  min-width: 0;
  flex: 1;
}

.feed-title {
  margin: 2px 0 8px;
  font-size: 20px;
  line-height: 1.3;
}

.feed-excerpt {
  margin: 0 0 10px;
  color: var(--text-muted);
}

.feed-views {
  margin: 0 0 8px;
  font-size: 13px;
}

.feed-media {
  width: 220px;
  flex: 0 0 220px;
  align-self: flex-start;
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  aspect-ratio: 220 / 148;
  background: color-mix(in srgb, var(--border) 55%, transparent);
}

.feed-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.feed-loader {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  padding: 10px 0 20px;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.search-input {
  flex: 1 1 0;
  min-width: 0;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  box-sizing: border-box;
}

.search-btn {
  flex-shrink: 0;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: var(--primary-contrast);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  box-sizing: border-box;
}

.market-filters-title {
  margin: 0 0 10px;
  font-weight: 700;
}

.market-filters-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.market-filter-btn {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg);
  transition: color 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.market-filter-btn:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
}

.market-filter-btn.is-active {
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  background: color-mix(in srgb, var(--primary) 14%, transparent);
}

.sticky {
  position: sticky;
  top: 74px;
}

.sidebar-title {
  margin-top: 0;
}

.sidebar-list {
  margin: 0;
  padding-left: 18px;
}

.sidebar-list li {
  margin: 8px 0;
}

.article-head {
  margin-bottom: 14px;
}

.back-link {
  color: var(--primary);
  font-size: 14px;
}

.share-article-btn {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, var(--bg-elev));
  color: var(--primary);
  border-radius: 999px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 45;
  box-shadow: var(--shadow);
}

.share-icon {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.share-article-btn.is-copied {
  background: var(--primary);
  color: var(--primary-contrast);
}

.article-body {
  font-size: 17px;
}

.article-body a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}

.article-body a:hover {
  filter: brightness(1.1);
}

.article-body a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.article-end-meta {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}

.article-end-meta p {
  margin: 6px 0 0;
}

.article-block-heading {
  margin: 18px 0 10px;
}

.article-list {
  margin: 10px 0 14px;
  padding-left: 24px;
}

.article-list li {
  margin: 6px 0;
}

.article-quote {
  margin: 14px 0;
  padding: 10px 14px;
  border-left: 4px solid var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, var(--bg-elev));
  border-radius: 8px;
}

.article-quote p {
  margin: 0 0 6px;
}

.article-quote cite {
  color: var(--text-muted);
  font-style: normal;
  font-size: 14px;
}

.article-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

.code-block {
  position: relative;
  padding: 0;
  border-radius: 10px;
  overflow-x: auto;
  border: 1px solid var(--border);
  background: #272822;
}

.copy-code-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 1px solid color-mix(in srgb, var(--primary) 45%, #ffffff);
  background: color-mix(in srgb, var(--primary) 18%, #1f2937);
  color: #ffffff;
  border-radius: 8px;
  width: 30px;
  height: 30px;
  padding: 0;
  cursor: pointer;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.copy-code-btn.is-copied {
  background: var(--primary);
  color: var(--primary-contrast);
  border-color: var(--primary);
}

.copy-code-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.copy-code-icon-done {
  display: none;
}

.copy-code-btn.is-copied .copy-code-icon-copy {
  display: none;
}

.copy-code-btn.is-copied .copy-code-icon-done {
  display: block;
}

.code-block pre,
.code-block code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 14px;
}

.code-block pre {
  margin: 0;
  padding: 40px 14px 14px;
  white-space: pre-wrap;
  word-break: break-word;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  border: 1px solid var(--border);
  padding: 8px 10px;
}

.image-placeholder {
  border: 1px dashed var(--border);
  background: color-mix(in srgb, var(--primary) 6%, transparent);
  border-radius: 10px;
  padding: 12px;
}

.article-image {
  margin: 12px 0 18px;
  text-align: center;
}

.article-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  justify-items: center;
}

.article-image img {
  width: 100%;
  max-width: 560px;
  height: auto;
  max-height: 360px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: block;
  margin: 0 auto;
  cursor: zoom-in;
}

.article-image figcaption {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 14px;
}

.image-lightbox {
  padding: 0;
  border: none;
  max-width: 100vw;
  max-height: 100vh;
  width: 100%;
  height: 100%;
  background: transparent;
}

.image-lightbox::backdrop {
  background: rgba(15, 23, 42, 0.92);
}

:root[data-theme="dark"] .image-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.88);
}

.image-lightbox-scrim {
  position: fixed;
  inset: 0;
  cursor: zoom-out;
}

.image-lightbox-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 52px 18px 20px;
  box-sizing: border-box;
  pointer-events: none;
}

.image-lightbox-close {
  pointer-events: auto;
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.image-lightbox-close:hover {
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
}

.image-lightbox-img {
  pointer-events: auto;
  max-width: min(96vw, 1600px);
  max-height: calc(100vh - 64px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 36px rgba(0, 0, 0, 0.4);
}

.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recommendations-block {
  margin-top: 4px;
}

.recommendations-title {
  margin: 0 0 12px;
  font-size: 24px;
}

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

.recommendation-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
}

.recommendation-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.recommendation-card h3 {
  margin: 10px 10px 6px;
  font-size: 18px;
  line-height: 1.25;
}

.recommendation-card p {
  margin: 0 10px 12px;
  color: var(--text-muted);
  font-size: 14px;
}

.market-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.market-link {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
}

.market-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
}

.market-name,
.market-exchange {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

.market-kind {
  margin: 6px 0 0;
  font-size: 12px;
}

.market-side {
  min-width: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
}

.market-stats {
  display: grid;
  justify-items: end;
  align-content: center;
  gap: 2px;
  margin-top: 0;
}

.market-price {
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}

.market-change {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted);
}

.market-change.is-up {
  color: #16a34a;
}

.market-change.is-down {
  color: #dc2626;
}

.market-meta {
  margin: 6px 0 0;
  font-size: 12px;
}

.market-type {
  border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--border));
  color: var(--primary);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.market-section-title {
  margin: 0 0 12px;
  font-size: 20px;
}

.market-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.market-detail-main {
  min-width: 0;
}

.timeframe-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
}

.timeframe-btn {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.timeframe-btn:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--primary) 38%, var(--border));
}

.timeframe-btn.is-active {
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 52%, var(--border));
  background: color-mix(in srgb, var(--primary) 14%, transparent);
}

.timeframe-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  color: var(--text-muted);
}

@media (max-width: 700px) {
  .market-detail-head {
    flex-direction: column;
    gap: 12px;
  }

  .market-side,
  .market-stats {
    align-items: flex-start;
    justify-items: start;
  }
}

.market-chart {
  width: 100%;
  min-height: 260px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.market-chart-indicators {
  min-height: 220px;
}

.indicator-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.indicator-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
}

.indicator-color {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.shorts-page {
  height: calc(100svh - var(--shorts-topbar-height, 53px));
  overflow: hidden;
  touch-action: none;
}

.shorts-feed {
  position: relative;
  height: 100%;
  overflow: hidden;
  width: 100%;
  touch-action: none;
}

.shorts-item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
  transform: translateY(100%);
  transition: transform 220ms ease;
  will-change: transform;
  z-index: 1;
  visibility: hidden;
  pointer-events: none;
}

.shorts-item.is-active,
.shorts-item.is-neighbor {
  visibility: visible;
}

.shorts-item.is-active {
  z-index: 3;
  pointer-events: auto;
}

.shorts-item.is-neighbor {
  z-index: 2;
}

.shorts-item.is-empty {
  visibility: hidden;
  pointer-events: none;
}

.shorts-item:not(.is-active) .video-overlay {
  visibility: hidden;
  pointer-events: none;
}

.shorts-item.is-active .shorts-frame-wrap {
  box-shadow: none;
}

.shorts-frame-wrap {
  position: relative;
  width: min(100%, 430px);
  height: 100%;
  max-height: calc(100svh - var(--shorts-topbar-height, 53px));
  aspect-ratio: 9 / 16;
  border-radius: 0;
  overflow: hidden;
  border: none;
  background: #000;
  align-self: center;
}

.shorts-frame-wrap .kinescope-host {
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
  pointer-events: none;
}

.shorts-frame-wrap iframe {
  pointer-events: none;
}

/* TikTok-style overlays (no native controls) */
.shorts-frame-wrap .video-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}
.shorts-frame-wrap .tap-layer {
  position: absolute;
  inset: 0;
  z-index: 11;
  pointer-events: auto;
  cursor: pointer;
  touch-action: none;
}
.shorts-frame-wrap .center-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  z-index: 25;
  width: 68px;
  height: 68px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
  backdrop-filter: blur(2px);
}
.shorts-frame-wrap .center-play.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
  cursor: pointer;
}
.shorts-frame-wrap .center-play svg {
  width: 34px;
  height: 34px;
}
.shorts-frame-wrap .center-play .icon-play,
.shorts-frame-wrap .center-play .icon-pause {
  display: none;
}
.shorts-frame-wrap .center-play.show-play .icon-play {
  display: block;
  margin-left: 3px;
}
.shorts-frame-wrap .center-play.show-pause .icon-pause {
  display: block;
}
.shorts-frame-wrap .bottom-gradient {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38%;
  z-index: 12;
  pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.28) 45%, transparent 100%);
}
.shorts-frame-wrap .shorts-caption {
  position: absolute;
  left: 14px;
  right: 56px;
  bottom: 34px;
  z-index: 28;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.65);
  pointer-events: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.shorts-frame-wrap .progress-wrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  height: 20px;
  display: flex;
  align-items: flex-end;
  pointer-events: auto;
  cursor: pointer;
  touch-action: none;
}
.shorts-frame-wrap .progress-bg {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.35);
  transition: height 0.12s ease;
}
.shorts-frame-wrap .progress-fill {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  background: #fff;
  border-radius: 0 1px 1px 0;
  width: 0%;
  transition: width 0.04s linear, height 0.12s ease;
  pointer-events: none;
}
.shorts-frame-wrap .progress-thumb {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  margin-bottom: -3px;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.12s ease, transform 0.12s ease;
  pointer-events: none;
}
.shorts-frame-wrap .progress-wrap.is-scrubbing .progress-bg,
.shorts-frame-wrap .progress-wrap.is-scrubbing .progress-fill {
  height: 4px;
}
.shorts-frame-wrap .progress-wrap.is-scrubbing .progress-thumb {
  opacity: 1;
  transform: scale(1);
}
.shorts-frame-wrap .progress-time {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 36;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
}
.shorts-frame-wrap .sound-btn {
  position: absolute;
  bottom: 38px;
  right: 10px;
  z-index: 40;
  background: rgba(0, 0, 0, 0.45);
  border: none;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.1s ease, background 0.1s;
  user-select: none;
  line-height: 1;
  backdrop-filter: blur(2px);
}
.shorts-frame-wrap .sound-btn svg {
  width: 18px;
  height: 18px;
}
.shorts-frame-wrap .sound-btn .icon-sound-off {
  display: none;
}
.shorts-frame-wrap .sound-btn.is-muted .icon-sound-on {
  display: none;
}
.shorts-frame-wrap .sound-btn.is-muted .icon-sound-off {
  display: block;
}
.shorts-frame-wrap .sound-btn:active {
  transform: scale(0.88);
  background: rgba(0, 0, 0, 0.72);
}

.shorts-loader {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  min-height: 70px;
  padding: 20px 0;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.shorts-loader.is-visible {
  opacity: 1;
}

.shorts-empty {
  padding: 16px;
}

.shorts-body .page-shell {
  max-width: 100%;
  padding: 0;
}

.shorts-body {
  height: 100svh;
  overflow: hidden;
  overflow-x: hidden;
}

.shorts-body .site-footer,
.shorts-body .scroll-top-btn {
  display: none;
}

@media (max-width: 980px) {
  .layout-grid {
    grid-template-columns: 1fr;
  }
  .sidebar-col {
    order: -1;
  }
  .feed-link {
    flex-direction: column-reverse;
  }
  .feed-media {
    width: 100%;
    flex: 0 0 auto;
    aspect-ratio: 16 / 9;
  }
  .article-title {
    font-size: 26px;
    line-height: 1.3;
  }
  .feed-title {
    font-size: 18px;
    line-height: 1.35;
  }
  .market-link {
    flex-direction: column;
    align-items: flex-start;
  }
  .market-side {
    width: 100%;
    min-width: 0;
    align-items: flex-start;
  }
  .market-stats {
    justify-items: start;
  }
  .market-price {
    font-size: 24px;
  }
  .market-change {
    font-size: 14px;
  }
  .market-meta {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .article-title {
    font-size: 20px;
    line-height: 1.35;
  }
  .feed-title {
    font-size: 16px;
  }

  .shorts-page {
    max-width: 100%;
    overflow-x: hidden;
  }

  .shorts-item {
    min-height: 100%;
    width: 100%;
    overflow-x: hidden;
  }

  .shorts-feed {
    overflow-x: hidden;
  }

  .shorts-frame-wrap {
    max-width: 100%;
    width: 100%;
    height: 100%;
    max-height: calc(100svh - var(--shorts-topbar-height, 53px));
    aspect-ratio: auto;
    border: none;
  }

  .shorts-frame-wrap .shorts-caption {
    bottom: 30px;
    left: 12px;
    right: 52px;
    font-size: 13px;
  }

  .shorts-frame-wrap .sound-btn {
    bottom: 34px;
    right: 8px;
  }
}

@media (max-width: 370px) {
  .search-form {
    flex-direction: column;
    align-items: stretch;
  }

  .search-btn {
    width: 100%;
  }
}

@media (min-width: 992px) {
  :root {
    --desktop-layout-max: calc(1180px - 120px);
    --desktop-sidebar-width: 320px;
  }

  .topbar-inner,
  .page-shell,
  .site-footer {
    width: min(var(--desktop-layout-max), calc(100vw - var(--desktop-sidebar-width)));
    margin-left: max(
      var(--desktop-sidebar-width),
      calc((100vw - var(--desktop-layout-max)) / 2 + (var(--desktop-sidebar-width) / 2))
    );
    margin-right: auto;
  }

  .topbar-inner {
    max-width: none;
  }

  .page-shell {
    max-width: none;
  }

  .site-footer {
    max-width: none;
  }

  .side-menu-overlay {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  body.menu-collapsed .side-menu {
    transform: translateX(-100%);
  }

  html[data-desktop-menu-collapsed="1"] .side-menu {
    transform: translateX(-100%);
  }

  body.menu-collapsed .topbar-inner,
  body.menu-collapsed .page-shell,
  body.menu-collapsed .site-footer {
    width: min(var(--desktop-layout-max), 100vw);
    margin-left: auto;
    margin-right: auto;
  }

  html[data-desktop-menu-collapsed="1"] .topbar-inner,
  html[data-desktop-menu-collapsed="1"] .page-shell,
  html[data-desktop-menu-collapsed="1"] .site-footer {
    width: min(var(--desktop-layout-max), 100vw);
    margin-left: auto;
    margin-right: auto;
  }
}
