/* 句子升格台：上面录入，下面原句 → 自改 → 升格 三栏对照 */
.task {
  z-index: 1;
  margin-left: 1.2rem;
  padding: 0.45rem 1.2rem;
  border-radius: 0.7rem;
  background: var(--ink);
  color: #fde779;
  font-family: var(--kai);
  font-size: 1.45rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.task u {
  text-decoration: none;
  border-bottom: 0.12rem solid #fde779;
  margin: 0 0.15rem;
}

.stage {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  height: calc(100vh - 4.6rem);
  padding: 1.1rem 1.4rem 1.3rem;
  background:
    radial-gradient(ellipse at 95% 110%, rgba(242, 163, 58, 0.18), transparent 50%),
    var(--paper);
}

/* —— 录入 */
.input {
  position: relative;
  flex: none;
  padding: 1rem 1.4rem 1.2rem;
}
.input-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.7rem;
  font-size: 1.35rem;
}
.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--sun);
  border: 0.12rem solid var(--ink);
  font-weight: 700;
}
.input-sub {
  font-size: 1rem;
  color: var(--ink-3);
}
.input-row {
  display: flex;
  align-items: stretch;
  gap: 1rem;
}
#text {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 1rem;
  border: 0.14rem solid var(--line);
  border-radius: 0.9rem;
  background: #fffef9;
  color: var(--ink);
  font-family: var(--kai);
  font-size: 2rem;
  line-height: 1.5;
  resize: none;
  outline: none;
  user-select: text;
}
#text:focus {
  border-color: var(--sun-deep);
  box-shadow: 0 0 0 0.25rem rgba(242, 163, 58, 0.2);
}
.input-tools {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.input-tools .btn {
  justify-content: flex-start;
  min-width: 9.5rem;
  box-shadow: 0 0.18rem 0 var(--ink);
}
#btnMic .level {
  display: none;
  height: 1.3rem;
  color: #fff;
}
#btnMic.recording {
  background: var(--red);
  color: #fff;
}
#btnMic.recording .level {
  display: inline-flex;
}
.btn.go {
  align-self: stretch;
  min-width: 12rem;
  height: auto;
  border-radius: 1.1rem;
  font-size: 1.6rem;
  flex-direction: column;
  gap: 0.2rem;
}
.btn.go small {
  font-size: 0.9rem;
  font-weight: 400;
}

/* —— 三栏 */
.cols {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1.15fr;
  gap: 1.1rem;
}
.col {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 1rem 1.3rem 1.2rem;
  overflow: hidden;
  transition: opacity 0.3s, transform 0.3s;
}
.col h3 {
  margin: 0 0 0.6rem;
  font-family: var(--song);
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  color: var(--ink-2);
}
.col h3 .num {
  margin-right: 0.3rem;
  color: var(--sun-deep);
}
.col.up {
  border-color: var(--pine);
  background: linear-gradient(180deg, #f5faf7 0%, var(--card) 40%);
}
.col.up h3 {
  color: var(--pine);
}
.col.up h3 .num {
  color: var(--pine);
}
.col.waiting {
  opacity: 0.55;
}
.col.active {
  box-shadow: 0 0 0 0.2rem var(--sun), var(--shadow);
}
.sentence {
  margin: 0 0 0.8rem;
  font-family: var(--kai);
  font-size: 1.9rem;
  line-height: 1.6;
  color: var(--ink);
  min-height: 3.2em;
  user-select: text;
}
.sentence .ph {
  color: var(--ink-3);
  font-size: 1.2rem;
  font-family: var(--sans);
}
.sentence .add {
  background: linear-gradient(transparent 55%, rgba(242, 163, 58, 0.45) 55%);
}
.col.up .sentence .add {
  background: linear-gradient(transparent 55%, rgba(47, 93, 80, 0.25) 55%);
}
.reveal {
  animation: reveal 0.7s ease-out both;
}
@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(0.6rem);
  }
}

/* 诊断 */
.diag {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.check {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 0.7rem;
  border-radius: 0.7rem;
  background: var(--paper);
  font-size: 1rem;
  line-height: 1.45;
}
.check b {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 1.8rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  color: #fff;
  background: var(--pine);
}
.check.no b {
  background: var(--red);
}
.check.no {
  background: var(--red-soft);
}
.hints {
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
}
.hints li {
  position: relative;
  margin-top: 0.45rem;
  padding: 0.45rem 0.7rem 0.45rem 2.2rem;
  border-radius: 0.7rem;
  background: #fff8e4;
  font-size: 1.08rem;
  line-height: 1.5;
}
.hints li::before {
  content: '?';
  position: absolute;
  left: 0.6rem;
  top: 0.5rem;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: var(--sun);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1.2rem;
  text-align: center;
}
.diag .summary {
  margin: 0.8rem 0 0;
  font-size: 1.05rem;
  color: var(--ink-2);
}
.diag .no-answer {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: var(--ink-3);
}

.praise {
  padding: 0.7rem 0.9rem;
  border-radius: 0.8rem;
  background: #fff8e4;
  font-size: 1.1rem;
  line-height: 1.6;
}
.praise:empty {
  display: none;
}
.praise::before {
  content: '👍 ';
}
.tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tech span {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--pine);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
}
.tech span + span::before {
  content: '';
}
.note {
  margin: 0.8rem 0 0;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--ink-2);
}

/* 拍照 */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(43, 33, 24, 0.55);
  z-index: 40;
}
.modal.show {
  display: flex;
}
.modal-box {
  width: min(70vw, 64rem);
  padding: 1.2rem;
}
.modal-box video {
  width: 100%;
  max-height: 65vh;
  border-radius: 0.8rem;
  background: #111;
  object-fit: contain;
}
.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}
.is-offline .only-offline {
  display: inline-flex;
}
.only-offline {
  display: none;
}
