@charset "UTF-8";
:root,
[data-theme=light] {
  --tg-brand-50: #e8f5fc;
  --tg-brand-100: #d2ebfa;
  --tg-brand-200: #a8d9f4;
  --tg-brand-300: #7dc8ee;
  --tg-brand-400: #52b6e7;
  --tg-brand-500: #2aabee;
  --tg-brand-600: #229ed9;
  --tg-brand-700: #1c84b5;
  --tg-brand-800: #166a91;
  --tg-brand-900: #11506d;
  --tg-brand-gradient-start: #2aabee;
  --tg-brand-gradient-end: #229ed9;
  --tg-semantic-success: #31b545;
  --tg-semantic-warning: #f4b400;
  --tg-semantic-danger: #e53935;
  --tg-semantic-info: #229ed9;
  --tg-bg: #ffffff;
  --tg-bg-brand: #e8f5fc;
  --tg-bg-opacity: rgba(255, 255, 255, 0.8);
  --tg-surface: #f5f8fa;
  --tg-surface-muted: #eef3f6;
  --tg-text-primary: #0e1621;
  --tg-text-secondary: #9a9a9a;
  --tg-text-muted: #c4c4c4;
  --tg-border: #f0f3f6;
  --tg-overlay: rgba(22, 22, 22, 0.6);
  --tg-overlay-dark: rgba(22, 22, 22, 0.9);
  --tg-overlay-button: rgba(0, 0, 0, 0.2);
  --tg-overlay-text: #f5f8fa;
  color-scheme: light;
  --header-height: 49px;
  --backdrop-filter: blur(25px);
}

[data-theme=dark] {
  --tg-bg: #111111;
  --tg-bg-brand: #04293a;
  --tg-bg-opacity: rgba(17, 17, 17, 0.8);
  --tg-surface: #242f3d;
  --tg-surface-muted: #1f2935;
  --tg-text-primary: #f5f8fa;
  --tg-text-secondary: #c6c6c6;
  --tg-text-muted: #9c9c9c;
  --tg-border: #282b2e;
  --tg-overlay: rgba(0, 0, 0, 0.6);
  --tg-overlay-dark: rgba(0, 0, 0, 0.9);
  --tg-overlay-button: rgba(255, 255, 255, 0.1);
  --tg-overlay-text: #f5f8fa;
  color-scheme: dark;
}

*,
*::before,
*::after {
  font-family: "SF Pro Text", "PingFang SC", "Noto Sans SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--tg-border) transparent;
  font-weight: normal;
  margin: 0;
  padding: 0;
  border: none;
  text-decoration: none;
  outline: none;
}

html {
  font-size: 100%;
  width: 100%;
  height: 100%;
  scrollbar-gutter: stable;
  interpolate-size: allow-keywords;
}

body {
  color: var(--tg-text-primary);
  background: var(--tg-bg);
}

details::details-content {
  display: block;
  block-size: 0;
  overflow: hidden;
  transition: block-size 0.15s ease, content-visibility 0.15s ease allow-discrete;
}
details[open]::details-content {
  block-size: auto;
}

main > div,
footer > div {
  width: min(56rem, 100%);
  margin-inline: auto;
}

header > div {
  width: min(72rem, 100%);
  margin-inline: auto;
}

.action {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.action .sprite-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

header {
  padding: 0 1rem;
  background: var(--tg-bg-opacity);
  backdrop-filter: var(--backdrop-filter);
  border-bottom: 1px solid var(--tg-border);
  position: sticky;
  top: 0;
  z-index: 10;
}
header .header {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  position: relative;
  padding: 0.75rem 0;
}
header .header-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
header .header-logo img {
  height: 1.5rem;
}
header .header-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  overflow-x: auto;
  flex-wrap: nowrap;
  white-space: nowrap;
}
header .header-nav a {
  white-space: nowrap;
  font-size: 0.875rem;
}
header .header-login {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}
header .header-login > a {
  padding: 0.125rem 0.75rem;
  font-size: 0.75rem;
  background: var(--tg-brand-500);
  border-radius: 0.6875rem;
  color: #fff;
}
header .header-login img {
  width: 1rem;
  height: 1rem;
  object-fit: cover;
  border-radius: 0.5rem;
  background: var(--tg-surface-muted);
}
header .header-login button {
  font-size: 0.875rem;
}
header .header-login .avatar-menu-toggle {
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  line-height: 0;
}
header .header-login .avatar-menu {
  position: absolute;
  top: calc(100% + 1rem);
  right: 0;
  min-width: 6rem;
  background: var(--tg-bg);
  border-radius: 0.25rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 100;
}
header .header-login .avatar-menu.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
header .header-login .avatar-menu form button {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--tg-text-primary);
}
header .header-login .avatar-menu form button:hover {
  background: var(--tg-surface);
}

