/* Base variables, reset, shell primitives, and the original shared mobile UI foundation. */

:root {
  color-scheme: dark;
  --app-design-width: 375;
  --app-design-width-px: 375px;
  --app-scale: 1;
  --app-rem-base: 16px;
  --app-bg: #0d0f10;
  --app-panel: #171a1c;
  --app-panel-2: #202528;
  --app-text: #f7f4ec;
  --app-muted: #a7adb2;
  --app-line: rgba(255, 255, 255, .1);
  --app-accent: #f05a3d;
  --app-accent-2: #35c5a4;
  --app-radius: 0.5rem;
  --app-safe-bottom: env(safe-area-inset-bottom, 0);
  --tg-viewport-height: 100vh;
  --tg-viewport-stable-height: 100vh;
  font-size: var(--app-rem-base);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--app-bg);
  color: var(--app-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

html {
  overflow-x: hidden;
}

body {
  display: flex;
  justify-content: center;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -10%, rgba(240, 90, 61, .16), transparent 32%),
    radial-gradient(circle at 100% 20%, rgba(53, 197, 164, .08), transparent 28%),
    var(--app-bg);
}

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

a,
button {
  cursor: pointer;
}

button,
input {
  font: inherit;
}

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

.app-shell {
  width: min(100vw, var(--app-design-width-px));
  max-width: var(--app-design-width-px);
  min-height: var(--tg-viewport-height);
  margin: 0 auto;
  padding-bottom: calc(4.75rem + var(--app-safe-bottom));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 17.5rem),
    var(--app-bg);
  overflow-x: hidden;
}

.app-shell,
.app-main,
.app-header,
.app-section,
.app-card-grid,
.app-intel-feed,
.app-detail-head,
.app-detail-meta,
.app-intel-detail {
  min-width: 0;
  max-width: 100%;
}

.app-header {
  padding: 1.25rem 0.875rem 0.625rem;
}

.app-header-sticky {
  position: sticky;
  top: 0;
  z-index: 12;
  background: rgba(13, 15, 16, .96);
  backdrop-filter: blur(0.875rem);
}

.app-brand {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.125rem;
}

.app-brand span {
  color: var(--app-accent);
  font-size: 0.875rem;
  font-weight: 700;
}

.app-brand strong {
  font-size: 1.75rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.app-search {
  display: grid;
  grid-template-columns: 1fr 3.5rem;
  gap: 0.75rem;
}

.app-search input {
  min-width: 0;
  height: 3.25rem;
  border: 1px solid var(--app-line);
  border-radius: 0.75rem;
  padding: 0 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .035));
  color: var(--app-text);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}

.app-search button {
  height: 3.25rem;
  border: 1px solid rgba(240, 90, 61, .9);
  border-radius: 0.75rem;
  background: rgba(240, 90, 61, .1);
  color: var(--app-accent);
  overflow: hidden;
  font-size: 0;
  font-weight: 700;
}

.app-search-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.625rem;
}

.app-search-tabs a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.125rem;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: var(--app-panel);
  color: var(--app-muted);
  font-size: 0.8125rem;
}

.app-search-tabs a.is-active {
  border-color: rgba(240, 90, 61, .55);
  background: rgba(240, 90, 61, .16);
  color: #fff;
}

.app-keyword-block {
  margin-top: 0.875rem;
}

.app-keyword-block h2 {
  margin: 0 0 0.625rem;
  font-size: 0.9375rem;
  line-height: 1.3;
}

.app-keyword-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5625rem;
}

.app-keyword-row a {
  max-width: 100%;
  min-height: 2rem;
  padding: 0.4375rem 0.6875rem;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: var(--app-panel);
  color: var(--app-text);
  font-size: 0.8125rem;
  line-height: 1.125rem;
  overflow-wrap: anywhere;
}

.app-main {
  padding: 0 0.875rem;
}

.app-feature-strip,
.app-card-row,
.app-chip-row,
.app-filter-row {
  display: flex;
  gap: 0.625rem;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.app-feature-strip::-webkit-scrollbar,
.app-card-row::-webkit-scrollbar,
.app-chip-row::-webkit-scrollbar,
.app-filter-row::-webkit-scrollbar {
  display: none;
}

.app-feature-card {
  position: relative;
  flex: 0 0 82%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 0.5rem;
  background: var(--app-panel);
  box-shadow: 0 0.875rem 2.125rem rgba(0, 0, 0, .42);
}

.app-feature-card::after {
  content: "";
  position: absolute;
  inset: 34% 0 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .88));
}

