:root {
  color-scheme: light;
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #fff2f7;
  color: #402032;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, #ffe1ee 0, #fff7fb 260px),
    #fff7fb;
}

button,
input {
  font: inherit;
}

.tt-shell {
  min-height: 100vh;
}

.tt-login {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.tt-login-card {
  background: #ffffff;
  border: 1px solid #ffd1e3;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(176, 61, 109, 0.18);
  display: grid;
  gap: 14px;
  padding: 28px;
  width: min(390px, 100%);
}

.tt-login-card h1,
.tt-topbar h1 {
  color: #b73772;
  font-size: 28px;
  margin: 0;
}

.tt-login-card label {
  display: grid;
  gap: 6px;
}

.tt-login-card span,
.tt-topbar p,
.tt-summary span,
.tt-groups span,
.tt-posts header span,
.tt-posts article span,
.tt-posts aside span {
  color: #7a5367;
  font-size: 12px;
}

.tt-login-card input {
  border: 1px solid #f4b5cf;
  border-radius: 8px;
  color: #402032;
  min-height: 42px;
  padding: 0 12px;
}

.tt-login-card button,
.tt-topbar button,
.tt-groups button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  min-height: 38px;
  padding: 0 14px;
}

.tt-login-card button,
.tt-topbar button.is-active,
.tt-groups button.is-active {
  background: #d84a89;
  color: #fff;
}

.ghost-button,
.tt-topbar button,
.tt-groups button {
  background: #fff;
  border: 1px solid #ffd1e3;
  color: #b73772;
}

.tt-app {
  display: grid;
  gap: 16px;
  min-width: 1120px;
  padding: 22px;
}

.tt-topbar {
  align-items: center;
  background: #ffffff;
  border: 1px solid #ffd1e3;
  border-radius: 8px;
  box-shadow: 0 14px 40px rgba(176, 61, 109, 0.1);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding: 16px;
}

.tt-topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.tt-topbar button:disabled {
  cursor: default;
  opacity: 0.6;
}

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

.tt-summary > div {
  background: #ffffff;
  border: 1px solid #ffd1e3;
  border-radius: 8px;
  padding: 16px;
}

.tt-summary strong {
  color: #b73772;
  display: block;
  font-size: 28px;
  margin-top: 6px;
}

.tt-summary p {
  color: #7a5367;
  font-size: 12px;
  margin: 6px 0 0;
}

.tt-section {
  background: #ffffff;
  border: 1px solid #ffd1e3;
  border-radius: 8px;
  box-shadow: 0 14px 40px rgba(176, 61, 109, 0.08);
  display: grid;
  gap: 12px;
  padding: 12px;
}

.tt-section + .tt-section {
  margin-top: 16px;
}

.tt-section-title {
  align-items: center;
  border-bottom: 1px solid #ffe1ee;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: -12px -12px 0;
  padding: 14px 16px;
}

.tt-section-title h2 {
  color: #402032;
  font-size: 20px;
  margin: 0;
}

.tt-section-title span {
  color: #7a5367;
  font-size: 12px;
  font-weight: 800;
}

.tt-dynamic-summary {
  border: 1px solid #ffe1ee;
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
}

.tt-dynamic-summary > div {
  border-right: 1px solid #ffe1ee;
  padding: 14px 16px;
}

.tt-dynamic-summary > div:last-child {
  border-right: 0;
}

.tt-dynamic-summary span,
.tt-dynamic-summary small {
  color: #7a5367;
  display: block;
  font-size: 12px;
}

.tt-dynamic-summary strong {
  color: #b73772;
  display: block;
  font-size: 22px;
  margin: 6px 0 4px;
}

.tt-analysis-flow {
  display: grid;
  gap: 12px;
}

.tt-analysis-flow-title {
  align-items: baseline;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.tt-analysis-flow-title strong {
  color: #402032;
  font-size: 16px;
}

.tt-analysis-flow-title span {
  color: #7a5367;
  font-size: 12px;
  font-weight: 800;
}

.tt-analysis-flow-cards {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tt-analysis-flow-cards article {
  background: #fff8fb;
  border: 1px solid #ffd1e3;
  border-radius: 8px;
  color: #5e3449;
  font-size: 13px;
  line-height: 1.45;
  min-height: 82px;
  padding: 12px;
}

.sparkline {
  align-items: end;
  display: grid;
  gap: 2px;
  grid-template-columns: repeat(30, minmax(2px, 1fr));
  height: 54px;
  margin: 10px 0 2px;
}

.sparkline i {
  background: #d84a89;
  border-radius: 3px 3px 0 0;
  display: block;
  min-height: 8px;
}

.sparkline i.views {
  background: #6f9f34;
}

.sparkline-empty {
  align-items: center;
  color: #7a5367;
  display: flex;
  font-size: 12px;
}

.insight-tags div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  min-height: 54px;
}

.insight-tags em {
  background: #fff2f7;
  border-radius: 999px;
  color: #a63168;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  padding: 5px 9px;
}

.tt-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: 300px minmax(0, 1fr);
}