main {
  display: grid;
  padding: 0 1rem;
}

a {
  color: var(--tg-text-primary);
}

label {
  font-size: 0.875rem;
  color: var(--tg-text-secondary);
}

input,
select,
textarea,
.md-editor {
  font-size: 1rem;
  line-height: 1.625;
  color: var(--tg-text-primary);
  border: none;
  margin: 0;
  padding: 0;
  outline: none;
  text-decoration: none;
  background: transparent;
}

/* 重置默认样式 + 自定义外观 */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}

input {
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--tg-border);
}
input:focus {
  border-color: var(--tg-brand-500);
}
input[type=datetime-local] {
  height: 35px;
}

button {
  border: none;
  margin: 0;
  padding: 0;
  text-decoration: none;
  background: none;
  outline: none;
  color: var(--tg-brand-500);
  cursor: pointer;
}
button.delete {
  color: #e53935;
}

textarea {
  min-height: 6rem;
  resize: vertical;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: normal;
  font-size: 1rem;
}

img,
video {
  display: block;
}

b {
  font-weight: 500;
}

.hidden {
  display: none;
}

[hidden] {
  display: none !important;
}

.nav-link-active {
  color: var(--tg-brand-500);
}

.mono {
  font-family: "SF Mono", "SF Mono Regular", "SF Mono Medium", "SF Mono SemiBold", "SF Mono Bold", "SF Mono Heavy", Consolas, "Liberation Mono", Menlo, Courier, monospace;
}

.divider {
  display: block;
  height: 1rem;
  width: 1px;
  background: var(--tg-border);
  margin: 0 0.5rem;
}