.app-feature-card > span:not(.app-feature-badge):not(.app-feature-copy) {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.625rem;
  z-index: 1;
}

.app-feature-card strong {
  display: block;
  overflow: hidden;
  font-size: 1.1875rem;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.app-feature-card small {
  display: block;
  margin-top: 0.1875rem;
  color: rgba(255, 255, 255, .72);
  font-size: 0.75rem;
}

.app-chip-row {
  margin: 0.125rem 0 1rem;
}

.app-chip-row a,
.app-filter-row a {
  flex: 0 0 auto;
  min-height: 2.5rem;
  padding: 0.625rem 1rem;
  border-radius: 62.4375rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, .065), rgba(255, 255, 255, .026));
  color: var(--app-muted);
  font-size: 0.8125rem;
  line-height: 1.125rem;
  border: 1px solid transparent;
}

.app-chip-row a.is-active,
.app-filter-row a.is-active {
  color: #fff;
  border-color: rgba(240, 90, 61, .75);
  background: linear-gradient(180deg, #ff6656, #f04f3d);
  box-shadow: 0 0.625rem 1.5rem rgba(240, 90, 61, .24);
}

.app-filter-scroller {
  display: grid;
  gap: 0.375rem;
  margin-top: 0.625rem;
}

.app-section {
  margin: 1.125rem 0 0;
}

.app-section-tight {
  margin-top: 0.75rem;
}

.app-section h2,
.app-section h1 {
  margin: 0;
  min-width: 0;
  font-size: 1.125rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.app-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.625rem;
}

.app-section-title a,
.app-section-title span {
  color: var(--app-muted);
  font-size: 0.8125rem;
  white-space: nowrap;
}

.app-section-title a {
  display: inline-flex;
  align-items: center;
  gap: 0.1875rem;
}

.app-section-title a .app-icon {
  width: 0.875rem;
  height: 0.875rem;
  stroke-width: 1.8;
}

.app-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.875rem 0.625rem;
}

.app-card-row .app-poster-card {
  flex: 0 0 7.25rem;
}

.app-card-row .app-recommend-card {
  flex: 0 0 9.375rem;
}

.app-poster-card {
  display: block;
  min-width: 0;
}

.app-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.3;
  overflow: hidden;
  border-radius: 0.5rem;
  background: var(--app-panel);
  border: 1px solid var(--app-line);
  box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, .28);
}

