:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --ink: #15191f;
  --muted: #68717d;
  --line: #dce2e8;
  --accent: #1f7a5c;
  --accent-dark: #115941;
  --danger: #b91c1c;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei",
    sans-serif;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

h1,
p {
  margin: 0;
}

.page {
  width: min(100% - 28px, 560px);
  margin: 0 auto;
  padding: 22px 0 34px;
}

.app-header {
  padding: 4px 0 18px;
}

.app-header h1 {
  font-size: 26px;
  line-height: 1.16;
}

.app-header p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.card {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
}

.title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
}

.muted {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.primary,
.secondary {
  display: inline-grid;
  place-items: center;
  width: 100%;
  min-height: 46px;
  margin-top: 14px;
  border-radius: 7px;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 800;
}

.primary {
  background: var(--accent);
  color: #ffffff;
}

.primary:hover {
  background: var(--accent-dark);
}

.secondary {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.secondary:hover {
  background: #f9fbfc;
}

.full-width {
  width: 100%;
}

.video-summary {
  margin-top: 14px;
}

.duration {
  margin-top: 8px;
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.45;
}

.duration-error,
.error-text {
  color: var(--danger);
}

.error-text {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.5;
}

.page-error {
  border: 1px solid rgba(185, 28, 28, 0.24);
  border-radius: 7px;
  background: rgba(254, 242, 242, 0.86);
  padding: 10px 12px;
}

.preview-video {
  display: block;
  width: 100%;
  max-height: 360px;
  margin-top: 12px;
  border-radius: 8px;
  background: #050709;
}

.field {
  display: block;
  margin-top: 14px;
}

.field-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  padding: 9px 11px;
  outline: none;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 122, 92, 0.14);
}

progress {
  display: block;
  width: 100%;
  height: 10px;
  margin-top: 18px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #edf1f4;
}

progress::-webkit-progress-bar {
  background: #edf1f4;
}

progress::-webkit-progress-value {
  border-radius: 999px;
  background: var(--accent);
}

progress::-moz-progress-bar {
  border-radius: 999px;
  background: var(--accent);
}

.progress-meta {
  margin-top: 10px;
}

.section-title {
  margin-bottom: 10px;
  color: var(--accent-dark);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
}

.compact-title {
  margin-top: 14px;
  margin-bottom: 8px;
  font-size: 15px;
}

.personality-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  margin-top: 14px;
}

.personality-name {
  color: var(--ink);
  font-size: 20px;
  font-weight: 850;
  line-height: 1.3;
}

.severity-badge {
  min-width: 42px;
  border-radius: 999px;
  background: #eff8f4;
  color: var(--accent-dark);
  padding: 5px 12px;
  text-align: center;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.2;
}

.personality-roast {
  margin-top: 14px;
  border-left: 4px solid var(--accent);
  border-radius: 7px;
  background: #f3faf6;
  color: #123f31;
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.55;
}

.personality-meme {
  margin-top: 14px;
}

.meme-caption {
  color: #123f31;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.4;
  text-align: center;
}

.meme-image {
  display: block;
  width: 100%;
  max-height: 300px;
  margin: 8px auto;
  border-radius: 8px;
  background: #eef2f4;
  object-fit: contain;
}

.evidence-item {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
}

.evidence-item + .evidence-item {
  margin-top: 6px;
}

.item {
  line-height: 1.55;
}

.item + .item {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.item strong {
  display: block;
  font-size: 14px;
  line-height: 1.45;
}

.item .muted {
  font-size: 13px;
}

@media (min-width: 760px) {
  .page {
    padding-top: 32px;
  }

  .card {
    padding: 18px;
  }

  .app-header h1 {
    font-size: 30px;
  }
}