footer {
  margin-top: 1rem;
  padding: 1rem 1rem 5rem 1rem;
  border-top: 1px solid var(--tg-border);
}
footer .footer {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
footer .footer-slogan {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
footer .footer-slogan * {
  font-size: 0.875rem;
}
footer .footer-slogan > p {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
footer .footer-slogan > p svg {
  margin-right: 0.25rem;
}
footer .footer-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}
footer .footer-info * {
  font-size: 0.75rem;
}
footer .footer-info a {
  color: var(--tg-text-secondary);
  text-decoration: underline;
}

.community {
  display: flex;
  align-items: flex-start;
}
.community-right {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.title {
  margin-bottom: 1rem;
  padding: 0 1rem;
}
.title > div {
  width: min(64rem, 100%);
  margin-inline: auto;
  border-bottom: 1px solid var(--tg-border);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0;
}
.title > div a {
  font-size: 1.5rem;
}
.title-side-toggle {
  display: none;
  color: var(--tg-text-primary);
  margin-left: auto;
}

.login-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
}

.login-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  background: var(--tg-surface-muted);
  padding: 1rem;
}
.login-panel h2 {
  font-size: 1.125rem;
}
.login-panel > p {
  font-size: 0.875rem;
  text-align: center;
}
.login-panel button {
  color: var(--tg-brand-500);
  cursor: pointer;
  transition: color 0.18s ease-in-out, opacity 0.18s ease-in-out;
  font-size: 0.875rem;
}
.login-panel button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.login-panel label {
  width: 100%;
  max-width: 20rem;
  text-align: left;
  color: var(--tg-text-secondary);
  font-size: 0.875rem;
}
.login-panel-qr img {
  display: block;
  width: min(12rem, 100%);
  aspect-ratio: 1/1;
  object-fit: contain;
}
.login-panel-qr-status {
  font-size: 0.875rem;
  color: var(--tg-text-secondary);
}
.login-panel-qr-status.is-success {
  color: var(--tg-semantic-success);
}
.login-panel-qr-status.is-error {
  color: var(--tg-semantic-danger);
}
.login-panel-code > input {
  width: 100%;
  max-width: 20rem;
  border-bottom: 1px solid var(--tg-text-muted);
  padding: 0.5rem 0;
}
.login-panel-code > input:focus {
  border-color: var(--tg-brand-500);
}
.login-panel-code .login-code-panel {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.login-panel-code .login-code-panel > p {
  font-size: 0.75rem;
}
.login-panel-code .login-code-grid {
  width: 100%;
  max-width: 20rem;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
}
.login-panel-code .login-code-grid .login-code-box {
  width: 100%;
  text-align: center;
  font-size: 1.125rem;
  border-bottom: 1px solid var(--tg-text-muted);
  padding: 0.5rem 0;
}
.login-panel-code .login-code-grid .login-code-box:focus {
  border-color: var(--tg-brand-500);
}
.login-panel-code .login-error {
  color: var(--tg-semantic-danger);
}
.login-panel-code .login-message {
  color: var(--tg-semantic-success);
}
.login-panel-code .login-hint {
  color: var(--tg-text-secondary);
}

.login-divider {
  width: 1px;
  height: 100%;
}

.separater.horizontal {
  width: 100%;
  height: 1px;
  background: var(--tg-border);
  margin: 2rem 0;
}
.separater.vertical {
  width: 1px;
  height: 100%;
  background: var(--tg-border);
  margin: 0 2rem;
}

.side {
  position: sticky;
  width: 12rem;
  top: calc(var(--header-height) + 1rem);
  align-self: flex-start;
  height: fit-content;
  display: flex;
  flex-direction: column;
}
.side h3 {
  color: var(--tg-text-secondary);
  margin-top: 1rem;
  border-top: 1px solid var(--tg-border);
  padding: 0.5rem 0;
}
.side-mine {
  display: flex;
  flex-direction: column;
}
.side-mine > div {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.side-mine > div > a {
  display: flex;
  align-items: center;
}
.side-mine > div > a > span:first-child {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.side-mine > div > a > span.count {
  color: var(--tg-text-secondary);
  font-size: 0.8125rem;
}
.side-status {
  display: flex;
  flex-direction: column;
}
.side-status > div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.side-status > div > a {
  display: flex;
  justify-content: space-between;
}
.side-status > div > a > span:last-child {
  color: var(--tg-text-secondary);
  font-size: 0.8125rem;
}
.side-tags {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.side-tags > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

.side-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: var(--tg-overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease-in-out;
  z-index: 19;
}
.side-drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.admin-main {
  display: flex;
  align-items: flex-start;
}
.admin-main select {
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--tg-border);
}

.admin-side {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.admin-side > a {
  display: block;
}
.admin-side-sub summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--tg-text-primary);
  list-style: none;
}
.admin-side-sub summary::-webkit-details-marker {
  display: none;
}
.admin-side-sub summary > svg {
  transition: transform 0.2s ease-in-out;
}
.admin-side-sub[open] summary > svg {
  transform: rotate(90deg);
}
.admin-side-sub > div {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.35rem;
  padding-left: 0.75rem;
}

.admin-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.admin-block {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.admin-block h2 {
  font-size: 1.25rem;
}

.admin-search {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.admin-search input {
  flex: 1;
}

.admin-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.admin-form.admin-inline-form {
  flex-direction: row;
}
.admin-form.admin-inline-form input {
  flex: 1;
}
.admin-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}
.admin-form > button {
  align-self: flex-start;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.admin-grid select {
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--tg-border);
}

.cover-upload-input {
  display: flex;
  position: relative;
  min-height: 4rem;
}
.cover-upload-input > input {
  display: none !important;
}
.cover-upload-input > label {
  display: flex;
  width: 4rem;
  height: 4rem;
  align-items: center;
  justify-content: center;
  background-color: var(--tg-overlay-button);
  cursor: pointer;
  position: absolute;
  top: 0;
  left: 0;
}
.cover-upload-input > label svg {
  color: #fff;
  font-size: 1.25rem;
}

.admin-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.admin-list-header span {
  color: var(--tg-text-secondary);
  font-size: 0.8125rem;
}
.admin-list-header a {
  color: var(--tg-brand-500);
}

.admin-main,
.admin-block,
.admin-table-wrap {
  min-width: 0;
}

.admin-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.admin-table thead {
  border-top: 1px solid var(--tg-border);
}
.admin-table tr {
  border-bottom: 1px solid var(--tg-border);
}
.admin-table th, .admin-table td {
  text-align: left;
  padding: 0.5rem;
  white-space: nowrap;
}
.admin-table th:first-child, .admin-table td:first-child {
  padding-left: 0;
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--tg-bg);
}
.admin-table th:last-child, .admin-table td:last-child {
  padding-right: 0;
  text-align: right;
  position: sticky;
  right: 0;
  z-index: 1;
  background: var(--tg-bg);
}
.admin-table th {
  color: var(--tg-text-secondary);
  font-weight: normal;
  white-space: nowrap;
}

.admin-actions > a {
  color: var(--tg-brand-500);
}
.admin-actions form {
  display: inline-block;
}

.admin-pager {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--tg-text-secondary);
  font-size: 0.8125rem;
}

.post-card {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
}
.post-card:not(:last-child) {
  border-bottom: 1px solid var(--tg-border);
}
.post-card-link {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.post-card-link-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.post-card-link-content h3 {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--tg-text-primary);
  font-size: 1.125rem;
}
.post-card-link-content h3.updated::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  background-color: var(--tg-brand-500);
  padding: 0.125rem 0.25rem;
}
.post-card-link-content p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-all;
  font-size: 0.875rem;
  line-height: 1.5rem;
}
.post-card-link-attachments {
  display: flex;
  gap: 0.5rem;
  position: relative;
}
.post-card-link-attachments > span {
  position: absolute;
  top: 0;
  right: 0;
  width: 3.25rem;
  height: 100%;
  background: var(--tg-overlay);
  color: var(--tg-overlay-text);
  display: flex;
  align-items: center;
  justify-content: center;
}
.post-card-link-attachments img {
  width: 3.25rem;
  height: 3.25rem;
  object-fit: cover;
}
.post-card-link-attachments-video {
  position: relative;
  overflow: hidden;
  background: var(--tg-surface-muted);
}
.post-card-link-attachments-video > span {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tg-overlay-button);
}
.post-card-link-attachments-audio {
  position: relative;
  overflow: hidden;
}
.post-card-meta {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.8125rem;
}
.post-card-meta *,
.post-card-meta a {
  font-size: 0.8125rem;
}

