:root {
  --bg: #f4f7f4;
  --surface: #ffffff;
  --surface-2: #edf4f1;
  --ink: #163b36;
  --ink-2: #46625c;
  --ink-3: #71817c;
  --line: #dce5e1;
  --line-strong: #cbd8d3;
  --brand: #d96b43;
  --brand-strong: #b95432;
  --brand-soft: #f8e7df;
  --ok: #2d7d58;
  --ok-soft: #eff8f2;
  --err: #b64a45;
  --err-soft: #fdf0ee;
  --warn: #9a5a25;
  --warn-soft: #f8ece2;
  --radius: 12px;
  --shadow: 0 18px 46px rgba(24, 65, 57, 0.08);
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

body {
  background:
    radial-gradient(900px 520px at 100% -10%, #dcece7 0%, transparent 56%),
    radial-gradient(620px 420px at -12% 40%, #f7e6df 0%, transparent 54%),
    var(--bg);
}

.app { max-width: 960px; }

.topbar {
  background: rgba(244, 247, 244, 0.9);
  border-bottom-color: rgba(220, 229, 225, 0.9);
  backdrop-filter: blur(18px);
}

.brandmark {
  background: var(--ink);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
}

.card,
.qcard,
.item {
  border-color: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-head h2,
.grp-title,
.qtext {
  color: var(--ink);
}

.btn {
  border-radius: 999px;
}

.btn-primary {
  background: var(--brand);
}

.btn-primary:hover { background: var(--brand-strong); }
.btn-soft { background: var(--brand-soft); color: #9b4427; }
.btn-ghost { background: #fff; }

.chip {
  border-radius: 999px;
  background: #fff;
}

.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.chip[aria-pressed="true"] .dot { background: var(--brand); }

.seg {
  border-radius: var(--radius);
  background: var(--surface-2);
}

.seg button { border-radius: 999px; }
.seg button[aria-pressed="true"] {
  color: #fff;
  background: var(--ink);
}
.seg button[aria-pressed="true"] .d { color: #c7d7d2; }

.feiling-hero {
  position: relative;
  overflow: hidden;
  max-width: 100%;
  margin-bottom: 16px;
  padding: 26px 24px;
  border-radius: var(--radius);
  color: #fff;
  background: var(--ink);
  box-shadow: var(--shadow);
}

.feiling-hero::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -108px;
  top: -132px;
  border: 56px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
}

.feiling-kicker {
  color: #c7d7d2;
  font-size: 12px;
  font-weight: 700;
}

.feiling-hero h2 {
  position: relative;
  z-index: 1;
  margin: 14px 0 8px;
  font-size: 25px;
  line-height: 1.3;
  letter-spacing: 0;
}

.feiling-hero p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #b9ccc5;
  font-size: 13.5px;
  line-height: 1.65;
}

.feiling-hero-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 22px;
}

.feiling-hero-stats div {
  padding-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.feiling-hero-stats b {
  display: block;
  font-size: 23px;
  line-height: 1;
}

.feiling-hero-stats span {
  display: block;
  margin-top: 7px;
  color: #a9beb7;
  font-size: 11px;
}

.clause-shortcut {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.clause-shortcut::after {
  position: absolute;
  right: 18px;
  bottom: 0;
  left: 102px;
  height: 3px;
  content: "";
  background: repeating-linear-gradient(
    90deg,
    var(--line-strong) 0 18px,
    transparent 18px 27px
  );
  opacity: 0.75;
}

.clause-shortcut:hover {
  border-color: #e6c4b7;
  box-shadow: 0 22px 48px rgba(24, 65, 57, 0.11);
  transform: translateY(-2px);
}

.grammar-atlas-shortcut .clause-shortcut-mark {
  background: var(--brand);
}

.grammar-atlas-shortcut .clause-shortcut-mark small {
  color: #ffe4d8;
}

.grammar-atlas-shortcut .clause-shortcut-copy strong {
  color: var(--ink);
}

.clause-shortcut:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}

.clause-shortcut-mark {
  display: grid;
  width: 64px;
  height: 70px;
  place-content: center;
  border-radius: 8px 8px 5px 5px;
  color: #fff;
  background: var(--ink);
  text-align: center;
}

.clause-shortcut-mark b {
  font-size: 29px;
  line-height: 1;
}

.clause-shortcut-mark small {
  margin-top: 7px;
  color: #b9ccc5;
  font-family: monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.clause-shortcut-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.clause-shortcut-kicker {
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.clause-shortcut-copy strong {
  font-size: 18px;
  line-height: 1.3;
}

.clause-shortcut-copy > span:last-child {
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.6;
}

.clause-shortcut-cta {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border-radius: 999px;
  color: #fff;
  background: var(--brand);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.qcard { padding: 22px 18px; }
.qtext { font-family: var(--font); font-size: 20px; }
.opt { border-radius: var(--radius); }
.opt:hover:not(.locked) { background: var(--surface-2); border-color: var(--ink); }
.opt.correct { background: var(--ok-soft); }
.opt.wrong { background: var(--err-soft); }
.feed { border-radius: var(--radius); }

.ring {
  background: conic-gradient(var(--brand) calc(var(--p,0) * 1%), var(--line) 0);
}

.stat { border-radius: var(--radius); }
.sheet { border-radius: 18px 18px 0 0; }

@media (min-width: 720px) {
  .sheet { border-radius: 18px; }
  .feiling-hero { padding: 32px 30px; }
  .feiling-hero h2 { font-size: 30px; max-width: 620px; }
}

@media (max-width: 520px) {
  .app { padding-left: 14px; padding-right: 14px; }
  .feiling-hero { padding: 22px 18px; }
  .feiling-hero h2 { font-size: 23px; }
  .bottombar { margin-left: -14px; margin-right: -14px; }
  .clause-shortcut {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 13px;
    padding: 17px 16px;
  }
  .clause-shortcut-mark {
    width: 54px;
    height: 62px;
  }
  .clause-shortcut-cta {
    grid-column: 2;
    justify-self: start;
    min-height: 36px;
    margin-top: 2px;
  }
}
