/* ============================================================
   投稿页 · 一页手写留言的质感，不做出题系统
   正文是主角，打分收进折叠区
   ============================================================ */

.submit-page .topbar-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.submit-page .back {
  font-size: 12.5px;
  color: var(--ink-3);
}
.submit-page .back:hover { color: var(--accent); }

.note-wrap {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.paper {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 #fff, 0 8px 30px rgba(28, 27, 25, .045);
  padding: 38px 40px 40px;
  position: relative;
}

/* 纸左上角的一道折角 */
.paper::before {
  content: "";
  position: absolute;
  top: -1px; right: -1px;
  width: 34px; height: 34px;
  background: linear-gradient(225deg, var(--paper) 50%, transparent 50%);
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.kicker {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--accent);
  margin: 0 0 14px;
  text-transform: uppercase;
}

.note-head h1 {
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 16px;
  letter-spacing: .01em;
}

.note-intro {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.9;
  margin: 0 0 6px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

/* ---------- 字段 ---------- */

.field { margin-top: 28px; }

.field label {
  display: block;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.req, .opt {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 400;
  color: var(--ink-3);
  margin-left: 7px;
  letter-spacing: 0;
  vertical-align: 1px;
}
.req { color: var(--accent); }

.field-hint {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.7;
  margin: 0 0 10px;
}

input[type="text"],
select,
textarea {
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: 11px 13px;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, background .15s;
  -webkit-appearance: none;
}

select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%),
                    linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

input[type="text"]:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  background: var(--card);
}

input::placeholder,
textarea::placeholder { color: #b3ada2; }

textarea {
  resize: vertical;
  line-height: 1.85;
  min-height: 148px;
}

/* 主输入区——正文，视觉重心 */
.field-main label { font-size: 17px; }

.count-line {
  font-size: 11.5px;
  color: var(--ink-3);
  margin: 7px 0 0;
}

/* 次要字段弱化 */
.field-soft { margin-top: 24px; }
.field-soft label { font-size: 14px; color: var(--ink-2); }

/* ---------- 标签 ---------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chips button {
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink-2);
  font-size: 12.5px;
  padding: 6px 12px;
  border-radius: 2px;
  cursor: pointer;
  transition: all .12s;
}

.chips button:hover { border-color: var(--accent); color: var(--accent); }

.chips button[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- 折叠的打分 ---------- */

.score-opt {
  margin-top: 30px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.score-opt summary {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.score-opt summary::-webkit-details-marker { display: none; }

.score-opt summary::before {
  content: "+";
  font-family: var(--mono);
  color: var(--accent);
  margin-right: 8px;
}
.score-opt[open] summary::before { content: "−"; }

.score-opt summary span {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-3);
  white-space: nowrap;
}

.score-note {
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.7;
  margin: 12px 0 4px;
}

.dims { padding: 8px 0 4px; }

.dim {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
}
.dim + .dim { border-top: 1px dotted var(--line); }

.dl {
  font-family: var(--serif);
  font-size: 13.5px;
  width: 52px;
  flex: 0 0 52px;
}

.scale { display: flex; gap: 6px; }

.scale button {
  width: 38px;
  height: 36px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 12px;
  border-radius: 2px;
  cursor: pointer;
  transition: all .12s;
}
.scale button:hover { border-color: var(--accent); color: var(--accent); }
.scale button[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.ratewrap { flex: 0 0 auto; }

.ends {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--ink-3);
  margin-top: 4px;
  width: 100%;
}
.ends b { font-weight: 400; }

/* ---------- 提交 ---------- */

.err {
  background: #fcebea;
  border-left: 2px solid var(--accent);
  color: #7d2a22;
  font-size: 13px;
  padding: 10px 13px;
  margin: 22px 0 0;
  line-height: 1.6;
}

.send {
  display: block;
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 2px;
  padding: 14px;
  margin-top: 28px;
  font-family: var(--sans);
  font-size: 15px;
  letter-spacing: .06em;
  cursor: pointer;
  transition: opacity .15s, transform .15s;
  text-align: center;
}
.send:hover { opacity: .9; transform: translateY(-1px); }
.send:disabled { opacity: .5; cursor: default; transform: none; }

.send.inline {
  display: inline-block;
  width: auto;
  padding: 11px 26px;
  font-size: 14px;
  margin: 0;
}

.fine {
  font-size: 11.5px;
  color: var(--ink-3);
  text-align: center;
  margin: 14px 0 0;
  line-height: 1.6;
}

/* ---------- 成功态 ---------- */

#done { text-align: center; padding-top: 30px; }
#done .kicker { letter-spacing: .3em; }
#done h2 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 16px;
}
#done .lede {
  text-align: left;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.9;
}
.acts {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
}
.ghost {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
  padding: 11px 22px;
  font-size: 14px;
  border-radius: 2px;
  cursor: pointer;
}
.ghost:hover { border-color: var(--accent); color: var(--accent); }

footer {
  border-top: 1px solid var(--line);
  margin-top: 20px;
}
.footinner {
  max-width: 600px;
  margin: 0 auto;
  padding: 22px 20px 40px;
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.8;
}

@media (max-width: 480px) {
  .note-wrap { padding: 24px 14px 60px; }
  .paper { padding: 28px 22px 32px; }
  .note-head h1 { font-size: 25px; }
  .scale button { width: 34px; height: 34px; }
  .dim { gap: 10px; }
  .dl { width: 44px; flex: 0 0 44px; font-size: 13px; }
  .score-opt summary { flex-direction: column; align-items: flex-start; gap: 2px; }
}

@media (min-width: 600px) {
  .ratewrap { flex: 1; }
  .scale { width: 100%; }
  .scale button { flex: 1; }
}