.spacer {
  flex: 1;
}

.tag {
  display: inline-block;
  background: var(--tg-surface-muted);
  padding: 0 0.5rem;
}

.status {
  display: flex;
  align-items: center;
}
.status::before {
  content: "";
  width: 0.75rem;
  height: 0.75rem;
  margin-right: 0.5rem;
}
.status.all::before {
  background: var(--tg-surface-muted);
}
.status.open::before {
  background: var(--tg-semantic-success);
}
.status.closed::before {
  background: var(--tg-semantic-danger);
}
.status.fixing::before {
  background: var(--tg-semantic-warning);
}
.status.fixed::before {
  background: var(--tg-semantic-info);
}

.status-select-group {
  display: inline-flex;
  align-items: center;
}
.status-select-group::before {
  content: "";
  width: 0.75rem;
  height: 0.75rem;
  margin-right: 0.5rem;
  flex-shrink: 0;
}
.status-select-group[data-status=open]::before {
  background: var(--tg-semantic-success);
}
.status-select-group[data-status=fixing]::before {
  background: var(--tg-semantic-warning);
}
.status-select-group[data-status=fixed]::before {
  background: var(--tg-semantic-info);
}
.status-select-group[data-status=closed]::before {
  background: var(--tg-semantic-danger);
}

.toast {
  position: fixed;
  top: var(--header-height);
  left: 50%;
  transform: translateX(-50%) translateY(calc(-100% - var(--header-height)));
  padding: 0.5rem 1.25rem;
  background: var(--tg-overlay);
  color: var(--tg-overlay-text);
  border-radius: 0.25rem;
  font-size: 0.875rem;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  white-space: nowrap;
}
.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.search {
  position: sticky;
  top: var(--header-height);
  background: var(--tg-bg);
  z-index: 1;
}
.search-form-input {
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
  position: relative;
}
.search-form-input-tags {
  display: flex;
  gap: 0.25rem;
}
.search-form-input-text {
  flex: 1;
  display: flex;
  align-items: center;
  position: relative;
}
.search-form-input-text svg {
  position: absolute;
  left: -1.5rem;
}
.search-form-input-text input {
  flex: 1;
  border-bottom: none;
  padding: 0;
}
.search-form-input-text button {
  color: var(--tg-brand-500);
}
.search-filters {
  display: none !important;
  flex-direction: column;
}
.sort {
  display: flex;
  color: var(--tg-text-secondary);
  border-top: 1px solid var(--tg-border);
  border-bottom: 1px solid var(--tg-border);
  padding: 0.5rem 0;
}
.sort-count {
  flex: 1;
  font-size: 0.875rem;
}
.sort-form-options {
  display: flex;
  align-items: center;
}
.sort-form-options > button {
  font-size: 0.875rem;
  color: var(--tg-text-secondary);
}
.sort-form-options > button[aria-pressed=true] {
  color: var(--tg-brand-500);
}

