.blog {
  --blog-bg: rgba(7, 14, 26, 0.86);
  --blog-card: rgba(10, 18, 34, 0.82);
  --blog-soft: rgba(255, 255, 255, 0.04);
  --blog-border: rgba(173, 195, 229, 0.14);
  --blog-border-strong: rgba(173, 195, 229, 0.24);
  --blog-text: #eef4ff;
  --blog-muted: #b9c8e0;
  --blog-dim: #8fa3c5;
  --blog-accent: #5cc7ff;
  --blog-accent-2: #83f1ff;
  --blog-gold: #f3c85f;
  --blog-shadow: 0 28px 60px rgba(2, 6, 23, 0.34);
  position: relative;
  padding: 20px 16px 28px;
  color: var(--blog-text);
}

.blog::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top left, rgba(92, 199, 255, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(126, 241, 255, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 34%);
}

.blog > * {
  position: relative;
  z-index: 1;
}

.blog-hero,
.blog-overview,
.blog-toolbar,
.blog-featured,
.blog-card,
.blog-post,
.modal__dialog {
  border: 1px solid var(--blog-border);
  background: linear-gradient(180deg, rgba(8, 16, 29, 0.94), rgba(11, 24, 43, 0.82));
  box-shadow: var(--blog-shadow);
}

.blog-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 320px;
  gap: 18px;
  padding: 22px;
  border-radius: 28px;
  overflow: hidden;
}

.blog-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--blog-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.blog-title {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.02;
}

.blog-subtitle {
  max-width: 860px;
  margin: 12px 0 0;
  color: var(--blog-muted);
  line-height: 1.65;
  font-size: 15px;
}

.blog-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.blog-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--blog-text);
  font-size: 12px;
  font-weight: 700;
}

.blog-hero__actions {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(92, 199, 255, 0.12), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(92, 199, 255, 0.16);
}

.blog-hero__note {
  color: var(--blog-muted);
  line-height: 1.6;
  font-size: 13px;
}

.blog-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--blog-text);
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}

.blog-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.blog-btn--primary {
  border-color: rgba(92, 199, 255, 0.28);
  background: linear-gradient(135deg, rgba(13, 121, 156, 0.84), rgba(37, 99, 235, 0.9));
  box-shadow: 0 18px 32px rgba(15, 80, 140, 0.22);
}

.blog-btn--primary:hover {
  background: linear-gradient(135deg, rgba(13, 121, 156, 0.94), rgba(37, 99, 235, 0.98));
}

.blog-btn--ghost {
  background: rgba(255, 255, 255, 0.04);
}

.blog-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) 320px;
  gap: 16px;
  margin-top: 16px;
}

.blog-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.blog-kpi,
.blog-sidecard,
.blog-featured__card,
.blog-card,
.blog-post,
.blog-empty,
.comment {
  border-radius: 22px;
}

.blog-kpi {
  padding: 18px 16px;
  border: 1px solid var(--blog-border);
  background: rgba(255, 255, 255, 0.035);
}

.blog-kpi__label,
.blog-kpi__hint {
  display: block;
}

.blog-kpi__label {
  color: var(--blog-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.blog-kpi__value {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.4rem, 2vw, 2rem);
  line-height: 1;
}

.blog-kpi__hint {
  margin-top: 8px;
  color: var(--blog-dim);
  font-size: 12px;
  line-height: 1.45;
}

.blog-sidecard {
  padding: 18px;
}

.blog-sidecard__title {
  font-size: 15px;
  font-weight: 900;
}

.blog-sidecard__steps {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  color: var(--blog-muted);
  line-height: 1.55;
}

.blog-sidecard__foot {
  margin-top: 14px;
  color: var(--blog-dim);
  font-size: 13px;
  line-height: 1.55;
}

.blog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 24px;
}

.blog-toolbar__left,
.blog-toolbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.blog-segmented {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--blog-border);
  background: rgba(255, 255, 255, 0.04);
}