.app-poster em {
  position: absolute;
  left: 0.375rem;
  right: 0.375rem;
  bottom: 0.375rem;
  overflow: hidden;
  padding: 0.25rem 0.375rem;
  border-radius: 0.375rem;
  background: rgba(0, 0, 0, .62);
  color: #fff;
  font-style: normal;
  font-size: 0.6875rem;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.app-poster-card strong {
  display: block;
  min-height: 2.375rem;
  margin-top: 0.4375rem;
  overflow: hidden;
  color: var(--app-text);
  font-size: 0.875rem;
  line-height: 1.1875rem;
  overflow-wrap: anywhere;
}

.app-poster-card small {
  display: flex;
  gap: 0.375rem;
  min-width: 0;
  overflow: hidden;
  color: var(--app-muted);
  font-size: 0.75rem;
  line-height: 1.125rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.app-recommend-card {
  display: block;
  min-width: 0;
}

.app-recommend-cover {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--app-radius);
  background: var(--app-panel);
  border: 1px solid var(--app-line);
}

.app-recommend-card strong {
  display: block;
  margin-top: 0.4375rem;
  overflow: hidden;
  color: var(--app-text);
  font-size: 0.875rem;
  line-height: 1.1875rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
}

.app-recommend-card small {
  display: block;
  overflow: hidden;
  color: var(--app-muted);
  font-size: 0.75rem;
  line-height: 1.125rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.app-detail-main {
  padding-top: 0.75rem;
}

.app-detail-head {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 0.875rem;
  align-items: start;
}

.app-detail-poster {
  aspect-ratio: 3 / 4.3;
  overflow: hidden;
  border-radius: var(--app-radius);
  background: var(--app-panel);
  border: 1px solid var(--app-line);
}

.app-detail-meta {
  min-width: 0;
}

.app-back-link {
  display: inline-flex;
  align-items: center;
  min-height: 1.875rem;
  margin-bottom: 0.5rem;
  color: var(--app-muted);
  font-size: 0.8125rem;
}

.app-detail-meta h1 {
  margin: 0 0 0.625rem;
  font-size: 1.375rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.app-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.app-tags span {
  max-width: 100%;
  padding: 0.25rem 0.4375rem;
  border-radius: 0.375rem;
  background: var(--app-panel);
  color: var(--app-muted);
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}

.app-update {
  margin: 0.625rem 0 0;
  color: var(--app-accent-2);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.app-action-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.app-action-btn {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  height: 2.625rem;
  border: 1px solid var(--app-line);
  border-radius: 0.5rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .025));
  color: var(--app-text);
}

.app-action-btn.is-active {
  border-color: rgba(240, 90, 61, .55);
  background: rgba(240, 90, 61, .16);
}

.app-action-btn em {
  flex: 0 0 auto;
  color: var(--app-muted);
  font-style: normal;
  font-size: 0.75rem;
}

.app-action-btn span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.app-service-float {
  position: fixed;
  right: max(0.875rem, calc((100vw - 32.5rem) / 2 + 0.875rem));
  bottom: calc(5.5rem + var(--app-safe-bottom));
  z-index: 24;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.375rem;
  min-height: 2.5rem;
  max-width: 7rem;
  padding: 0 0.8125rem;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 62.4375rem;
  background: rgba(240, 90, 61, .96);
  color: #fff;
  box-shadow: 0 0.625rem 1.75rem rgba(0, 0, 0, .38);
}

.app-service-float.is-active {
  border-color: rgba(255, 255, 255, .28);
  box-shadow: 0 0.75rem 2rem rgba(240, 90, 61, .35);
  transform: translateY(-0.125rem);
}

.app-service-float span {
  min-width: 0;
  overflow: hidden;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.125rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.app-desc,
.app-line {
  margin: 0.5rem 0 0;
  color: #d7d9dc;
  font-size: 0.875rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.app-episode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.app-episode-grid a,
.app-episode-grid button {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.375rem;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: var(--app-panel);
  color: var(--app-text);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.app-episode-grid button:disabled {
  color: var(--app-muted);
  opacity: .5;
}

.app-player-main {
  padding-top: 0.625rem;
}

.app-player-head {
  padding: 0.75rem 0.875rem 0.5rem;
}

.app-player-head h1 {
  margin: 0.625rem 0 0;
  font-size: 1.375rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.app-player-head p {
  margin: 0.5rem 0 0;
  color: var(--app-muted);
  font-size: 0.8125rem;
}

.app-player-box {
  width: 100%;
  padding: 0 0 0.625rem;
  background: #000;
}

.app-video-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 62vh;
  background: #000;
  object-fit: contain;
}

.app-intel-topic-row {
  margin: 0.625rem 0 0.125rem;
}

.app-intel-hot-list {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: intel-rank;
}

.app-intel-hot-list li {
  counter-increment: intel-rank;
}

.app-intel-hot-list a {
  position: relative;
  display: grid;
  grid-template-columns: 4.625rem minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 0.375rem 0.75rem;
  min-height: 4.625rem;
  padding: 0.625rem 0.75rem 0.625rem 2.625rem;
  border: 1px solid var(--app-line);
  border-radius: 0.625rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .028));
}

.app-intel-hot-list a::before {
  content: counter(intel-rank);
  position: absolute;
  left: 0.75rem;
  top: 0.6875rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.375rem;
  background: rgba(240, 90, 61, .16);
  color: var(--app-accent);
  font-size: 0.75rem;
  line-height: 1.25rem;
  text-align: center;
}

.app-intel-hot-list img {
  grid-row: 1 / 3;
  width: 4.625rem;
  height: 3.375rem;
  border-radius: 0.4375rem;
  object-fit: cover;
}

.app-intel-hot-list strong {
  overflow: hidden;
  font-size: 0.9375rem;
  line-height: 1.25rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
}

.app-intel-hot-list span {
  display: grid;
  gap: 0.1875rem;
  min-width: 0;
}

.app-intel-hot-list em {
  color: var(--app-muted);
  font-style: normal;
  font-size: 0.75rem;
  line-height: 1rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.app-intel-hot-list b {
  color: var(--app-accent);
  font-size: 0.8125rem;
  white-space: nowrap;
}

.app-intel-hot-list small {
  grid-column: 2 / 4;
  color: var(--app-muted);
  font-size: 0.75rem;
}

.app-intel-feed {
  display: grid;
  gap: 0.75rem;
}

.app-intel-card {
  display: grid;
  gap: 0.625rem;
  padding: 0.875rem;
  border: 1px solid var(--app-line);
  border-radius: 0.625rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .032));
  transition: border-color .18s ease, background-color .18s ease;
}

.app-intel-card.has-media {
  grid-template-columns: minmax(0, 1fr) 7.875rem;
  column-gap: 0.75rem;
  align-items: start;
}

.app-intel-card.has-media .app-intel-meta {
  grid-column: 1 / -1;
}

.app-intel-card:active,
.app-intel-hot-list a:active {
  border-color: rgba(240, 90, 61, .45);
  background: var(--app-panel-2);
}

.app-intel-card-main {
  position: relative;
  display: grid;
  gap: 0.3125rem;
  min-width: 0;
  padding-left: 0.875rem;
}

.app-message-dot {
  position: absolute;
  left: 0;
  top: 0.4375rem;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 62.4375rem;
  background: var(--app-accent);
  box-shadow: 0 0 0.625rem rgba(240, 90, 61, .7);
}

.app-intel-card-main strong {
  overflow: hidden;
  color: var(--app-text);
  font-size: 1rem;
  line-height: 1.4375rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
}

.app-intel-card-main em {
  overflow: hidden;
  color: #c7cbce;
  font-style: normal;
  font-size: 0.8125rem;
  line-height: 1.1875rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
}

.app-intel-card-media {
  position: relative;
  display: block;
  width: 7.875rem;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--app-line);
  border-radius: 0.5rem;
  background: #050607;
}

.app-intel-card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-intel-card-media i,
.app-media-preview i {
  position: absolute;
  right: 0.375rem;
  bottom: 0.375rem;
  padding: 0.1875rem 0.375rem;
  border-radius: 62.4375rem;
  background: rgba(0, 0, 0, .7);
  color: #fff;
  font-style: normal;
  font-size: 0.6875rem;
  line-height: 0.875rem;
}

.app-intel-meta,
.app-intel-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  align-items: center;
  color: var(--app-muted);
  font-size: 0.75rem;
  line-height: 1.125rem;
}