.create-post {
  padding: 1rem;
  display: flex;
  justify-content: center;
}
.create-post a {
  color: var(--tg-brand-500);
}

.post {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.post-title {
  display: flex;
  align-items: center;
}
.post-title h1 {
  flex: 1;
  font-size: 1.5rem;
}
.post-meta {
  display: flex;
  gap: 0.5rem;
  color: var(--tg-text-secondary);
  font-size: 0.8125rem;
}
.post-tags {
  display: flex;
  gap: 0.5rem;
}
.md-editor {
  min-height: 1rem;
  border-bottom: 1px solid var(--tg-border);
  padding: 0.25rem 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.md-editor:focus {
  border-color: var(--tg-brand-500);
}
.md-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--tg-text-muted);
  pointer-events: none;
}

.markdown-content {
  word-break: break-word;
}
.markdown-content > :first-child {
  margin-top: 0;
}
.markdown-content > :last-child {
  margin-bottom: 0;
}
.markdown-content blockquote {
  margin: 0 0 0.5rem;
  padding: 0 0.5rem;
  border-left: 2px solid var(--tg-brand-500);
  background: var(--tg-surface);
}
.markdown-content p {
  margin: 0 0 0.5rem;
}
.markdown-content ul, .markdown-content ol {
  margin: 0 0 0.5rem;
  padding-left: 1.25rem;
}
.markdown-content pre {
  overflow: auto;
  padding: 0.5rem;
  border-radius: 0.375rem;
  background: var(--tg-surface-muted);
}
.markdown-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.interactive {
  display: flex;
  align-items: center;
  padding: 1rem 0;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--tg-text-secondary);
}
.interactive > form {
  display: flex;
  align-items: center;
}
.interactive-button {
  margin-left: 1rem;
}

.load-more {
  display: flex;
  justify-content: center;
  padding: 1rem 0;
}
.load-more > form {
  display: flex;
}
.load-more button {
  color: var(--tg-brand-500);
  cursor: pointer;
}

.comments {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-top: 1px solid var(--tg-border);
}
.comments-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1rem;
}
.comments-title span {
  color: var(--tg-text-secondary);
}
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.comments-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.comments-form-reply {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-left: 2px solid var(--tg-brand-500);
}
.comments-form-reply.hidden {
  display: none;
}
.comments-form-reply-content {
  flex: 1;
  padding-left: 0.5rem;
}
.comments-form-reply-content span {
  color: var(--tg-text-secondary);
  font-size: 0.8125rem;
}
.comments-form .md-editor {
  display: block;
}
.comments-form-attachments.hidden {
  display: none;
}
.comments-form-actions {
  display: flex;
  justify-content: space-between;
}
.comments-form-actions > input {
  display: none !important;
}
.comments-form-actions > button, .comments-form-actions > label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 1rem;
  color: var(--tg-brand-500);
}

