:root {
  color-scheme: light;
  --tw-bg: #f4f6fb;
  --tw-surface: #ffffff;
  --tw-surface-soft: #f7f9fc;
  --tw-line: #dfe5ef;
  --tw-text: #151b2d;
  --tw-muted: #697386;
  --tw-pink: #ff4458;
  --tw-orange: #ff7854;
  --tw-blue: #1786ff;
  --tw-green: #00b894;
  --tw-purple: #7d4dff;
  --tw-shadow: 0 16px 42px rgba(23, 31, 50, 0.14);
  font-family: Inter, "Segoe UI", Arial, "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--tw-bg);
  color: var(--tw-text);
}

body {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.tinder-web {
  display: grid;
  grid-template-columns: 330px minmax(480px, 1fr) 360px;
  grid-template-rows: minmax(0, 1fr) 138px;
  gap: 18px;
  width: 100%;
  height: min(960px, calc(100vh - 4px));
  min-height: 850px;
  padding: 18px;
  background:
    radial-gradient(circle at 50% -20%, rgba(255, 68, 88, 0.12), transparent 34%),
    var(--tw-bg);
}

.tw-sidebar,
.tw-stage,
.tw-panel {
  min-height: 0;
}

.tw-sidebar {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--tw-surface);
  border-right: 1px solid var(--tw-line);
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(28, 37, 60, 0.08);
}

.tw-brand {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--tw-pink), var(--tw-orange));
}

.tw-flame {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  font-weight: 900;
  font-size: 24px;
}

.tw-brand-copy strong,
.tw-brand-copy span {
  display: block;
}

.tw-brand-copy strong {
  font-size: 20px;
}

.tw-brand-copy span {
  margin-top: 2px;
  font-size: 12px;
  opacity: 0.82;
}

.tw-ghost {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  color: inherit;
  background: rgba(255, 255, 255, 0.14);
}

.tw-ghost.danger {
  color: var(--tw-pink);
  border-color: rgba(255, 68, 88, 0.24);
  background: #fff3f5;
}

.tw-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--tw-line);
}

.tw-tabs button {
  height: 48px;
  background: #fff;
  color: var(--tw-muted);
  font-weight: 700;
  border-bottom: 3px solid transparent;
}

.tw-tabs button.active {
  color: var(--tw-pink);
  border-color: var(--tw-pink);
}

.tw-discover {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 12px;
  width: calc(100% - 24px);
  margin: 14px 12px;
  padding: 12px;
  text-align: left;
  color: var(--tw-text);
  background: var(--tw-surface-soft);
  border: 1px solid var(--tw-line);
  border-radius: 16px;
}

.tw-discover-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  color: var(--tw-pink);
  background: #ffe8ec;
  font-size: 28px;
  font-weight: 600;
}

.tw-discover strong,
.tw-discover small {
  display: block;
}

.tw-discover small {
  margin-top: 4px;
  color: var(--tw-muted);
}

.tw-list {
  flex: 1;
  overflow: auto;
  padding: 2px 10px 14px;
}

.tw-list-empty {
  padding: 28px 18px;
  color: var(--tw-muted);
  text-align: center;
  line-height: 1.7;
}

.tw-list-item {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 74px;
  margin: 4px 0;
  padding: 9px;
  text-align: left;
  color: var(--tw-text);
  background: #fff;
  border-radius: 14px;
}

.tw-list-item.active,
.tw-list-item:hover {
  background: #fff1f3;
}

.tw-avatar {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd2d9, #d9ecff);
}

.tw-list-main strong,
.tw-list-main span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tw-list-main .tw-list-name {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.tw-list-main span {
  margin-top: 5px;
  color: var(--tw-muted);
  font-size: 13px;
}

.tw-badge {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--tw-pink);
}

.tw-stage {
  display: grid;
  grid-template-rows: minmax(430px, 1fr) 74px 235px;
  gap: 14px;
  min-width: 0;
}

.tw-stage.chat-hidden {
  grid-template-rows: minmax(430px, 1fr) 74px 0;
}

.tw-stage.chat-hidden .tw-chat {
  display: none;
}

.tw-card {
  position: relative;
  overflow: hidden;
  width: min(460px, 100%);
  min-height: 430px;
  justify-self: center;
  border-radius: 18px;
  background: #1b2233;
  box-shadow: var(--tw-shadow);
}

.tw-card img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
  display: block;
}

.tw-photo-counter {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(16, 22, 34, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.tw-card-empty {
  display: grid;
  height: 100%;
  min-height: 430px;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 36px;
  color: #fff;
  text-align: center;
  background: linear-gradient(145deg, #20283b, #46546b);
}

.tw-card-empty strong {
  font-size: 22px;
}

.tw-card-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 72px 22px 22px;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
}

.tw-card-caption h1 {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin: 0 0 8px;
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0;
}

.tw-card-caption h1 span {
  font-weight: 500;
}

.tw-verified-icon {
  display: inline-grid;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #4e73ff;
  box-shadow: 0 2px 8px rgba(78, 115, 255, 0.35);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  vertical-align: middle;
}

.tw-list-name .tw-verified-icon {
  width: 15px;
  height: 15px;
  margin-left: 0;
  font-size: 10px;
}

.tw-card-caption p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.45;
}

.tw-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tw-chip {
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
  font-weight: 700;
}

.tw-profile-detail {
  position: absolute;
  inset: 16px;
  z-index: 4;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border-radius: 16px;
  color: var(--tw-text);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 44px rgba(16, 22, 34, 0.32);
}

.tw-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--tw-line);
}

