:root {
  color-scheme: light;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  color: #172b2e;
  background: #f0f4f3;
  --ink: #172b2e;
  --muted: #52676a;
  --line: #d8e2e1;
  --accent: #176457;
  --blue: #edf4fa;
  --peach: #faf1e9;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .52; cursor: default; }
button:focus-visible, input:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
h1, h2, h3, h4, p { margin: 0; }
button { border: 1px solid transparent; border-radius: .55rem; padding: .55rem .8rem; }
.primary { color: white; background: var(--accent); font-weight: 650; }
.primary:hover:enabled { background: #104e44; }
.secondary { background: #e9f2ef; border-color: #d2e3de; color: #174e44; font-weight: 650; }
.quiet { background: transparent; color: var(--muted); }
.quiet:hover, .secondary:hover { background: #e0eeea; }
.topbar { height: 66px; display: flex; align-items: center; justify-content: space-between; padding: 0 1.4rem; background: white; border-bottom: 1px solid var(--line); }
.brand, nav { display: flex; align-items: center; gap: .7rem; }
.brand { gap: .62rem; }
.brand-title { display: inline-flex; align-items: center; gap: .45rem; color: #203c35; font-size: 1.2rem; font-weight: 800; letter-spacing: .035em; white-space: nowrap; }
.brand-label { color: #22594b; background: #e5f2eb; border: 1px solid #c8e0d4; border-radius: .36rem; padding: .12rem .38rem; font-size: .82rem; letter-spacing: .09em; font-weight: 750; }
.brand-mark { display: inline-block; position: relative; background: linear-gradient(145deg, #296e5d, #174d42); border-radius: .62rem; width: 2.15rem; height: 2.15rem; flex: none; box-shadow: 0 2px 0 #143d34, inset 0 1px 0 #ffffff38; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; width: 40%; height: 31%; border-radius: 40% 40% 40% 10%; }
.brand-mark::before { top: 23%; left: 17%; background: #e1f1e4; }
.brand-mark::after { top: 44%; right: 15%; background: #9cd3b5; box-shadow: -1px -1px 0 1px #246354; transform: scaleX(-1); }
nav { font-size: .875rem; }
#count { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: .4rem; }
#progress { position: fixed; z-index: 2; inset: 0 0 auto; width: 100%; height: 3px; border: 0; appearance: none; background: #e1ece9; }
#progress::-webkit-progress-bar { background: #e1ece9; }
#progress::-webkit-progress-value { background: var(--accent); }
#progress::-moz-progress-bar { background: var(--accent); }
.entry { min-height: calc(100dvh - 66px); display: grid; place-items: center; padding: 1.5rem; background: radial-gradient(ellipse at 50% 35%, #e1eee9, #f0f4f3 70%); }
.entry-card { width: min(100%, 28rem); padding: 2.3rem; background: white; border: 1px solid var(--line); border-radius: 1.1rem; box-shadow: 0 16px 45px #193e3212; }
.entry-mark { width: 2.8rem; height: 2.8rem; margin-bottom: 1.15rem; }
.entry-card h1 { font-size: 1.85rem; margin-bottom: .55rem; }
.entry-card p { color: var(--muted); line-height: 1.6; }
.entry-card form { display: grid; gap: .6rem; margin-top: 1.4rem; }
.entry-card label { font-weight: 650; }
.entry-card input { width: 100%; padding: .8rem; border: 1px solid #a9bbba; border-radius: .55rem; }
.error { color: #9f3128 !important; }
.error:empty { display: none; }
.banner { position: fixed; bottom: 1rem; left: 1rem; background: white; padding: .85rem; border: 1px solid var(--line); border-radius: .5rem; }
.review-closed { z-index: 3; color: #795439; background: #fff4e8; border-color: #e5ccb5; }
.workspace { display: grid; grid-template-columns: minmax(215px, 22fr) minmax(0, 30fr) minmax(0, 30fr) minmax(205px, 18fr); gap: .8rem; height: calc(100dvh - 66px); padding: .85rem; background: linear-gradient(156deg, #edf2ee, #f4f6f7 56%, #eeeae3); }
.panel {
  --panel-ink: #285e50;
  --panel-edge: #c8d9d1;
  --panel-tint: #e9f4ec;
  --panel-tile: #d4eadc;
  display: flex; flex-direction: column; min-width: 0; min-height: 0;
  background: white; border: 1px solid var(--panel-edge); border-radius: .95rem; overflow: hidden;
  box-shadow: 0 3px 0 var(--panel-edge), 0 7px 16px #273c3620;
}
.conversation.left { --panel-ink: #355979; --panel-edge: #bdcedd; --panel-tint: #eaf3fb; --panel-tile: #d9e9f6; }
.conversation.right { --panel-ink: #795439; --panel-edge: #ddcbbd; --panel-tint: #fff2e5; --panel-tile: #f5dfca; }
.rating { --panel-ink: #543b78; --panel-edge: #d7cbe6; --panel-tint: #f2ebfa; --panel-tile: #e6d9f4; }
.panel-heading {
  display: flex; align-items: center; gap: .63rem; min-height: 56px; padding: .45rem .8rem;
  border-bottom: 1px solid var(--panel-edge);
  background: linear-gradient(105deg, var(--panel-tint), #fff 115%);
  box-shadow: inset 0 1px 0 #fff, 0 2px 5px #293a3511;
  color: var(--panel-ink);
}
.panel-heading h2 { font-size: 1.0625rem; font-weight: 750; line-height: 1.25; }
.heading-note { display: block; color: var(--muted); font-size: .8125rem; font-weight: 400; margin-top: .1rem; }
.panel-icon {
  width: 1.85rem; height: 1.85rem; flex: none; display: inline-grid; place-items: center;
  border-radius: .55rem; color: var(--panel-ink); background: var(--panel-tile);
  box-shadow: inset 0 1px 0 #fff9;
}
.panel-icon i { display: block; position: relative; }
.profile-icon i { width: 1.08rem; height: .84rem; border: 1.5px solid currentColor; border-radius: .2rem; }
.profile-icon i::before { content: ""; position: absolute; left: .15rem; top: .12rem; width: .22rem; height: .22rem; border-radius: 50%; background: currentColor; box-shadow: 0 .26rem 0 .035rem currentColor; }
.profile-icon i::after { content: ""; position: absolute; top: .19rem; right: .10rem; width: .34rem; height: 1.5px; border-radius: 2px; background: currentColor; box-shadow: 0 .22rem currentColor; }
.chat-icon i { width: 1.04rem; height: .77rem; margin-bottom: .14rem; border-radius: .28rem; background: currentColor; }
.chat-icon i::before { content: ""; position: absolute; left: .23rem; top: .25rem; width: .13rem; height: .13rem; border-radius: 50%; background: var(--panel-tile); box-shadow: .23rem 0 var(--panel-tile), .46rem 0 var(--panel-tile); }
.chat-icon i::after { content: ""; position: absolute; left: .15rem; bottom: -.15rem; border: .17rem solid transparent; border-left-color: currentColor; border-top-color: currentColor; }
.right .chat-icon i { transform: scaleX(-1); }
.rating-icon i { width: .88rem; height: 1.05rem; border: 1.5px solid currentColor; border-radius: .18rem; }
.rating-icon i::before { content: ""; position: absolute; top: -.15rem; left: .15rem; width: .41rem; height: .23rem; border-radius: .12rem; background: currentColor; }
.rating-icon i::after { content: ""; position: absolute; top: .31rem; left: .19rem; width: .33rem; height: .19rem; border: solid currentColor; border-width: 0 0 1.5px 1.5px; transform: rotate(-45deg); }
.scroll { flex: 1; min-height: 0; overflow: auto; scrollbar-gutter: stable; overscroll-behavior: contain; }
.scroll:focus-visible { outline-offset: -2px; }
.profile-content { padding: .85rem .7rem .85rem .85rem; }
.profile-content h3 { font-size: 1.16rem; line-height: 1.5; margin-bottom: .7rem; padding: .65rem .8rem; border: 1px solid #c6dcd3; border-radius: .65rem; background: linear-gradient(120deg, #deefe6, #f3faf6); color: #174e44; box-shadow: 0 2px 0 #dce9e3; }
.profile-block { margin-bottom: .55rem; border: 1px solid var(--line); border-radius: .65rem; background: #fafcfb; padding: .55rem .8rem; box-shadow: 0 2px 3px #273c360b; }
.profile-block:last-child { margin-bottom: 0; }
.profile-block[data-field="主要困扰"] { background: #fbf5ee; border-color: #eadfd1; }
.profile-block[data-field="主要困扰"] h4 { color: #745039; }
.profile-block[data-field="求助目标"] { background: #edf6f1; border-color: #d6e8df; }
.profile-block summary { margin: 0; }
.profile-block[open] summary { margin-bottom: .3rem; }
.profile-block h4, summary { color: #245a50; font-weight: 700; margin-bottom: .3rem; }
.profile-block p { line-height: 1.66; white-space: pre-wrap; overflow-wrap: anywhere; }
summary { cursor: pointer; }
.left { background: var(--blue); }
.right { background: var(--peach); }
.transcript { padding: .85rem .7rem .85rem .85rem; }
.message { display: grid; grid-template-columns: 1.875rem minmax(0, 1fr); gap: .5rem; align-items: start; margin-bottom: .73rem; }
.avatar { display: inline-block; width: 1.875rem; height: 1.875rem; object-fit: contain; vertical-align: middle; flex: none; }
.bubble { background: white; border: 1px solid #dce3e4; border-radius: .28rem .8rem .8rem .8rem; padding: .57rem .7rem; line-height: 1.62; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: 0 2px 2px #273c360c; }
.counselor .bubble { background: #e6f3ed; border-color: #cedeD7; }
.rating-content { padding: .45rem .85rem; }
.rating-content fieldset { margin-top: .35rem; padding-bottom: .35rem; }
.legend { display: flex; gap: .75rem; color: var(--muted); font-size: .875rem; margin: .08rem 0 .45rem; }
.legend > span { display: inline-flex; align-items: center; gap: .22rem; }
.legend .avatar, .practice-chats .avatar { width: 1.35rem; height: 1.35rem; }
fieldset { min-width: 0; padding: 0 0 .6rem; margin: .62rem 0 0; border: 0; border-bottom: 1px solid var(--line); }
fieldset:last-child { border-bottom: 0; }
legend { font-weight: 700; font-size: .93rem; margin-bottom: .38rem; padding: 0; }
.options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .28rem; }
.option { position: relative; display: grid; }
.option input { position: absolute; opacity: 0; }
.option span { border: 1px solid #cddbd9; border-radius: .42rem; text-align: center; cursor: pointer; padding: .43rem .05rem; font-size: .875rem; white-space: nowrap; }
.option:hover span { background: #f0f6f4; }
.option input:checked + span { color: #125448; border-color: var(--accent); background: #dff0ea; box-shadow: inset 0 0 0 1px var(--accent); font-weight: 700; }
.option-left { --option-bg: var(--blue); --option-selected: #d9e9f7; --option-edge: #5684ab; --option-ink: #244f74; }
.option-right { --option-bg: var(--peach); --option-selected: #f4dfce; --option-edge: #ac7855; --option-ink: #713e22; }
.option-left span, .option-right span { color: var(--option-ink); background: var(--option-bg); border-color: var(--option-edge); }
.option-left:hover span, .option-right:hover span { background: var(--option-selected); }
.option-left input:checked + span, .option-right input:checked + span {
  color: var(--option-ink);
  background: var(--option-selected);
  border-color: var(--option-edge);
  box-shadow: inset 0 0 0 1px var(--option-edge);
}
.option input:focus-visible + span { outline: 2px solid #176457; outline-offset: 2px; }
.option input:disabled + span { cursor: default; }
.rating-footer { border-top: 1px solid var(--panel-edge); padding: .7rem .85rem; background: linear-gradient(180deg, #faf6fd, white); }
.rating-footer .primary { background: #674a8b; }
.rating-footer .primary:hover:enabled { background: #543b78; }
.rating-actions { display: grid; grid-template-columns: auto 1fr; gap: .55rem; }
#review-previous { margin-top: 1rem; }
#save-status { min-height: 1.3em; margin-bottom: .32rem; color: var(--muted); font-size: .875rem; }
dialog { width: min(52rem, calc(100vw - 2rem)); max-height: 89dvh; padding: 0; color: var(--ink); border: 1px solid var(--line); border-radius: .9rem; box-shadow: 0 18px 60px #102e3050; }
dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: #14272980; }
.modal-heading, .modal-footer { padding: 1rem 1.35rem; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.modal-heading { background: linear-gradient(108deg, #e9f4ec, #fff); box-shadow: inset 0 1px 0 white; }
.modal-footer { justify-content: end; border-top: 1px solid var(--line); border-bottom: 0; }
.modal-content { min-height: 0; overflow: auto; padding: 1.1rem 1.35rem; line-height: 1.65; }
.guide-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .45rem; }
.guide-steps button { padding-inline: .2rem; }
.guide-steps [aria-current="step"] { color: white; background: var(--accent); border-color: var(--accent); }
.guide-map { margin: .85rem 0 1rem; border: 1px solid var(--line); border-radius: .65rem; overflow: hidden; background: #f0f4f3; font-size: .875rem; }
.guide-map-toolbar { display: flex; justify-content: space-between; align-items: center; gap: .4rem; background: white; padding: .35rem .55rem; border-bottom: 1px solid var(--line); }
.guide-map-toolbar [data-module] { padding: .18rem .48rem; border-radius: .35rem; background: #e9f2ef; }
.guide-map-columns { display: grid; grid-template-columns: 1fr 1.35fr 1.35fr 1fr; gap: .32rem; padding: .4rem; }
.guide-map-columns span { display: grid; align-items: center; text-align: center; min-height: 3rem; padding: .15rem; border: 1px solid var(--line); border-radius: .35rem; }
.guide-map-columns span:not(.left, .right) { background: #fff; }
.guide-map .guide-highlight {
  outline: 4px solid #0e5448;
  outline-offset: -4px;
  padding-inline: .45rem;
  color: #125448;
  font-weight: 700;
}
.guide-step > p { margin-top: .25rem; color: var(--muted); }
.guide-example { background: #f0f6f3; border: 1px solid var(--line); border-radius: .55rem; padding: .7rem .85rem; margin-top: .65rem; }
.guide-example dl { display: grid; grid-template-columns: max-content 1fr; gap: .18rem .65rem; margin: .4rem 0; }
.guide-example dt { font-weight: 700; color: var(--accent); }
.guide-example dd { margin: 0; }
.guide-example button + p { margin-top: .4rem; }
.guide-scroll-demo section { min-width: 0; }
.guide-scroll-demo section > div { height: 7.5rem; overflow: auto; scrollbar-gutter: stable; overscroll-behavior: contain; }
.guide-scroll-demo p { border-radius: .35rem; background: white; padding: .25rem .45rem; }
.guide-footer { gap: .55rem; }
.guide-footer #guide-back { margin-right: auto; }
#practice-feedback { min-height: 1.6em; }
.practice-chats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .65rem; margin: .55rem 0; }
.practice-chats section { padding: .75rem; border-radius: .5rem; background: #edf4f1; }
.practice-chats section:first-child { background: var(--blue); }
.practice-chats section:last-child { background: var(--peach); }
.practice-chats p { margin-top: .25rem; }
.practice fieldset { max-width: 22rem; }
#rubric { width: min(85rem, calc(100% - 1.5rem)); max-height: calc(100dvh - 1.5rem); }
#rubric .modal-heading { gap: 1rem; padding: .65rem 1.25rem; }
#rubric-title { font-size: 1.45rem; }
#rubric .modal-heading p { color: var(--muted); margin-top: .2rem; font-size: 1rem; }
#rubric-close { flex-shrink: 0; }
#rubric-content { padding: .65rem 1.15rem; font-size: 1rem; line-height: 1.42; }
.rubric-table { width: 100%; table-layout: fixed; border-spacing: 0; border: 1px solid var(--line); border-radius: .55rem; overflow: hidden; }
.rubric-table th, .rubric-table td { padding: .38rem .65rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.rubric-table th:first-child { width: 6.3rem; }
.rubric-table thead th { background: #eff4f3; padding-block: .48rem; }
.rubric-table thead th:nth-child(2) { background: #deeee7; color: #174e44; }
.rubric-table thead th:nth-child(3) { background: #f5e8dd; color: #713e22; }
.rubric-table tbody th { background: #f3f6f5; color: #245a50; }
.rubric-table tbody td + td { border-left: 1px solid var(--line); }
.rubric-table tbody tr:nth-child(even) td { background: #fafcfb; }
.rubric-table tbody tr:last-child > * { border-bottom: 0; }
.rubric-notes { margin-top: .72rem; }
.rubric-notes h3 { font-size: 1rem; margin-bottom: .3rem; }
.rubric-notes ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; list-style: none; padding: 0; margin: 0; }
.rubric-notes li { border-left: 3px solid #79a499; padding: .35rem .6rem; background: #eff5f2; }
.rubric-notes strong { color: #245a50; }
@media (max-width: 730px) {
  #rubric { width: calc(100% - 1rem); max-height: calc(100dvh - 1rem); }
  #rubric .modal-heading, #rubric-content { padding-inline: .55rem; }
  .rubric-table th:first-child { width: 4.1rem; }
  .rubric-table th, .rubric-table td { padding-inline: .3rem; }
  .rubric-notes ul { grid-template-columns: 1fr; }
}
@media (max-width: 1050px) {
  .workspace { grid-template-columns: minmax(155px, 21fr) minmax(0, 30fr) minmax(0, 30fr) minmax(185px, 19fr); gap: .42rem; padding: .45rem; }
  .rating-content, .rating-footer { padding-inline: .48rem; }
}
@media (max-width: 730px) {
  .topbar { height: auto; min-height: 66px; padding: .65rem; flex-wrap: wrap; }
  .workspace { height: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile, .rating { grid-column: 1 / -1; }
  .profile-content { max-height: 16rem; }
  .conversation { height: 65dvh; }
  .transcript { padding: .45rem; }
  .message { grid-template-columns: 1fr; gap: .15rem; }
  .bubble { padding: .4rem; }
}