.blog-segmented__btn {
  appearance: none;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--blog-muted);
  font-weight: 800;
  cursor: pointer;
}

.blog-segmented__btn.is-active {
  background: rgba(92, 199, 255, 0.16);
  color: var(--blog-text);
}

.blog-search {
  min-width: min(360px, 100%);
}

.blog-search input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--blog-border);
  background: rgba(4, 10, 20, 0.62);
  color: var(--blog-text);
  outline: none;
}

.blog-search input:focus,
.field__input:focus {
  border-color: rgba(125, 211, 252, 0.44);
  box-shadow: 0 0 0 4px rgba(125, 211, 252, 0.1);
}

.blog-count {
  color: var(--blog-muted);
  font-size: 13px;
  font-weight: 700;
}

.blog-featured {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.blog-featured__card {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  padding: 18px;
}

.blog-featured__card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 12, 23, 0.18), rgba(5, 12, 23, 0.88)),
    var(--featured-image, linear-gradient(135deg, rgba(92, 199, 255, 0.18), rgba(255, 255, 255, 0.03)));
  background-size: cover;
  background-position: center;
}

.blog-featured__card > * {
  position: relative;
  z-index: 1;
}

.blog-featured__eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.blog-featured__title {
  margin-top: 14px;
  font-size: 20px;
  line-height: 1.15;
  font-weight: 900;
}

.blog-featured__meta {
  margin-top: 10px;
  color: var(--blog-muted);
  font-size: 13px;
  line-height: 1.55;
}

.blog-featured__action {
  margin-top: 16px;
}

.blog-feed {
  margin-top: 16px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.blog-post {
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.blog-post:hover {
  transform: translateY(-2px);
  border-color: var(--blog-border-strong);
  box-shadow: 0 24px 40px rgba(2, 6, 23, 0.24);
}

.blog-post__thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.blog-post__thumb img,
.blog-post__thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-post__overlay {
  position: absolute;
  inset: auto 14px 14px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.blog-post__type,
.blog-post__score {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(5, 12, 23, 0.74);
  backdrop-filter: blur(10px);
  font-size: 11px;
  font-weight: 800;
}

.blog-post__score {
  color: var(--blog-gold);
}

.blog-post__body {
  padding: 16px;
}

.blog-post__caption {
  font-size: 16px;
  font-weight: 900;
  line-height: 1.3;
}

.blog-post__caption.is-empty {
  color: var(--blog-dim);
}

.blog-post__meta,
.blog-post__submeta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.blog-post__meta {
  margin-top: 10px;
  color: var(--blog-muted);
  font-size: 13px;
}

.blog-post__submeta {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--blog-dim);
  font-size: 12px;
}

.blog-post__author {
  font-weight: 800;
  color: var(--blog-text);
}

.blog-post__stats {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.blog-empty {
  display: grid;
  place-items: center;
  min-height: 240px;
  padding: 24px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
  color: var(--blog-muted);
  line-height: 1.65;
}

.blog-skeleton {
  display: grid;
  grid-template-columns: inherit;
  gap: 14px;
}

.blog-skeleton__card {
  border-radius: 22px;
  min-height: 300px;
  border: 1px solid var(--blog-border);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.05));
  background-size: 200% 100%;
  animation: blog-shimmer 1.15s linear infinite;
}

@keyframes blog-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 10000;
}

.modal.is-open {
  display: block;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(4px);
}

.modal__dialog {
  position: relative;
  width: min(900px, calc(100% - 24px));
  margin: 20px auto;
  border-radius: 24px;
  overflow: hidden;
}

.modal__dialog--wide {
  width: min(1240px, calc(100% - 24px));
}

.modal__dialog--zoom {
  width: min(1100px, calc(100% - 24px));
}

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.modal__title {
  font-size: 18px;
  font-weight: 900;
}

.modal__hint,
.modal__sub {
  margin-top: 4px;
  color: var(--blog-dim);
  line-height: 1.5;
  font-size: 13px;
}

