:root {
  --bg: #101114;
  --panel: #181a20;
  --panel-2: #20242d;
  --text: #f7f1e8;
  --muted: #b9b1a6;
  --line: rgba(255, 255, 255, 0.12);
  --gold: #ffcb57;
  --hot: #ff5b78;
  --mint: #54d6a5;
  --blue: #6ab7ff;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 91, 120, 0.22), transparent 26%),
    radial-gradient(circle at 82% 12%, rgba(84, 214, 165, 0.18), transparent 24%),
    linear-gradient(135deg, #111216 0%, #17161b 52%, #0d1118 100%);
}

button,
input {
  font: inherit;
}

.stage {
  width: min(1160px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 0;
  display: grid;
  place-items: center;
}

.roast-card {
  width: 100%;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(24, 26, 32, 0.92);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
}

.card-border {
  height: 8px;
  background: linear-gradient(90deg, var(--gold), var(--hot), var(--blue), var(--mint));
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 30px;
  border-bottom: 1px solid var(--line);
}

.kicker {
  margin: 0 0 8px;
  color: var(--gold);
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1;
  letter-spacing: 0;
}

.subtitle {
  max-width: 680px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.badge {
  min-width: 138px;
  height: 88px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  align-content: center;
  gap: 6px;
  background: var(--panel-2);
}

.badge span,
.badge strong {
  display: block;
}

.badge span {
  color: var(--muted);
  font-size: 13px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.75fr);
  gap: 20px;
  padding: 24px 30px;
}

.drop-zone {
  min-height: 440px;
  border: 1px dashed rgba(255, 203, 87, 0.45);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 203, 87, 0.08), rgba(106, 183, 255, 0.06)),
    #121419;
  cursor: pointer;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.drop-zone.dragover {
  border-color: var(--mint);
  background:
    linear-gradient(135deg, rgba(84, 214, 165, 0.14), rgba(255, 91, 120, 0.08)),
    #121419;
}

.drop-zone input {
  display: none;
}

.preview {
  width: 100%;
  height: 100%;
  min-height: 438px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 20px;
  text-align: center;
  color: var(--muted);
}

.preview img {
  width: 100%;
  height: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: 12px;
}

.empty-face {
  width: 124px;
  height: 124px;
  border: 3px solid var(--gold);
  border-radius: 50%;
  position: relative;
  background: rgba(255, 255, 255, 0.03);
}

.empty-face::before,
.empty-face::after {
  content: "";
  position: absolute;
  top: 42px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--text);
}

.empty-face::before {
  left: 34px;
}

.empty-face::after {
  right: 34px;
}

.empty-face span {
  position: absolute;
  left: 36px;
  bottom: 34px;
  width: 52px;
  height: 18px;
  border-bottom: 4px solid var(--hot);
  border-radius: 50%;
}

.empty-face i {
  position: absolute;
  right: -12px;
  top: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--mint);
}

.preview p {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
}

.preview small {
  color: var(--muted);
}

.result-panel {
  display: grid;
  gap: 16px;
  align-content: start;
}

.score-box,
.identity-box,
.comment-frame {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-2);
}

.score-box {
  padding: 24px;
  min-height: 210px;
  display: grid;
  align-content: center;
  gap: 8px;
}

.score-box span,
.identity-box span {
  color: var(--muted);
}

.score-box strong {
  font-size: 86px;
  line-height: 1;
  color: var(--gold);
}

.score-box em {
  font-style: normal;
  color: var(--mint);
  font-weight: 800;
}

.identity-box {
  padding: 18px;
}

.identity-box strong {
  display: block;
  margin: 8px 0;
  color: var(--blue);
}

.identity-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.primary-btn,
.ghost-btn {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  color: var(--text);
  cursor: pointer;
}

.primary-btn {
  background: linear-gradient(135deg, #ff5b78, #ff9d4f);
  border-color: rgba(255, 255, 255, 0.18);
  font-weight: 800;
}

.primary-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ghost-btn {
  background: #14171d;
}

.comment-frame {
  margin: 0 30px 24px;
  overflow: hidden;
}

.frame-title {
  min-height: 54px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.frame-title span {
  font-weight: 800;
}

.frame-title b {
  color: var(--muted);
  font-size: 13px;
}

.comments {
  min-height: 150px;
  padding: 18px;
  display: grid;
  gap: 10px;
}

.comments p {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  line-height: 1.7;
}

.comments .placeholder {
  color: var(--muted);
}

.comments .final-line {
  border: 1px solid rgba(255, 203, 87, 0.38);
  background: rgba(255, 203, 87, 0.1);
  color: var(--gold);
  font-weight: 800;
}

.xiao-photo {
  margin: 4px 0 0;
  padding: 14px;
  border: 1px solid rgba(255, 203, 87, 0.32);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 203, 87, 0.12), rgba(255, 91, 120, 0.1)),
    rgba(255, 255, 255, 0.05);
}

.xiao-photo img {
  display: block;
  width: min(100%, 360px);
  max-height: 520px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.35);
}

.xiao-photo figcaption {
  margin-top: 10px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
}

.notes {
  padding: 0 30px 28px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 860px) {
  .hero,
  .workspace {
    grid-template-columns: 1fr;
    display: grid;
  }

  .workspace {
    padding: 18px;
  }

  .hero {
    padding: 22px;
  }

  .comment-frame {
    margin: 0 18px 18px;
  }

  .notes {
    padding: 0 18px 22px;
  }
}

@media (max-width: 520px) {
  .stage {
    width: min(100% - 20px, 1160px);
    padding: 10px 0;
  }

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

  .score-box strong {
    font-size: 68px;
  }
}
