.x-count-page {
  background: #fff;
}

.x-count,
.x-count * {
  box-sizing: border-box;
}

.x-count [hidden] {
  display: none !important;
}

.x-count {
  --x-count-ink: #172033;
  --x-count-muted: #667085;
  color: var(--x-count-ink);
  padding: 12px 0 40px;
}

.x-count__inner {
  width: auto;
}

.x-count__app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
  gap: 18px;
  align-items: start;
  margin-top: 12px;
}

.x-count__main {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.x-count__textarea-label {
  display: block;
  margin: 0 0 8px;
  color: var(--x-count-ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}

.x-count__textarea {
  display: block;
  width: 100%;
  min-height: 330px;
  padding: 14px;
  resize: vertical;
  border: 1px solid #d9e1ea;
  border-radius: 8px;
  background: #fff;
  color: var(--x-count-ink);
  font: inherit;
  font-size: 16px;
  line-height: 1.75;
}

.x-count__textarea:focus {
  outline: 3px solid color-mix(in srgb, var(--accent-color) 20%, transparent);
  outline-offset: 2px;
}

.x-count__actions {
  justify-content: flex-start;
}

.x-count__emoji-toggle {
  justify-content: space-between;
  gap: 8px;
  padding-left: 10px;
  padding-right: 8px;
}

.x-count__emoji-toggle-label {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  min-width: 0;
}

.x-count__emoji-toggle-icon {
  font-size: 16px;
  line-height: 1;
}

.x-count__emoji-toggle-mark {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #effaff;
  color: var(--accent-color);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.x-count__emoji-toggle-mark::before {
  content: "+";
  transform: translateY(-1px);
}

.x-count__emoji-toggle[aria-expanded="true"] .x-count__emoji-toggle-mark::before {
  content: "-";
}

.x-count__emoji-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--accent-color) 20%, transparent);
  border-radius: 8px;
  background: #effaff;
}

.x-count__emoji-title {
  margin: 0 0 8px;
  color: #172033;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}

.x-count__emoji-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 10px;
  padding-bottom: 3px;
  scrollbar-gutter: stable;
}

.x-count__emoji-tab {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #d9e1ea;
  border-radius: 999px;
  background: #fff;
  color: #344054;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  cursor: pointer;
}

.x-count__emoji-tab.is-active {
  border-color: var(--accent-color);
  background: #fff0fa;
  color: var(--main-color);
}

.x-count__emoji-tab:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent-color) 20%, transparent);
  outline-offset: 2px;
}

.x-count__emoji-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 8px;
  max-height: 236px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.x-count__emoji-button {
  display: inline-grid;
  place-items: center;
  min-width: 0;
  min-height: 40px;
  padding: 6px;
  border: 1px solid #d9e1ea;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, transform 0.2s;
}

.x-count__emoji-button:hover,
.x-count__emoji-button:focus-visible {
  border-color: var(--accent-color);
  background: #fff0fa;
  transform: translateY(-1px);
}

.x-count__emoji-button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent-color) 20%, transparent);
  outline-offset: 2px;
}

.x-count__stats-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.x-count__stat-card {
  display: inline-flex;
  flex: 1 1 calc(50% - 3px);
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
  justify-content: center;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid #edf1f5;
  border-radius: 8px;
  background: #f8fafc;
}

.x-count__stat-card--main {
  background: #fff0fa;
  border-color: color-mix(in srgb, var(--main-color) 24%, transparent);
}