.comment {
  display: flex;
  gap: 0.5rem;
}
.comment.is-paging-hidden {
  display: none;
}
.comment-avatar {
  width: 1.5rem;
  height: 1.5rem;
  object-fit: cover;
  border-radius: 50%;
  background: var(--tg-surface);
}
.comment-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.comment-content-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.comment-content-info-time {
  color: var(--tg-text-secondary);
  font-size: 0.8125rem;
}
.comment-content-info-button {
  display: block;
  width: 1rem;
  height: 1rem;
  color: var(--tg-text-secondary);
}
.comment-content-reply {
  border-left: 2px solid var(--tg-brand-500);
  padding: 0 0.5rem;
  background: var(--tg-surface);
}
.comment-content-status {
  text-align: center;
  color: #FFF;
  border-radius: 0.75rem;
}
.comment-content-status.open {
  background: var(--tg-semantic-success);
}
.comment-content-status.closed {
  background: var(--tg-semantic-danger);
}
.comment-content-status.fixing {
  background: var(--tg-semantic-warning);
}
.comment-content-status.fixed {
  background: var(--tg-semantic-info);
}

.attachments {
  display: flex;
  gap: 0.5rem;
}
.attachments img {
  width: 4rem;
  height: 4rem;
  object-fit: cover;
}
.attachments-video {
  background: var(--tg-surface-muted);
  position: relative;
}
.attachments-video > span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.attachments-file {
  color: var(--tg-text-secondary);
  font-size: 0.8125rem;
}

.attachments-preview {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.preview {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.preview img {
  width: 4rem;
  height: 4rem;
  object-fit: cover;
}
.preview-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.preview-meta-name {
  color: var(--tg-text-primary);
}
.preview-meta-size {
  color: var(--tg-text-secondary);
}
.preview-remove {
  display: flex;
}

.media-viewer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 20;
  background: var(--tg-overlay-dark);
}
.media-viewer.hidden {
  display: none !important;
}
.media-viewer-content {
  height: 80%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.media-viewer-content img {
  display: block;
  max-width: 100%;
  max-height: 100%;
}
.media-viewer-content video {
  display: block;
  max-width: 100%;
  max-height: 100%;
}
.media-viewer-controls {
  position: fixed;
  bottom: 1.25rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  color: var(--tg-overlay-text);
}
.media-viewer-controls .action {
  background: var(--tg-overlay-button);
  color: var(--tg-overlay-text);
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
}
.media-viewer-controls > div {
  background: var(--tg-overlay-button);
  padding: 0.25rem 2rem;
  border-radius: 1rem;
}

.creater {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.creater-title {
  font-size: 1.5rem;
}
.creater-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.creater-form-actions {
  display: flex;
  justify-content: flex-start;
  gap: 2rem;
}
.creater-form-actions > button {
  color: var(--tg-brand-500);
}

.wizard-step {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.wizard-step.hidden {
  display: none !important;
}
.wizard-step > p {
  color: var(--tg-text-secondary);
}
.wizard-step-1-tags {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.wizard-step-1-tags label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--tg-text-primary);
  cursor: pointer;
  user-select: none;
}
.wizard-step-1-tags label:has(input:checked) {
  background: var(--tg-brand-500);
  color: #fff;
}
.wizard-step-1-tags label input {
  display: none !important;
}
.wizard-step-1-tags label .action {
  color: var(--tg-brand-500);
}
.wizard-step-2 > input {
  border-bottom: 1px solid var(--tg-border);
  padding: 0.25rem 0;
}
.wizard-step-2 > input:focus {
  border-color: var(--tg-brand-500);
}
.wizard-step-4 {
  justify-content: flex-start;
}
.wizard-step-4-input {
  display: flex;
  justify-content: flex-start;
}
.wizard-step-4-input div {
  width: 4rem;
  height: 4rem;
  border: 1px solid var(--tg-border);
}
.wizard-step-4-input input {
  display: none !important;
}
.wizard-step-4-input label {
  display: flex;
  width: 4rem;
  height: 4rem;
  align-items: center;
  justify-content: center;
  background-color: var(--tg-border);
}
.wizard-step-4-input label svg {
  font-size: 2rem;
}

.home-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem 0;
}
.home-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--tg-border);
  padding-bottom: 0.5rem;
}
.home-section-header h2 {
  font-size: 1.25rem;
}
.home-section-header > a {
  color: var(--tg-brand-500);
}