.tw-detail-head button {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  color: #fff;
  background: var(--tw-pink);
  font-weight: 800;
}

.tw-detail-grid {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-content: start;
  gap: 10px 12px;
  overflow: auto;
  padding: 14px 16px 18px;
  font-size: 13px;
}

.tw-detail-grid span {
  color: var(--tw-muted);
  font-weight: 800;
}

.tw-detail-grid b {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.tw-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.tw-action {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 10px 26px rgba(28, 37, 60, 0.12);
  font-size: 28px;
  font-weight: 800;
}

.tw-action.pass {
  color: var(--tw-pink);
}

.tw-action.like {
  width: 68px;
  height: 68px;
  color: var(--tw-green);
  font-size: 32px;
}

.tw-action.rewind {
  color: #f5b342;
}

.tw-action.star {
  color: var(--tw-blue);
}

.tw-action.boost {
  color: var(--tw-purple);
}

.tw-chat,
.tw-box {
  background: #fff;
  border: 1px solid var(--tw-line);
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(28, 37, 60, 0.08);
}

.tw-chat {
  display: grid;
  grid-template-rows: 48px 1fr 54px;
  overflow: hidden;
  min-height: 0;
}

.tw-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--tw-line);
}

.tw-chat-log {
  overflow: auto;
  padding: 14px;
  background: #fafbfe;
}

.tw-message {
  display: flex;
  margin: 8px 0;
}

.tw-message.me {
  justify-content: flex-end;
}

.tw-message span {
  max-width: 78%;
  padding: 10px 12px;
  border-radius: 16px;
  color: #20283b;
  background: #eef2f7;
  line-height: 1.4;
}

.tw-message.me span {
  color: #fff;
  background: linear-gradient(135deg, var(--tw-pink), var(--tw-orange));
}

.tw-chat-send {
  display: grid;
  grid-template-columns: 1fr 90px;
  gap: 10px;
  padding: 8px;
  border-top: 1px solid var(--tw-line);
}

.tw-match-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 9999;
  display: grid;
  width: min(340px, calc(100vw - 36px));
  justify-items: center;
  gap: 12px;
  padding: 28px 24px 22px;
  border-radius: 22px;
  color: var(--tw-text);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 80px rgba(16, 22, 34, 0.32);
  transform: translate(-50%, -50%);
}

.tw-match-popup img {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 22px rgba(255, 68, 88, 0.28);
}

.tw-match-popup strong {
  color: var(--tw-pink);
  font-size: 28px;
}

.tw-match-popup span {
  color: var(--tw-muted);
  text-align: center;
}

.tw-match-popup button {
  min-height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--tw-pink), var(--tw-orange));
  font-weight: 800;
}

.tw-chat-send input,
.tw-field input,
.tw-field textarea {
  width: 100%;
  min-height: 38px;
  padding: 9px 11px;
  border: 1px solid var(--tw-line);
  border-radius: 12px;
  outline: none;
  color: var(--tw-text);
  background: #fff;
}

.tw-chat-send input:focus,
.tw-field input:focus,
.tw-field textarea:focus {
  border-color: rgba(255, 68, 88, 0.7);
  box-shadow: 0 0 0 3px rgba(255, 68, 88, 0.12);
}

.tw-chat-send button,
.tw-box button,
.tw-wide {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--tw-pink), var(--tw-orange));
  font-weight: 800;
}

.tw-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: auto;
}

.tw-box {
  padding: 16px;
}

.tw-box h2 {
  margin: 0 0 14px;
  font-size: 16px;
}

.tw-field {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}

.tw-field label {
  color: var(--tw-muted);
  font-size: 12px;
  font-weight: 800;
}

.tw-field textarea {
  min-height: 92px;
  resize: vertical;
}

.tw-field-row,
.tw-button-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.tw-inline-controls {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.tw-checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--tw-muted);
  font-size: 13px;
  font-weight: 700;
}

.tw-checkline input {
  width: 16px;
  height: 16px;
  accent-color: var(--tw-pink);
}

.tw-auto-status {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.tw-auto-status span {
  padding: 8px 9px;
  border-radius: 12px;
  color: var(--tw-muted);
  background: var(--tw-surface-soft);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.tw-auto-status span.active {
  color: #fff;
  background: linear-gradient(135deg, var(--tw-green), var(--tw-blue));
}

.tw-action-grid-small {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.tw-wide {
  width: 100%;
}

.tw-log-box {
  grid-column: 1 / -1;
  min-height: 0;
}

.tw-log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tw-log-head span {
  color: #7b879b;
  font-size: 12px;
}

.tw-log-box pre {
  height: 86px;
  margin: 0;
  overflow: auto;
  padding: 12px;
  border-radius: 12px;
  color: #dbe7ff;
  background: #151b2d;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  white-space: pre-wrap;
}

@media (max-width: 1180px) {
  body {
    overflow: auto;
  }

  .tinder-web {
    grid-template-columns: 310px minmax(430px, 1fr);
    height: auto;
    min-height: 100vh;
  }

  .tw-panel {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
  }

  .tw-log-box {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .tinder-web {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .tw-stage {
    grid-template-rows: minmax(390px, auto) 70px 240px;
  }

  .tw-panel {
    display: flex;
  }
}