.app-intel-meta b,
.app-intel-detail-meta span {
  padding: 0.125rem 0.375rem;
  border-radius: 0.375rem;
  background: rgba(53, 197, 164, .12);
  color: var(--app-accent-2);
  font-weight: 500;
}

.app-intel-meta i {
  color: var(--app-muted);
  font-style: normal;
}

.app-intel-detail {
  display: grid;
  gap: 0.75rem;
}

.app-intel-detail h1 {
  margin: 0;
  color: var(--app-text);
  font-size: 1.4375rem;
  line-height: 1.28;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.app-intel-body {
  color: #e1e3e5;
  font-size: 0.9375rem;
  line-height: 1.85;
  white-space: pre-wrap;
  word-break: break-word;
}

.app-media-grid {
  display: grid;
  grid-template-columns: 1.2fr .9fr .9fr;
  gap: 0.5rem;
}

.app-media-preview {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--app-line);
  border-radius: 0.5rem;
  background: #050607;
}

.app-media-grid .app-media-preview:first-child {
  grid-row: span 2;
  aspect-ratio: auto;
}

.app-media-preview.is-video {
  aspect-ratio: 16 / 9;
}

.app-media-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-media-pill {
  flex: 0 0 auto;
  padding: 0.3125rem 0.5rem;
  border: 1px solid rgba(53, 197, 164, .22);
  border-radius: 62.4375rem;
  background: rgba(53, 197, 164, .1);
  color: var(--app-accent-2);
  font-size: 0.75rem;
  line-height: 1rem;
}

.app-pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.625rem;
  margin: 1.125rem 0 0.25rem;
}