.modal__close {
  appearance: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--blog-text);
  font-size: 20px;
  cursor: pointer;
}

.upload {
  padding: 18px;
}

.upload__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

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

.field__label {
  color: var(--blog-muted);
  font-size: 13px;
  font-weight: 700;
}

.field__input {
  width: 100%;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid var(--blog-border);
  background: rgba(4, 10, 20, 0.62);
  color: var(--blog-text);
  outline: none;
}

.field__input--area {
  resize: vertical;
  min-height: 96px;
}

#mediaInput {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.upload__drop {
  position: relative;
  margin-top: 14px;
  border-radius: 22px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
  padding: 14px;
  outline: none;
}

.upload__drop.is-has-files {
  border-style: solid;
  border-color: rgba(92, 199, 255, 0.26);
  background: linear-gradient(180deg, rgba(92, 199, 255, 0.08), rgba(255, 255, 255, 0.03));
}

.upload__drop.is-invalid {
  border-color: rgba(255, 122, 122, 0.34);
  box-shadow: 0 0 0 4px rgba(255, 122, 122, 0.08);
}

.upload__drop.is-drag {
  border-color: rgba(92, 199, 255, 0.42);
  box-shadow: 0 0 0 4px rgba(92, 199, 255, 0.08);
}

.upload__drop-ui {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  pointer-events: none;
}

.upload__drop-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.upload__drop-copy strong {
  display: block;
  font-size: 15px;
}

.upload__drop-note {
  margin-top: 4px;
  color: var(--blog-dim);
  font-size: 13px;
  line-height: 1.55;
}

.upload__counter {
  margin-left: auto;
  min-width: 46px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.upload__rules {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  padding: 0 12px 10px;
  color: var(--blog-dim);
  font-size: 13px;
}

.upload__picked {
  margin-left: auto;
  color: var(--blog-text);
}

.upload__ready {
  display: grid;
  gap: 4px;
  margin: 0 12px 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(92, 199, 255, 0.18);
  background: rgba(92, 199, 255, 0.08);
  color: var(--blog-text);
}

.upload__ready strong {
  font-size: 13px;
}

.upload__ready span {
  color: var(--blog-muted);
  font-size: 12px;
  line-height: 1.5;
}

.upload__preview {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 0 12px 10px;
}

.upload__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.upload__status,
.commentform__status,
.ratebox__note {
  margin-top: 10px;
  color: var(--blog-muted);
  line-height: 1.55;
  font-size: 13px;
}

.blog-card {
  padding: 16px;
}

.blog-card__title {
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 900;
}

.preview {
  position: relative;
  aspect-ratio: 16 / 11;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(15, 24, 41, 0.98), rgba(10, 17, 31, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.preview__media {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(92, 199, 255, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(6, 12, 23, 0.24), rgba(6, 12, 23, 0.72));
}

.preview img,
.preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview video {
  background: rgba(0, 0, 0, 0.18);
}

.preview.is-ready {
  border-color: rgba(92, 199, 255, 0.18);
}

.preview.is-fallback {
  border-color: rgba(255, 255, 255, 0.14);
}

.preview__badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(5, 12, 23, 0.78);
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
}

.preview__name {
  position: absolute;
  top: 10px;
  right: 10px;
  left: 10px;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(5, 12, 23, 0.76);
  color: var(--blog-text);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview__helper {
  position: absolute;
  right: 10px;
  bottom: 44px;
  left: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(5, 12, 23, 0.72);
  color: var(--blog-muted);
  font-size: 11px;
  line-height: 1.4;
}

.preview__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 18px 14px;
  text-align: center;
  background:
    radial-gradient(circle at top, rgba(92, 199, 255, 0.1), transparent 36%),
    linear-gradient(180deg, rgba(10, 18, 34, 0.96), rgba(7, 13, 24, 0.96));
}

.preview__fallbackIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  font-size: 20px;
}

.preview__fallbackText {
  color: var(--blog-text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.preview__fallbackMeta {
  color: var(--blog-dim);
  font-size: 11px;
  line-height: 1.35;
  word-break: break-word;
}

.preview__video {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--blog-text);
  gap: 8px;
}

.preview__videoIcon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.preview__videoTxt {
  color: var(--blog-muted);
  font-size: 13px;
}

.upload__status:not(:empty) {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(92, 199, 255, 0.14);
  background: rgba(92, 199, 255, 0.06);
  color: var(--blog-text);
}

.upload__status.is-success:not(:empty) {
  border-color: rgba(92, 199, 255, 0.18);
  background: rgba(92, 199, 255, 0.08);
}

.upload__status.is-error:not(:empty) {
  border-color: rgba(255, 122, 122, 0.22);
  background: rgba(124, 25, 37, 0.24);
}

.upload__status.is-info:not(:empty) {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.viewer {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) 360px;
  gap: 14px;
  padding: 16px;
}

.viewer__main {
  min-width: 0;
}

.viewer__stage {
  position: relative;
  min-height: 420px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.48);
}

.viewer__stage img,
.viewer__stage video {
  width: 100%;
  height: 100%;
  max-height: 74vh;
  object-fit: contain;
  display: block;
  background: #000;
}

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

.viewer__thumb {
  width: 78px;
  height: 58px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

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

.viewer__thumb.is-active {
  border-color: rgba(92, 199, 255, 0.42);
  box-shadow: 0 0 0 2px rgba(92, 199, 255, 0.12);
}

.viewer__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(5, 12, 23, 0.76);
  color: var(--blog-text);
  font-size: 18px;
  cursor: pointer;
}

.viewer__nav--prev {
  left: 12px;
}

.viewer__nav--next {
  right: 12px;
}

.viewer__zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
}