.tt-groups,
.tt-posts {
  background: #ffffff;
  border: 1px solid #ffd1e3;
  border-radius: 8px;
  min-height: 520px;
  padding: 12px;
}

.tt-groups {
  display: grid;
  gap: 8px;
  align-content: start;
}

.tt-group-choice {
  display: grid;
  gap: 4px;
}

.tt-groups button {
  display: grid;
  gap: 5px;
  height: auto;
  justify-items: start;
  min-height: 58px;
  padding: 10px;
  text-align: left;
  white-space: normal;
}

.tt-groups strong {
  font-size: 14px;
}

.tt-group-choice > a,
.tt-post-links a {
  color: #2b8a57;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.tt-group-choice > a:hover,
.tt-post-links a:hover,
.tt-posts aside a:hover {
  text-decoration: underline;
}

.tt-posts header {
  border-bottom: 1px solid #ffe1ee;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 560px);
  align-items: center;
  margin: -12px -12px 12px;
  padding: 14px;
}

.tt-posts header strong {
  color: #402032;
  display: block;
  font-size: 22px;
  margin-top: 4px;
}

.tt-target-editor {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.tt-target-editor label {
  display: grid;
  gap: 5px;
}

.tt-target-editor input {
  border: 2px solid #f25c68;
  border-radius: 2px;
  color: #402032;
  min-height: 38px;
  min-width: 0;
  padding: 0 10px;
  width: 100%;
}

.tt-target-editor button {
  background: #78bd00;
  border: 2px solid #78bd00;
  border-radius: 2px;
  color: #ffffff;
  cursor: pointer;
  font-weight: 900;
  min-height: 38px;
  min-width: 84px;
  padding: 0 14px;
}

.tt-target-editor small {
  color: #7a5367;
  font-size: 12px;
  grid-column: 1 / -1;
  min-height: 16px;
}

.tt-managed-form {
  border-bottom: 1px solid #ffe1ee;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 1fr) 140px minmax(260px, 1.2fr) minmax(140px, 0.7fr) 100px 110px;
  padding: 14px;
}

.tt-managed-form label {
  color: #7a5367;
  display: grid;
  font-size: 12px;
  font-weight: 900;
  gap: 6px;
}

.tt-managed-form input,
.tt-managed-form select {
  border: 1px solid #ffc7dd;
  border-radius: 6px;
  color: #402032;
  font: inherit;
  min-height: 38px;
  min-width: 0;
  padding: 8px 10px;
}

.tt-managed-form .wide-field {
  grid-column: span 3;
}

.tt-managed-actions {
  align-items: end;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.tt-managed-actions button,
.tt-managed-table button {
  background: #da4a8a;
  border: 1px solid #da4a8a;
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  font-weight: 900;
  min-height: 34px;
  padding: 0 12px;
}

.tt-managed-table th:nth-child(5),
.tt-managed-table td:nth-child(5),
.tt-managed-table th:nth-child(7),
.tt-managed-table td:nth-child(7) {
  min-width: 180px;
}

.tt-management-section .is-hidden {
  display: none !important;
}

.tt-management-section .mini-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
}

.tt-management-section .mini-tabs button {
  background: #fff5fa;
  border: 1px solid #ffc7dd;
  border-radius: 999px;
  color: #9b4970;
  font-weight: 900;
  min-height: 34px;
  padding: 0 14px;
}

.tt-management-section .mini-tabs button.is-active {
  background: #da4a8a;
  border-color: #da4a8a;
  color: #fff;
}

.tt-management-section .managed-panel {
  padding: 0 14px 14px;
}

.tt-managed-overview {
  min-width: 1480px;
}

.tt-managed-form {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  padding: 14px 0;
}

.tt-managed-form label {
  display: grid;
  gap: 6px;
}

.tt-managed-form textarea {
  border: 1px solid #ffc7dd;
  border-radius: 6px;
  color: #402032;
  font: inherit;
  min-height: 84px;
  padding: 8px 10px;
  resize: vertical;
}

.tt-managed-form button {
  align-self: end;
}

.tt-managed-board {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.tt-managed-board article {
  border: 1px solid #ffe1ee;
  border-radius: 8px;
  padding: 12px;
}

.tt-posts article {
  border: 1px solid #ffe1ee;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 28px 44px minmax(0, 1fr) 130px;
  margin-bottom: 10px;
  padding: 12px;
}

.tt-post-select {
  align-self: start;
  display: grid;
  justify-content: center;
  padding-top: 13px;
}

.tt-post-select input {
  height: 18px;
  width: 18px;
}

.rank {
  align-items: center;
  background: #fff2f7;
  border-radius: 8px;
  color: #b73772;
  display: flex;
  font-weight: 900;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.tt-posts article strong,
.tt-posts article span,
.tt-posts article p {
  display: block;
}

.tt-posts article p {
  color: #6c4056;
  font-size: 13px;
  line-height: 1.5;
  margin: 8px 0;
}

.tt-post-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 6px;
}

.tt-post-links span {
  color: #7a5367;
  font-size: 12px;
  font-weight: 800;
}

.tt-posts em {
  background: #fff2f7;
  border-radius: 999px;
  color: #a63168;
  display: inline-block;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  margin: 0 6px 6px 0;
  padding: 4px 8px;
}

.tt-posts aside {
  display: grid;
  gap: 5px;
  justify-items: end;
}

.tt-posts aside b {
  color: #b73772;
  font-size: 24px;
}

.tt-posts aside a {
  color: #b73772;
  font-size: 12px;
  font-weight: 800;
}

.tt-posts aside button,
.tt-pagination button {
  background: #fff2f7;
  border: 1px solid #ffd1e3;
  border-radius: 8px;
  color: #b73772;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  min-height: 30px;
  padding: 0 10px;
}

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

.tt-advice-card {
  background: #fff8fb;
  border: 1px solid #ffd1e3;
  border-radius: 8px;
  padding: 12px;
}

.tt-advice-card h3 {
  color: #402032;
  font-size: 15px;
  margin: 0 0 8px;
}

.tt-advice-card ol {
  color: #402032;
  display: grid;
  font-size: 13px;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
}

.tt-advice-card p {
  color: #7a5367;
  font-size: 13px;
  margin: 0;
}

.tt-recommended-groups {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.tt-recommended-groups article {
  align-items: start;
  border: 1px solid #ffd1e3;
  border-radius: 8px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 12px;
}

.tt-recommended-groups strong,
.tt-recommended-groups span {
  display: block;
}

.tt-recommended-groups strong {
  color: #402032;
  font-size: 16px;
}

.tt-recommended-groups span {
  color: #7a5367;
  font-size: 12px;
  margin: 4px 0 8px;
}

.tt-recommended-groups b {
  color: #b73772;
  font-size: 22px;
}

.tt-recommended-groups em,
.tt-table-tags em {
  background: #fff2f7;
  border-radius: 999px;
  color: #a63168;
  display: inline-block;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  margin: 0 5px 5px 0;
  padding: 4px 8px;
}

.tt-table-wrap {
  border: 1px solid #ffd1e3;
  border-radius: 8px;
  overflow-x: auto;
}

.tt-analysis-table {
  border-collapse: collapse;
  min-width: 920px;
  width: 100%;
}

.tt-analysis-table th,
.tt-analysis-table td {
  border-bottom: 1px solid #ffe1ee;
  color: #402032;
  font-size: 13px;
  padding: 11px 10px;
  text-align: left;
  vertical-align: top;
}

.tt-analysis-table th {
  background: #fff2f7;
  color: #7a5367;
  font-size: 12px;
  font-weight: 900;
}

.tt-analysis-table td span {
  color: #7a5367;
  display: block;
  font-size: 12px;
  margin-top: 4px;
}

.tt-analysis-table td b {
  color: #b73772;
}

.tt-pagination {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.tt-pagination span {
  color: #7a5367;
  font-size: 12px;
}

.empty {
  color: #7a5367;
  padding: 16px;
}

@media (max-width: 760px) {
  .tt-app {
    min-width: 0;
    padding: 12px;
  }

  .tt-topbar,
  .tt-summary,
  .tt-dynamic-summary,
  .tt-analysis-flow-cards,
  .tt-layout,
  .tt-advice-grid,
  .tt-posts header,
  .tt-posts article,
  .tt-target-editor {
    grid-template-columns: 1fr;
  }

  .tt-posts aside {
    justify-items: start;
  }

  .tt-topbar nav {
    justify-content: flex-start;
  }

  .tt-section-title {
    align-items: flex-start;
    display: grid;
  }
}