.app-pagination a,
.app-pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.375rem;
  border-radius: var(--app-radius);
  background: var(--app-panel);
  color: var(--app-text);
}

.app-pagination span {
  color: #666c70;
}

.app-pagination em {
  color: var(--app-muted);
  font-style: normal;
  font-size: 0.8125rem;
}

.app-empty {
  width: 100%;
  padding: 1.5rem 0.75rem;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: var(--app-panel);
  color: var(--app-muted);
  text-align: center;
  font-size: 0.875rem;
}

.app-me-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.app-me-stats a {
  min-width: 0;
  padding: 0.75rem 0.5rem;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: var(--app-panel);
  color: inherit;
  text-align: center;
  text-decoration: none;
}

.app-me-stats strong {
  display: block;
  color: var(--app-text);
  font-size: 1.1875rem;
  line-height: 1.2;
}

.app-me-stats span {
  display: block;
  margin-top: 0.25rem;
  color: var(--app-muted);
  font-size: 0.75rem;
}

.app-toast {
  position: fixed;
  left: 50%;
  bottom: calc(4.75rem + var(--app-safe-bottom));
  z-index: 30;
  max-width: calc(100% - 2.25rem);
  transform: translate(-50%, 0.75rem);
  padding: 0.5625rem 0.75rem;
  border-radius: var(--app-radius);
  background: rgba(0, 0, 0, .78);
  color: #fff;
  font-size: 0.8125rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.app-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.app-comment-count {
  position: absolute;
  top: 0.375rem;
  right: 0.375rem;
  padding: 0.1875rem 0.375rem;
  border-radius: 62.4375rem;
  background: rgba(240, 90, 61, .88);
  color: #fff;
  font-style: normal;
  font-size: 0.625rem;
  line-height: 1.2;
}

.app-card-public-meta {
  display: none;
}

.app-comment-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, .55);
  opacity: 0;
  transition: opacity .18s ease;
}

.app-comment-backdrop.is-open {
  opacity: 1;
}

.app-comment-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 100;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(100%, 32.5rem);
  max-height: 78vh;
  transform: translate(-50%, 100%);
  border: 1px solid var(--app-line);
  border-bottom: 0;
  border-radius: 1rem 1rem 0 0;
  background: linear-gradient(160deg, #1b1f22, #111314);
  box-shadow: 0 -1rem 2.625rem rgba(0, 0, 0, .55);
  transition: transform .22s cubic-bezier(0, 0, 0.2, 1);
}

.app-comment-sheet.is-open {
  transform: translate(-50%, 0);
}

.app-comment-sheet header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.875rem;
  border-bottom: 1px solid var(--app-line);
}

.app-comment-sheet header strong {
  font-size: 1.125rem;
  line-height: 1.3;
}

.app-comment-sheet header button {
  height: 2rem;
  border: 0;
  border-radius: var(--app-radius);
  padding: 0 0.625rem;
  background: var(--app-panel-2);
  color: var(--app-muted);
}

.app-comment-list {
  display: grid;
  align-content: start;
  gap: 0.625rem;
  min-height: 10rem;
  overflow-y: auto;
  padding: 0.75rem 0.875rem;
}

.app-comment-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.625rem;
  min-width: 0;
  padding: 0.625rem;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .032));
}

.app-comment-history .app-comment-item {
  display: block;
  margin-bottom: 0.5rem;
}

.app-comment-avatar,
.app-comment-avatar img,
.app-comment-avatar span {
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 62.4375rem;
}

.app-comment-avatar {
  overflow: hidden;
  background: rgba(53, 197, 164, .16);
}

.app-comment-avatar span {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--app-accent-2);
  font-size: 0.875rem;
  font-weight: 700;
}