.viewer__side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.viewer-meta {
  display: grid;
  gap: 10px;
}

.viewer-meta__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
}

.viewer-meta__key {
  color: var(--blog-dim);
}

.viewer-meta__val {
  color: var(--blog-text);
  font-weight: 700;
  text-align: right;
}

.stars {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.stars--gold {
  color: var(--blog-gold);
}

.stars .star {
  width: 17px;
  height: 17px;
}

.ratebox {
  margin-top: 12px;
}

.ratebox__label {
  color: var(--blog-muted);
  font-size: 13px;
  font-weight: 700;
}

.ratebox__stars {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.ratebox__stars button {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--blog-gold);
  font-size: 20px;
  cursor: pointer;
}

.ratebox__stars button.is-on {
  background: rgba(243, 200, 95, 0.12);
  border-color: rgba(243, 200, 95, 0.32);
}

.rating__meta {
  margin-top: 10px;
  color: var(--blog-muted);
  font-size: 13px;
}

.comments {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.comment__head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--blog-dim);
  font-size: 12px;
}

.comment__user {
  color: var(--blog-text);
  font-weight: 800;
}

.comment__text {
  color: var(--blog-muted);
  white-space: pre-wrap;
  line-height: 1.6;
  font-size: 13px;
}

.zoom {
  display: grid;
  place-items: center;
  min-height: 72vh;
  padding: 18px;
  background: rgba(0, 0, 0, 0.74);
}

.zoom img {
  max-width: 100%;
  max-height: 76vh;
  border-radius: 18px;
  display: block;
}

