*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --tcy-bg: #f2f3f5;
  --tcy-surface: #ffffff;
  --tcy-surface-strong: #ffffff;
  --tcy-border: #e8e8eb;
  --tcy-text: #202124;
  --tcy-muted: #76777d;
  --tcy-primary: #ff2442;
  --tcy-primary-hover: #e91d3d;
  --tcy-primary-active: #cf1735;
  --tcy-primary-soft: rgba(255, 36, 66, 0.08);
  --tcy-success: #059669;
  --tcy-danger: #d92d45;
  --tcy-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
  --td-brand-color-1: #fff0f2;
  --td-brand-color-2: #ffd8de;
  --td-brand-color-3: #ffb5c0;
  --td-brand-color-4: #ff8b9b;
  --td-brand-color-5: #ff6075;
  --td-brand-color-6: #ff2442;
  --td-brand-color-7: #e91d3d;
  --td-brand-color-8: #cf1735;
  --td-brand-color-9: #ad112c;
  --td-brand-color-10: #8b0d24;
  --td-brand-color: #ff2442;
  --td-brand-color-hover: #e91d3d;
  --td-brand-color-active: #cf1735;
  --td-brand-color-focus: rgba(255, 36, 66, 0.18);
  --td-brand-color-disabled: #ffb5c0;
  --td-brand-color-light: #fff0f2;
  --td-brand-color-light-hover: #ffd8de;
  --td-text-color-brand: #ff2442;
  --td-text-color-link: #e91d3d;
}

html {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--tcy-text);
  background: var(--tcy-bg);
}

#app {
  min-height: 100vh;
}

a {
  color: inherit;
}

/* Keep TDesign controls stable in desktop browsers and the mobile WebView. */
.t-button {
  min-height: 38px;
  line-height: 1.2;
  white-space: nowrap;
}

.t-button .t-icon,
.t-button .t-button__content {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.t-button .t-icon {
  flex: 0 0 auto;
}

.t-button--theme-primary {
  box-shadow: none;
}

.t-input:focus-within,
.t-textarea:focus-within,
.t-select-input:focus-within,
.t-date-picker:focus-within {
  border-color: var(--tcy-primary) !important;
  box-shadow: 0 0 0 2px var(--td-brand-color-focus) !important;
}

.t-card,
.t-dialog,
.t-table {
  border-color: var(--tcy-border);
}

.t-card {
  border-radius: 6px;
  box-shadow: none;
}

.t-card__header {
  min-height: 56px;
  padding: 16px 20px;
  border-bottom: 1px solid #efeff1;
}

.t-card__title {
  color: #202124;
  font-size: 15px;
  font-weight: 600;
}

.t-card__body {
  padding: 20px;
}

.t-table__header th {
  color: #55565b;
  background: #fafafa !important;
}

.t-table__body tr:hover > td {
  background: #fff7f8 !important;
}

.t-tabs__bar,
.t-pagination__number.t-is-current {
  color: var(--tcy-primary);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.38);
}

.tcy-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  transition: grid-template-columns .2s ease;
}

.tcy-shell.is-collapsed { grid-template-columns: 72px minmax(0, 1fr); }

.tcy-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 0;
  border-right: 1px solid var(--tcy-border);
  background: #ffffff;
	box-shadow: none;
	z-index: 40;
	display: flex;
	flex-direction: column;
	transition: width .2s ease, transform .2s ease;
}

.tcy-sidebar.is-collapsed {
  width: 72px;
}

.tcy-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px 18px;
  border-bottom: 1px solid #efeff1;
  text-decoration: none;
}

.tcy-brand-mark {
  width: 36px;
  height: 36px;
  display: block;
  border-radius: 7px;
  object-fit: cover;
  background: #fff0f2;
  box-shadow: 0 0 0 2px #fff0f2;
}

.tcy-brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tcy-brand-copy strong {
  color: #18191c;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
}

.tcy-brand-copy small {
  margin-top: 2px;
  color: var(--tcy-muted);
  font-size: 12px;
}

.tcy-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: auto;
  min-height: 0;
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
}

.tcy-nav-group {
	width: 100%;
	min-height: 38px;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: #5f6065;
	font: inherit;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0;
	cursor: pointer;
	text-align: left;
}