.x-count__stat-card span {
  color: #475467;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.x-count__stat-card strong {
  color: var(--accent-color);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.x-count__stat-card--main strong,
.x-count__stat-card--main em {
  color: var(--main-color);
}

.x-count__stat-card em {
  display: inline-flex;
  gap: 3px;
  align-items: baseline;
  margin-left: 2px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.x-count__stat-card em b {
  font-size: 14px;
  font-weight: 800;
}

.x-count__meter {
  overflow: hidden;
  height: 6px;
  margin-top: 8px;
  border-radius: 999px;
  background: #edf1f5;
}

.x-count__meter span {
  display: block;
  width: 0;
  max-width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent-color);
  transition: width 0.2s, background-color 0.2s;
}

.x-count__meter.is-over span {
  background: var(--main-color);
}

.x-count__linebreak-note {
  margin: 7px 0 0;
  padding: 7px 9px;
  border: 1px solid color-mix(in srgb, var(--accent-color) 18%, transparent);
  border-radius: 8px;
  background: #effaff;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
}

.x-count__preview-section {
  margin-top: 0;
}

.x-count__mode-switch {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  padding: 8px 10px;
  border: 1px solid #edf1f5;
  border-radius: 8px;
  background: #f8fafc;
}

.x-count__mode-switch .omoshiro-tool__setting-label {
  margin: 0;
  white-space: nowrap;
}

.x-count__result-section {
  margin-bottom: 10px;
}

.x-count__post-card {
  --x-count-post-bg: #fff;
  --x-count-post-text: #172033;
  --x-count-post-muted: #667085;
  --x-count-post-border: #d9e1ea;
  --x-count-post-divider: #edf1f5;
  padding: 14px;
  border: 1px solid var(--x-count-post-border);
  border-radius: 8px;
  background: var(--x-count-post-bg);
  color: var(--x-count-post-text);
}

.x-count__post-card.is-dark {
  --x-count-post-bg: #101828;
  --x-count-post-text: #f8fafc;
  --x-count-post-muted: #98a2b3;
  --x-count-post-border: #344054;
  --x-count-post-divider: rgba(255, 255, 255, 0.12);
}

.x-count__post-card.is-over {
  border-color: color-mix(in srgb, var(--main-color) 56%, #d9e1ea);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--main-color) 18%, transparent);
}

.x-count__post-card--expanded {
  box-shadow: none;
}

.x-count__post-head {
  display: flex;
  gap: 10px;
  align-items: center;
}

.x-count__avatar {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff0fa, #effaff);
  color: var(--main-color);
  font-size: 18px;
  font-weight: 800;
}

.x-count__profile {
  min-width: 0;
}

.x-count__display-name,
.x-count__user-name,
.x-count__post-body {
  margin: 0;
}

.x-count__display-name {
  color: var(--x-count-post-text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.x-count__user-name {
  color: var(--x-count-post-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.x-count__post-body {
  margin-top: 12px;
  color: var(--x-count-post-text);
  font-size: 16px;
  line-height: 1.7;
  text-align: left;
  overflow-wrap: anywhere;
}

.x-count__post-body.is-empty {
  color: var(--x-count-post-muted);
}

.x-count__preview-text {
  white-space: pre-wrap;
}

.x-count__show-more {
  display: block;
  width: fit-content;
  margin-top: 4px;
  color: #1d9bf0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

.x-count__post-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 52px;
  margin-top: 14px;
  padding-left: 4px;
  color: var(--x-count-post-muted);
}

.x-count__post-action {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: inherit;
}

.x-count__post-icon {
  color: inherit;
  font-family: "Material Symbols Rounded";
  font-style: normal;
  font-weight: 400;
  font-size: 20px;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  letter-spacing: normal;
  line-height: 1;
  text-transform: none;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}

.x-count__post-footer {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--x-count-post-divider);
}

.x-count__expanded-preview {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #edf1f5;
}

.x-count__expanded-title {
  margin: 0 0 10px;
  color: var(--main-color);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
}

.x-count__expanded-note {
  margin: 8px 0 0;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--accent-color) 18%, transparent);
  border-radius: 8px;
  background: #effaff;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
}

.x-count__status {
  color: var(--x-count-post-muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.x-count__status.is-over {
  color: #ffadd6;
}

.x-count__rules {
  margin-top: 14px;
}

.x-count__rules-lead {
  margin: 12px 0 0;
  color: #344054;
  line-height: 1.7;
}

.x-count__rules-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.x-count__rules-note {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--accent-color) 18%, transparent);
  border-radius: 8px;
  background: #effaff;
}

.x-count__rules-note p {
  margin: 0;
  color: #475467;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.65;
}

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

@media (max-width: 1024px) {
  .x-count__rules-grid,
  .x-count__features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .x-count__app {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .x-count {
    padding-top: 8px;
  }

  .x-count__textarea {
    min-height: 260px;
    font-size: 14px;
    line-height: 1.65;
  }

  .x-count__actions {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.25fr) minmax(0, 0.65fr);
    gap: 8px;
  }

  .x-count__actions .omoshiro-tool__button {
    width: auto;
    min-width: 0;
    font-size: 12px;
    padding-inline: 8px;
  }

  .x-count__emoji-toggle-mark {
    width: 22px;
    height: 22px;
    font-size: 16px;
  }

  .x-count__actions .omoshiro-tool__button--clear {
    margin-left: 0;
  }

  .x-count__mode-switch .omoshiro-tool__radio-list--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .x-count__stats-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(84px, 0.58fr);
  }

  .x-count__stat-card {
    gap: 4px;
    padding: 6px 5px;
  }

  .x-count__stat-card em {
    margin-left: 0;
  }

  .x-count__post-head {
    gap: 8px;
  }

  .x-count__avatar {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }

  .x-count__display-name {
    font-size: 13px;
    line-height: 1.3;
  }

  .x-count__user-name {
    font-size: 12px;
  }

  .x-count__post-body {
    font-size: 14px;
    line-height: 1.65;
  }

  .x-count__emoji-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .x-count__rules-grid,
  .x-count__features-grid {
    grid-template-columns: 1fr;
  }

}