@media (max-width: 1180px) {
  .blog-hero,
  .blog-overview,
  .viewer {
    grid-template-columns: 1fr;
  }

  .blog-kpis,
  .blog-featured,
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 880px) {
  .upload__grid,
  .blog-kpis,
  .blog-featured,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog {
    padding: 14px 12px 22px;
  }

  .blog-hero,
  .blog-toolbar {
    padding: 16px;
    border-radius: 24px;
  }

  .upload__preview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .blog-title {
    font-size: 1.75rem;
  }

  .blog-toolbar__left,
  .blog-toolbar__right {
    width: 100%;
  }

  .blog-search {
    min-width: 0;
    width: 100%;
  }

  .blog-segmented {
    width: 100%;
  }

  .blog-segmented__btn {
    flex: 1 1 50%;
  }

  .upload__drop-ui {
    align-items: flex-start;
  }

  .upload__counter {
    margin-left: 0;
  }

  .upload__ready {
    margin: 0 0 10px;
  }

  .upload__preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .viewer__thumb {
    width: calc(25% - 8px);
    min-width: 62px;
  }

  .ratebox__stars button {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 520px) {
  .upload__preview {
    grid-template-columns: 1fr;
  }

  .preview {
    aspect-ratio: 16 / 10;
  }

  .preview__name,
  .preview__helper {
    font-size: 10px;
  }
}

/* 2026-03-08: viewer scroll + lighter blog scale */
.modal {
  overflow-y: auto;
  padding: 16px 0;
}

.modal__dialog {
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
}

.viewer {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.viewer__main,
.viewer__side,
.blog-card {
  min-height: 0;
}

.viewer__side {
  max-height: calc(100vh - 170px);
  overflow-y: auto;
  padding-right: 4px;
}

.viewer__side::-webkit-scrollbar,
.comments::-webkit-scrollbar {
  width: 10px;
}

.viewer__side::-webkit-scrollbar-thumb,
.comments::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.comments {
  max-height: min(34vh, 320px);
  overflow-y: auto;
  padding-right: 4px;
}

.blog-hero {
  gap: 16px;
  padding: 18px;
}

.blog-title {
  font-size: clamp(1.45rem, 2.3vw, 2.35rem);
}

.blog-subtitle {
  margin-top: 10px;
  max-width: 74ch;
  font-size: 13px;
  line-height: 1.58;
}

.blog-badges {
  gap: 8px;
  margin-top: 14px;
}

.blog-badge {
  min-height: 30px;
  padding: 0 10px;
  font-size: 11px;
}

.blog-hero__actions,
.blog-sidecard,
.blog-kpi,
.blog-toolbar,
.blog-card,
.blog-post__body,
.upload,
.modal__header {
  padding: 14px;
}

.blog-btn {
  min-height: 42px;
  padding: 0 14px;
  font-size: 13px;
}

.blog-hero__note,
.blog-kpi__hint,
.blog-sidecard__foot,
.blog-featured__meta,
.blog-count,
.blog-post__meta,
.blog-post__submeta,
.rating__meta,
.upload__drop-note,
.upload__rules,
.upload__status,
.commentform__status,
.ratebox__note,
.comment__text {
  font-size: 12px;
}

.blog-kpi__label,
.blog-sidecard__title,
.blog-card__title,
.ratebox__label,
.field__label,
.blog-post__type,
.blog-post__score,
.modal__hint,
.modal__sub {
  font-size: 11px;
}

.blog-kpi__value {
  font-size: clamp(1.2rem, 1.8vw, 1.6rem);
}

.blog-featured__card {
  min-height: 180px;
  padding: 16px;
}

.blog-featured__title {
  font-size: 17px;
}

.blog-toolbar {
  gap: 10px;
}

.blog-search input {
  min-height: 40px;
  font-size: 13px;
}

.blog-post__caption {
  font-size: 14px;
}

.blog-post__body {
  padding: 14px;
}

.modal__title {
  font-size: 16px;
}

.viewer {
  grid-template-columns: minmax(0, 1.55fr) 330px;
}

.viewer__stage {
  min-height: 360px;
}

.ratebox__stars button {
  width: 38px;
  height: 38px;
  font-size: 18px;
}

@media (max-width: 1180px) {
  .viewer {
    grid-template-columns: 1fr;
    max-height: none;
  }

  .viewer__side {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .comments {
    max-height: 240px;
  }
}

@media (max-width: 640px) {
  .modal {
    padding: 8px 0;
  }

  .modal__dialog {
    width: min(100% - 12px, 1100px);
    max-height: calc(100vh - 12px);
    border-radius: 18px;
  }

  .blog-title {
    font-size: 1.7rem;
  }

  .blog-kpi__value {
    font-size: 1.35rem;
  }

  .comments {
    max-height: 200px;
  }
}

/* Blog sidebar fix: rating + meta + comments layout */
.blog-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.viewer__side {
  min-width: 0;
  gap: 14px;
}

.viewer__side .blog-card {
  flex: 0 0 auto;
}

.viewer-meta__row {
  align-items: flex-start;
  flex-wrap: wrap;
  min-width: 0;
}

.viewer-meta__key {
  flex: 0 0 auto;
}

.viewer-meta__val {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.rating,
.ratebox,
.comments,
.commentform {
  min-width: 0;
}

.ratebox {
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ratebox__stars {
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.ratebox__stars button {
  touch-action: manipulation;
  user-select: none;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

.ratebox__stars button:hover:not(:disabled),
.ratebox__stars button:focus-visible:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(243, 200, 95, 0.42);
  background: rgba(243, 200, 95, 0.14);
  box-shadow: 0 10px 24px rgba(243, 200, 95, 0.16);
}

.ratebox__stars button.is-selected {
  border-color: rgba(243, 200, 95, 0.5);
  box-shadow: 0 12px 26px rgba(243, 200, 95, 0.18);
}

.ratebox__stars button:disabled {
  opacity: 0.72;
  cursor: wait;
}

.ratebox__note[data-kind="success"] {
  color: #9be6b4;
}

.ratebox__note[data-kind="error"] {
  color: #fda4af;
}

.comment {
  overflow: hidden;
}

.comment__head {
  align-items: flex-start;
  flex-wrap: wrap;
}

.comment__head > :last-child {
  margin-left: auto;
  text-align: right;
}

.commentform {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

@media (max-width: 640px) {
  .viewer-meta__row,
  .comment__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .comment__head > :last-child,
  .viewer-meta__val {
    margin-left: 0;
    text-align: left;
  }

  .ratebox__stars {
    gap: 10px;
  }

  .ratebox__stars button {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
}

/* 2026-03-16: mobile upload modal - visible submit action */
.modal__dialog .upload {
  flex: 1 1 auto;
  min-height: 0;
}

@media (max-width: 640px) {
  .modal__dialog {
    overflow: hidden;
  }

  .modal__dialog .upload {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }

  .upload__grid {
    grid-template-columns: 1fr;
  }

  .upload__drop {
    margin-top: 12px;
    padding: 12px;
  }

  .upload__drop-ui {
    gap: 10px;
    padding: 10px;
  }

  .upload__drop-copy strong {
    font-size: 14px;
    line-height: 1.35;
  }

  .upload__drop-note {
    font-size: 12px;
  }

  .upload__rules {
    gap: 8px;
  }

  .upload__actions {
    position: sticky;
    bottom: 0;
    z-index: 8;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 12px;
    padding: 12px 0 calc(4px + env(safe-area-inset-bottom));
    background: linear-gradient(
      180deg,
      rgba(8, 14, 26, 0),
      rgba(8, 14, 26, 0.92) 24%,
      rgba(8, 14, 26, 0.98)
    );
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
  }

  .upload__actions .blog-btn {
    width: 100%;
    min-height: 46px;
  }

  .upload__actions .blog-btn--primary {
    box-shadow: 0 14px 30px rgba(51, 126, 255, 0.28);
  }

  .upload__status {
    margin-top: 8px;
    padding-bottom: 4px;
  }
}

@media (max-width: 520px) {
  .upload {
    padding: 12px;
  }

  .upload__rules,
  .upload__ready,
  .upload__preview {
    padding-left: 4px;
    padding-right: 4px;
  }

  .upload__ready {
    margin-left: 4px;
    margin-right: 4px;
  }
}