.tcy-nav-group:hover { background:#f5f5f6; color:#202124; }
.tcy-nav-section.is-open > .tcy-nav-group { color:#202124; }
.tcy-nav-group-label { flex: 1; }
.tcy-nav-chevron { transition: transform .18s ease; }
.tcy-nav-section.is-open .tcy-nav-chevron { transform: rotate(180deg); }
.tcy-nav-children { display: none; padding: 2px 0 7px; }
.tcy-nav-section.is-open .tcy-nav-children { display: grid; gap: 3px; }
.tcy-nav-group.is-compact { justify-content: center; padding-inline: 8px; }
.tcy-sidebar.is-collapsed .tcy-nav-children { padding-left: 0; }

.tcy-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
	min-height: 38px;
	padding: 8px 10px 8px 26px;
  border-radius: 6px;
  color: #55565b;
  text-decoration: none;
  font-size: 13px;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.tcy-nav-item:hover {
  color: var(--tcy-primary);
  background: rgba(255, 36, 66, 0.06);
}

.tcy-nav-item.active {
  color: var(--tcy-primary);
  background: #fff0f2;
  font-weight: 600;
}

.tcy-nav-item.is-collapsed {
  justify-content: center;
  padding-inline: 8px;
}

.tcy-nav-icon {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 20px;
  line-height: 1;
}

.tcy-mobile-close,
.tcy-sidebar-backdrop { display: none; }

.tcy-sidebar-account {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px 14px;
  border-top: 1px solid #efeff1;
}

.tcy-sidebar-account.is-compact { justify-content:center; padding-inline:8px; }
.tcy-sidebar-identity { min-width:0; flex:1; display:grid; gap:2px; }
.tcy-sidebar-identity strong { overflow:hidden; color:#202124; font-size:13px; font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.tcy-sidebar-identity small { color:#85868b; font-size:11px; }

.tcy-logout {
  width:32px;
  height:32px;
  display:grid;
  place-items:center;
  flex:0 0 32px;
  border-radius:5px;
  color:#85868b;
  text-decoration:none;
}

.tcy-logout:hover { color:#ff2442; background:#fff0f2; }
.tcy-sidebar-account.is-compact > .tcy-logout { display:none; }

.tcy-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.tcy-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  padding: 0 24px;
  border-bottom: 1px solid var(--tcy-border);
  background: #ffffff;
  box-shadow: none;
}

.tcy-header-left,
.tcy-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tcy-breadcrumb { min-width:0; display:flex; align-items:center; gap:8px; color:#85868b; font-size:13px; }
.tcy-breadcrumb strong { overflow:hidden; color:#202124; font-weight:500; text-overflow:ellipsis; white-space:nowrap; }
.tcy-header-link { min-height:34px; display:flex; align-items:center; gap:7px; padding:0 10px; border-radius:5px; color:#55565b; font-size:13px; text-decoration:none; }
.tcy-header-link:hover { color:#ff2442; background:#fff0f2; }
.tcy-header-divider { width:1px; height:22px; background:#e8e8eb; }
.tcy-header-account { display:flex; align-items:center; gap:9px; }
.tcy-header-user { max-width:120px; overflow:hidden; color:#55565b; font-size:13px; text-overflow:ellipsis; white-space:nowrap; }

.tcy-content {
  flex: 1;
  padding: 24px 28px;
  min-width: 0;
  background: var(--tcy-bg);
}

.tcy-footer {
  margin-top: 24px;
  padding: 16px 4px 4px;
  color: var(--tcy-muted);
  text-align: center;
  font-size: 12px;
}

.tcy-footer span + span::before {
  content: "·";
  margin: 0 8px;
  color: #c6c7ca;
}

.tcy-page {
  display: grid;
  gap: 16px;
}

.tcy-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.tcy-page-copy h1 {
  margin: 0;
  color:#202124;
  font-size:20px;
  font-weight:600;
  line-height: 1.15;
}

.tcy-page-copy p {
  margin: 6px 0 0;
  color: var(--tcy-muted);
  line-height: 1.7;
}

.tcy-surface-card {
  border-radius: 6px;
  background: var(--tcy-surface);
  border: 0;
  box-shadow: none;
}

.tcy-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border: 1px solid #efeff1;
  border-radius: 6px;
  background: #fafafa;
}

.tcy-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 6px;
}

.tcy-table-wrap .t-table {
  min-width: 100%;
}

.tcy-avatar,
.tcy-thumb {
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #f8fafc;
}

.tcy-avatar {
  width: 38px;
  height: 38px;
}

.tcy-thumb {
  width: 52px;
  height: 52px;
}

.mono {
  font-family: "JetBrains Mono", "Consolas", monospace;
}

.clip1 {
  display: inline-block;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clip2 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.tcy-detail-dialog .t-dialog__body {
  max-height: min(70vh, 720px);
  overflow: auto;
}

.t-dialog__body {
  max-height: min(70vh, 720px);
  overflow: auto;
}

.tcy-post-detail {
  display: grid;
  gap: 18px;
}

.tcy-detail-title {
  margin: 0;
  color: var(--tcy-text);
  font-size: 20px;
  line-height: 1.45;
}

.tcy-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--tcy-muted);
  font-size: 13px;
}

.tcy-detail-content {
  padding: 16px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.8;
  border: 1px solid var(--tcy-border);
  border-radius: 6px;
  background: #fff;
}

.tcy-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.tcy-media-grid img,
.tcy-detail-video {
  width: 100%;
  max-height: 440px;
  object-fit: contain;
  border-radius: 6px;
  background: #111827;
}

.tcy-user-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--tcy-border);
}

.tcy-user-summary .tcy-avatar {
  width: 64px;
  height: 64px;
}

.tcy-chat-detail {
  display: grid;
  gap: 16px;
}

.tcy-chat-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--tcy-border);
  border-radius: 6px;
}

.tcy-chat-head div:last-child {
  text-align: right;
}

.tcy-chat-head strong,
.tcy-chat-head span:not(.tcy-chat-arrow) {
  display: block;
}

.tcy-chat-head span:not(.tcy-chat-arrow),
.tcy-message-meta {
  margin-top: 4px;
  color: var(--tcy-muted);
  font-size: 12px;
}

.tcy-chat-arrow {
  color: var(--tcy-primary);
  font-size: 20px;
}

.tcy-message-list {
  display: grid;
  gap: 14px;
  max-height: 520px;
  padding: 4px;
  overflow: auto;
}

.tcy-message-row {
  display: flex;
  flex-direction: column;
  max-width: 78%;
}

.tcy-message-row.from-a {
  align-self: start;
}

.tcy-message-row.from-b {
  align-self: end;
  align-items: end;
}

.tcy-message-bubble {
  margin-top: 5px;
  padding: 10px 12px;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid var(--tcy-border);
  border-radius: 6px;
  background: #f8fafc;
  line-height: 1.6;
}

.tcy-message-row.from-b .tcy-message-bubble {
  border-color: #ffd8de;
  background: #fff5f6;
}

.detail-card {
  padding: 14px 16px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.detail-card label {
  display: block;
  margin-bottom: 6px;
  color: var(--tcy-muted);
  font-size: 12px;
}

.tcy-upload-field {
  display: grid;
  gap: 10px;
}

.tcy-upload-input {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px dashed rgba(15, 23, 42, 0.16);
  border-radius: 10px;
  background: #f8fafc;
}

.tcy-upload-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tcy-upload-path {
  min-width: 0;
  color: var(--tcy-muted);
  word-break: break-all;
}

.tcy-upload-preview {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #f8fafc;
}

.tcy-audio-player {
  display: block;
  width: min(100%, 420px);
  height: 42px;
  margin-top: 10px;
}

.tcy-audio-player-compact {
  width: 220px;
  margin-top: 0;
}

.tcy-moderator-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.tcy-moderator-toolbar .t-input {
  flex: 1;
}

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

.tcy-moderator-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: #f8fafc;
}

.tcy-moderator-panel h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.tcy-moderator-list {
  display: grid;
  gap: 10px;
}

.tcy-moderator-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.tcy-moderator-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
	flex: 1;
}

.tcy-moderator-user strong,
.tcy-moderator-user .mono {
  display: block;
	min-width: 0;
	overflow-wrap: anywhere;
}

.tcy-moderator-user > div {
	min-width: 0;
}

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

.form-grid .span-2 {
  grid-column: 1 / -1;
}

.tcy-empty {
  padding: 40px 16px;
}

.tcy-fadein {
  animation: tcyFadeIn 0.22s ease-out both;
}

@keyframes tcyFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
	.tcy-sidebar.is-collapsed .tcy-brand-copy { display: none; }
}