.home-hero {
  width: 100%;
  background: linear-gradient(135deg, var(--tg-bg-brand), var(--tg-surface));
}
.home-hero-content {
  width: min(56rem, 100%);
  margin-inline: auto;
  display: flex;
  align-items: center;
  border-radius: 1rem;
}
.home-hero-content-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.home-hero-content-copy > p:first-child {
  color: var(--tg-brand-700);
}
.home-hero-content-copy h1 {
  font-size: 2rem;
  line-height: 1.25;
}
.home-hero-content-copy > p:not(:first-child) {
  color: var(--tg-text-secondary);
}
.home-hero-content-copy-actions {
  flex: 1.5;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 0.25rem;
}
.home-hero-content-copy-actions > a:first-child {
  color: #fff;
  background: var(--tg-brand-500);
  padding: 0.375rem 0.875rem;
}
.home-hero-content-copy-actions > a:last-child {
  color: var(--tg-brand-700);
}
.home-hero-content-product {
  flex: 1;
  display: flex;
  justify-content: center;
}
.home-hero-content-product > img {
  width: 100%;
  max-width: 40rem;
  height: auto;
}

.home-news {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.home-news-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  border-bottom: 1px solid var(--tg-border);
  padding: 1rem 0;
}
.home-news-item > p {
  color: var(--tg-text-secondary);
  font-size: 0.8125rem;
}
.home-news-item > h3 {
  font-size: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-downloads {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 0 8rem;
}
.home-downloads.desktop {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.home-download-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.home-download-item > img {
  width: 100%;
  height: auto;
  object-fit: cover;
  padding: 0 2rem;
}
.home-download-item > h3 {
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.home-download-item > h3 img {
  height: 1rem;
}

.home-downloads.desktop {
  padding: 0 6rem;
}
.home-downloads.desktop .home-download-item > img {
  padding: 0 2rem;
}

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

.home-feature-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.home-feature-item > .home-feature-animated {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.home-feature-item > .home-feature-animated > div {
  padding-top: 56.25%;
}
.home-feature-item > .home-feature-animated img {
  display: block;
  position: absolute;
  inset: 0;
  height: 100%;
  margin: 0 auto;
}
.home-feature-item > .home-feature-animated canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.home-feature-item > .home-feature-animated img {
  object-fit: cover;
}
.home-feature-item > .home-feature-animated canvas {
  object-fit: contain;
}
.home-feature-item > h3 {
  font-size: 1rem;
  text-align: center;
}
.home-feature-item > p {
  color: var(--tg-text-secondary);
  font-size: 0.875rem;
  text-align: center;
  padding: 0 1rem;
}

.about-main {
  display: flex;
  align-items: flex-start;
}

.about-side > div {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.about-detail {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.about-detail > h2 {
  font-size: 1.25rem;
}

.faq-main {
  display: flex;
  align-items: flex-start;
}

.faq-side > div {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.home-faq,
.faq {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.home-faq > details,
.faq > details {
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
}
.home-faq > details:not(:last-child),
.faq > details:not(:last-child) {
  border-bottom: 1px solid var(--tg-border);
}
.home-faq > details summary,
.faq > details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 1.125rem;
}
.home-faq > details summary > svg,
.faq > details summary > svg {
  transition: transform 0.2s ease-in-out;
}
.home-faq > details[open] summary > svg,
.faq > details[open] summary > svg {
  transform: rotate(180deg);
}
.home-faq > details p,
.faq > details p {
  padding: 0.5rem 0;
}

.download-main {
  display: flex;
  align-items: flex-start;
}

.download-side > details {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
}
.download-side > details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--tg-text-primary);
  list-style: none;
}
.download-side > details summary::-webkit-details-marker {
  display: none;
}
.download-side > details summary > svg {
  transition: transform 0.2s ease-in-out;
}
.download-side > details[open] summary > svg {
  transform: rotate(90deg);
}
.download-side > details > div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.25rem 0 0.25rem 1rem;
}
.download-side > details > div > a {
  font-size: 0.875rem;
  color: var(--tg-text-secondary);
}
.download-side > details > div > a[aria-current=page] {
  color: var(--tg-brand-500);
}

.download {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.download > article {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 0;
}
.download > article:not(:last-child) {
  border-bottom: 1px solid var(--tg-border);
}
.download > article svg {
  font-size: 4rem;
}
.download > article > div:first-child {
  display: flex;
  align-items: stretch;
  gap: 1rem;
}
.download > article > div:first-child > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.25rem 0;
}
.download > article > div:first-child > div > div {
  display: flex;
  justify-content: space-between;
}
.download > article > div:first-child > div > div a {
  color: var(--tg-brand-500);
}
.download > article > div:first-child > div p {
  color: var(--tg-text-secondary);
}
.download-description {
  margin-top: 0.75rem;
}

.news-main {
  display: flex;
  align-items: flex-start;
}

.news-side > div {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.news {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.news-item {
  flex: 1 0 100%;
  min-width: 0;
  align-items: center;
  padding-bottom: 1rem;
  display: flex;
  gap: 0.5rem;
}
.news-item:not(:last-child) {
  border-bottom: 1px solid var(--tg-border);
}
.news-item-cover {
  width: 10rem;
  height: 5rem;
  object-fit: cover;
  border-radius: 0.5rem;
}
.news-item-content {
  flex: 1;
}
.news-item-content p {
  color: var(--tg-text-secondary);
}
.news-item-content h2 {
  font-size: 1.125rem;
}
.news.all .news-item:first-child {
  flex-direction: column;
  align-items: flex-start;
}
.news.all .news-item:first-child img {
  width: 100%;
  height: auto;
  aspect-ratio: 2/1;
  object-fit: cover;
}
.news.all .news-item:nth-child(2), .news.all .news-item:nth-child(3) {
  flex-direction: column;
  align-items: flex-start;
  flex: 1 0 calc(50% - 1rem);
}
.news.all .news-item:nth-child(2) img, .news.all .news-item:nth-child(3) img {
  width: 100%;
  height: auto;
  aspect-ratio: 2/1;
  object-fit: cover;
}
.news-detail {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.news-detail > h1 {
  font-size: 1.5rem;
}
.news-detail-cover {
  width: 100%;
  height: auto;
  aspect-ratio: 2/1;
  border-radius: 0.5rem;
  object-fit: cover;
}

@media (max-width: 48rem) {
  header .header-nav {
    gap: 0.5rem;
  }
  header .header-nav > a:first-child {
    display: none;
  }
  .search-form-input-text svg {
    position: relative;
    left: 0;
    margin-right: 0.5rem;
  }
  .separater {
    display: none !important;
  }
  .side {
    display: none !important;
  }
  .title-side-toggle {
    display: inline-flex;
  }
  .side.side-drawer-active {
    display: flex !important;
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    width: min(18rem, 86vw);
    max-width: 100%;
    height: calc(100% - var(--header-height));
    padding: 1rem;
    overflow-y: auto;
    background: var(--tg-bg);
    z-index: 20;
    transform: translate3d(-102%, 0, 0);
    transition: transform 0.24s ease-in-out;
    will-change: transform;
  }
  .side.side-drawer-active.is-open {
    transform: translate3d(0, 0, 0);
  }
  .side-drawer-backdrop {
    top: var(--header-height);
  }
  .search-filters {
    display: none !important;
  }
  .post-card-meta .tag {
    display: none !important;
  }
  .about-main {
    flex-direction: column;
  }
  .about-main .separater.vertical {
    display: none;
  }
  .home-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }
  .home-hero-content {
    padding: 2rem 1rem 0 1rem;
    display: flex;
    flex-direction: column;
  }
  .home-hero-content-copy > * {
    text-align: center;
  }
  .home-hero-content-copy h1 {
    font-size: 1.5rem;
  }
  .home-hero-content-copy-actions {
    justify-content: center;
  }
  .login-main,
  .home-news,
  .home-downloads,
  .home-features {
    grid-template-columns: minmax(0, 1fr);
  }
  .home-downloads {
    padding: 0 4rem;
  }
  .home-downloads .home-download-item > img {
    padding: 0 2rem;
  }
  .home-downloads.desktop {
    padding: 0 1rem;
  }
  .home-downloads.desktop .home-download-item > img {
    padding: 0;
  }
  .login-divider {
    width: 100%;
    height: 1px;
  }
  #community-detail {
    width: 100%;
  }
  .admin-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  .title-side-toggle,
  .side.side-drawer-active,
  .side-drawer-backdrop {
    transition: none !important;
  }
}