.app-comment-item strong {
  display: block;
  color: var(--app-text);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.app-comment-item p {
  margin: 0.1875rem 0 0;
  color: #e1e3e5;
  font-size: 0.875rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.app-comment-item small,
.app-comment-item span {
  display: block;
  margin-top: 0.25rem;
  color: var(--app-muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

.app-comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4rem;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem calc(0.625rem + var(--app-safe-bottom));
  border-top: 1px solid var(--app-line);
  background: rgba(13, 15, 16, .96);
}

.app-comment-form textarea {
  min-width: 0;
  max-height: 5.75rem;
  resize: vertical;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  padding: 0.5625rem 0.625rem;
  background: var(--app-panel-2);
  color: var(--app-text);
  outline: none;
}

.app-comment-form button {
  border: 0;
  border-radius: var(--app-radius);
  background: var(--app-accent);
  color: #fff;
  font-weight: 600;
}

.app-comment-preview {
  padding: 0.75rem;
  border: 1px solid var(--app-line);
  border-radius: 0.75rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .028));
}

.app-comment-preview .app-section-title {
  margin-bottom: 0.5rem;
}

.app-comment-preview .app-section-title h2 {
  color: var(--app-accent);
}

.app-comment-preview .app-section-title button {
  border: 0;
  background: transparent;
  color: var(--app-muted);
  font-size: 0.8125rem;
}

.app-comment-preview-list {
  display: grid;
  gap: 0.5rem;
}

.app-comment-preview-item {
  display: grid;
  grid-template-columns: 2.125rem minmax(0, 1fr) auto;
  gap: 0.625rem;
  align-items: start;
  padding: 0.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.app-comment-preview-item:first-child {
  border-top: 0;
}

.app-comment-preview-item strong {
  display: block;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.app-comment-preview-item strong em {
  color: var(--app-muted);
  font-style: normal;
  font-weight: 400;
}

.app-comment-preview-item p {
  margin: 0.1875rem 0 0;
  color: #e1e3e5;
  font-size: 0.875rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.app-comment-preview-item small {
  color: var(--app-accent);
  font-size: 0.75rem;
  white-space: nowrap;
}

.app-inline-comment-input {
  width: 100%;
  min-height: 2.625rem;
  border: 1px solid var(--app-line);
  border-radius: 62.4375rem;
  padding: 0 0.875rem;
  background: rgba(255, 255, 255, .05);
  color: var(--app-muted);
  text-align: left;
}

.app-media-page {
  min-height: calc(100vh - 4.75rem - var(--app-safe-bottom));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 0.75rem;
  padding-top: 0.625rem;
}

.app-media-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--app-muted);
}

.app-media-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 22.5rem;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #050607;
}

.app-media-stage img,
.app-media-stage video {
  width: 100%;
  height: 100%;
  max-height: 62vh;
  object-fit: contain;
}

.app-media-caption h1 {
  margin: 0 0 0.625rem;
  font-size: 1rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.app-media-filmstrip {
  display: flex;
  gap: 0.5rem;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: none;
}

.app-media-filmstrip::-webkit-scrollbar {
  display: none;
}

.app-media-filmstrip a {
  position: relative;
  flex: 0 0 4.5rem;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--app-line);
  border-radius: 0.5rem;
  background: #050607;
}

.app-media-filmstrip a.is-active {
  border-color: var(--app-accent);
}

.app-media-filmstrip video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-media-filmstrip i {
  position: absolute;
  right: 0.3125rem;
  bottom: 0.3125rem;
  padding: 0.125rem 0.3125rem;
  border-radius: 62.4375rem;
  background: rgba(0, 0, 0, .7);
  color: #fff;
  font-style: normal;
  font-size: 0.625rem;
}

body.is-comment-open {
  overflow: hidden;
}

.app-error-main {
  min-height: 60vh;
  display: flex;
  align-items: center;
}

.app-bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(100%, 32.5rem);
  transform: translateX(-50%);
  padding: 0.5rem 0.625rem calc(0.5rem + var(--app-safe-bottom));
  border-top: 1px solid var(--app-line);
  background: rgba(13, 15, 16, .96);
  backdrop-filter: blur(0.875rem);
}

.app-bottom-nav a {
  display: grid;
  grid-template-rows: 1.25rem auto;
  gap: 0.1875rem;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
  border-radius: var(--app-radius);
  color: var(--app-muted);
  font-size: 0.75rem;
}

.app-bottom-nav a.is-active {
  color: var(--app-accent);
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
}

@media (min-width: 460px) {
  .app-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .app-feature-card {
    flex-basis: 68%;
  }
}

@media (max-width: 380px) {
  .app-intel-card.has-media {
    grid-template-columns: minmax(0, 1fr) 6.5rem;
  }

  .app-intel-card-media {
    width: 6.5rem;
  }

  .app-media-grid {
    grid-template-columns: 1fr 1fr;
  }
}