@media (max-width: 760px) {
	.tcy-moderator-toolbar {
		align-items: stretch;
		flex-direction: column;
	}

	.tcy-moderator-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.tcy-moderator-panel {
		padding: 12px;
		border-radius: 8px;
	}

	.tcy-moderator-item {
		padding: 10px;
		border-radius: 6px;
	}
}

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

  .tcy-sidebar {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	z-index: 30;
	width: min(86vw, 320px);
	height: 100dvh;
	min-height: 100vh;
	padding: 0 0 max(8px, env(safe-area-inset-bottom));
	overflow: visible;
	border-right: 1px solid var(--tcy-border);
	border-bottom: 0;
	transform: translateX(-102%);
	box-shadow: 12px 0 34px rgba(15,23,42,.16);
  }

  .tcy-sidebar.is-collapsed {
	width: min(86vw, 320px);
  }

	.tcy-sidebar.is-mobile-open { transform: translateX(0); }
	.tcy-sidebar-backdrop { position:fixed;inset:0;z-index:29;border:0;background:rgba(15,23,42,.42);backdrop-filter:blur(2px); }
	.tcy-sidebar-backdrop.is-visible { display:block; }
	.tcy-mobile-close { position:absolute;top:18px;right:14px;width:36px;height:36px;display:grid;place-items:center;border:0;border-radius:6px;background:#f1f5f9;color:#334155;cursor:pointer; }

  .tcy-brand {
	flex: 0 0 auto;
	min-height:64px;
	padding:10px 52px 10px 16px;
  }

  .tcy-brand-mark {
    width: 38px;
    height: 38px;
  }

  .tcy-nav {
	flex: 1;
	flex-direction: column;
	gap: 4px;
	height: auto;
	min-height: 0;
	padding: 10px;
	overflow-x: hidden;
	overflow-y: auto;
  }

  .tcy-nav::-webkit-scrollbar { display: none; }

  .tcy-nav-item,
  .tcy-nav-item.is-collapsed {
	flex: 0 0 auto;
	min-width: 0;
	min-height: 42px;
	padding: 10px 12px 10px 26px;
  }

	.tcy-nav-children { padding-left: 0; }

  .tcy-nav-item.is-collapsed .tcy-nav-label,
  .tcy-nav-item .tcy-nav-label {
    display: inline;
    font-size: 13px;
    white-space: nowrap;
  }

  .tcy-header {
	top: 0;
    padding: 0 16px;
  }

  .tcy-content {
    padding: 18px 16px;
  }

  .tcy-page-head {
    align-items: flex-start;
  }

  .tcy-page-copy h1 {
    font-size: 22px;
  }

  .tcy-table-wrap {
    margin-inline: -4px;
    width: calc(100% + 8px);
  }

  .t-dialog {
    width: calc(100vw - 28px) !important;
    max-width: calc(100vw - 28px) !important;
  }
}

@media (max-width: 768px) {
  .tcy-header,
  .tcy-content {
    padding-left: 16px;
    padding-right: 16px;
  }

	.tcy-page-head { display: grid; grid-template-columns: minmax(0,1fr); width: 100%; }
	.tcy-page-head > .t-space { width: 100%; display: flex; flex-wrap: wrap; }
	.tcy-page-head > .t-space .t-button { flex: 1 1 132px; max-width: 100%; }
	.tcy-page-copy { min-width: 0; }
	.tcy-page-copy h1,
	.tcy-page-copy p { overflow-wrap: anywhere; }
	.tcy-surface-card,
	.tcy-page > section { max-width: 100%; min-width: 0; }

  .tcy-page-copy h1 {
    font-size: 24px;
  }

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

  .tcy-header-user {
    display: none;
  }

	.tcy-header-link span { display:none; }
	.tcy-header-link { width:34px; padding:0; justify-content:center; }

  .tcy-toolbar > .t-input,
  .tcy-toolbar > .t-select {
    width: min(100%, 280px) !important;
  }

  html {
    font-size: 16px;
  }

  body {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
  }

  .tcy-content {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }

  .tcy-page-head,
  .tcy-toolbar {
    gap: 10px;
  }

  .tcy-toolbar > .t-input,
  .tcy-toolbar > .t-select,
  .tcy-toolbar > .t-button,
  .tcy-toolbar > .t-space {
    width: 100% !important;
    max-width: none !important;
  }

  .tcy-toolbar > .t-button {
    justify-content: center;
  }

  .t-button {
    min-height: 42px;
  }

  .tcy-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .tcy-table-wrap .t-table {
    min-width: 760px;
  }

  .t-form-item .t-input,
  .t-form-item .t-textarea,
  .t-form-item .t-select,
  .t-form-item .t-date-picker {
    font-size: 16px;
  }

  .t-dialog {
    top: auto !important;
    bottom: calc(8px + env(safe-area-inset-bottom));
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    margin: 0 10px;
  }

  .t-dialog__body {
    max-height: 66vh;
  }

  .tcy-chat-head {
    gap: 8px;
    padding: 12px;
    font-size: 13px;
  }

  .tcy-message-row {
    max-width: 92%;
  }
}

@media (max-width: 768px) {
	.tcy-page-head { display: grid !important; grid-template-columns: minmax(0,1fr) !important; width: 100% !important; }
	.tcy-page-head > * { min-width: 0; max-width: 100%; }
}
