:root {
  color-scheme: light;
  --ink: #17324d;
  --muted: #61758b;
  --line: #dbe5ed;
  --paper: #f7fafc;
  --white: #fff;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --teal-soft: #e4f3f0;
  --blue: #2c5f87;
  --blue-soft: #e8f1f7;
  --amber: #9a6700;
  --amber-soft: #fff6dd;
  --red: #b42318;
  --red-soft: #fff0ee;
  --shadow: 0 14px 34px rgba(25, 58, 82, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  line-height: 1.65;
}
button, input, select, textarea { font: inherit; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; opacity: .55; }
:focus-visible { outline: 3px solid #f0a202; outline-offset: 3px; }
.skip-link { position: absolute; top: 8px; left: 8px; z-index: 10; padding: 8px 12px; border-radius: 5px; background: var(--ink); color: #fff; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.site-header { position: sticky; top: 0; z-index: 5; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.97); backdrop-filter: blur(10px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; max-width: 1180px; min-height: 66px; margin: 0 auto; padding: 0 24px; }
.brand { color: var(--teal-dark); font-size: 18px; font-weight: 800; text-decoration: none; }
.account-area { display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-width: 0; }
.session-name { max-width: 270px; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.page-shell { max-width: 1040px; margin: 0 auto; padding: 0 24px 70px; }
.hero { padding: 68px 0 42px; }
.eyebrow { margin: 0 0 8px; color: var(--teal); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { max-width: 720px; margin-bottom: 16px; font-size: clamp(34px, 6vw, 58px); line-height: 1.14; letter-spacing: 0; }
h2 { margin-bottom: 8px; font-size: clamp(23px, 3vw, 31px); line-height: 1.25; }
h3 { margin-bottom: 7px; font-size: 20px; line-height: 1.35; }
h4 { margin-bottom: 9px; font-size: 16px; }
.hero-copy { max-width: 720px; margin-bottom: 22px; color: var(--muted); font-size: 17px; }
.hero-links, .form-actions, .notice-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.text-link { color: var(--blue); font-size: 13px; font-weight: 700; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 14px; border: 1px solid transparent; border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 800; text-decoration: none; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button-primary { background: var(--teal); color: #fff; }
.button-primary:hover:not(:disabled) { background: var(--teal-dark); }
.button-secondary { border-color: #b8d1dc; background: var(--white); color: var(--blue); }
.button-secondary:hover:not(:disabled) { border-color: var(--blue); background: var(--blue-soft); }
.button-quiet { border-color: var(--line); background: var(--white); color: var(--muted); }
.button-quiet:hover:not(:disabled) { border-color: var(--teal); color: var(--teal-dark); }
.button-danger { border-color: #efb5af; background: var(--red); color: #fff; }
.button-danger:hover:not(:disabled) { background: #8f1d15; }
.notice-card, .card { border: 1px solid var(--line); border-radius: 10px; background: var(--white); box-shadow: var(--shadow); }
.notice-card { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 22px 24px; border-color: #d8e8ed; background: #f7fbfc; }
.notice-card h2 { font-size: 20px; }
.notice-card p:not(.notice-label) { max-width: 660px; margin-bottom: 0; color: var(--muted); font-size: 13px; }
.notice-label { margin-bottom: 3px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.notice-actions { flex: 0 0 205px; align-items: flex-start; flex-direction: column; color: var(--muted); font-size: 12px; }
.status { min-height: 25px; margin: 18px 0; padding: 8px 12px; border-radius: 6px; color: var(--muted); font-size: 13px; }
.status.is-error { background: var(--red-soft); color: var(--red); }
.status.is-success { background: var(--teal-soft); color: var(--teal-dark); }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, .75fr); gap: 22px; margin-top: 24px; }
.card { padding: 25px; }
.write-card { min-width: 0; }
.support-card { align-self: start; background: #fffaf0; border-color: #f0d59a; }
.support-card h2 { font-size: 22px; }
.support-card > p { color: #6d5a35; font-size: 13px; }
.support-contacts { display: grid; gap: 8px; margin: 17px 0; }
.support-contacts a { display: flex; justify-content: space-between; gap: 10px; padding: 9px 11px; border: 1px solid #e5c77e; border-radius: 6px; background: #fff; color: #79520a; font-size: 12px; text-decoration: none; }
.support-contacts a span:last-child { color: var(--red); font-weight: 800; }
.support-note { margin-bottom: 0; color: #7c4a03 !important; font-size: 12px !important; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-heading.compact { align-items: center; margin-bottom: 14px; }
.section-heading h2 { margin-bottom: 0; }
.privacy-chip, .status-chip { display: inline-flex; align-items: center; min-height: 26px; padding: 0 9px; border-radius: 999px; background: var(--teal-soft); color: var(--teal-dark); font-size: 11px; font-weight: 800; white-space: nowrap; }
.field { display: grid; gap: 7px; }
.field > label, .teacher-form label { color: var(--muted); font-size: 13px; font-weight: 800; }
textarea, input, select { width: 100%; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); }
textarea { min-height: 190px; padding: 12px; resize: vertical; }
input, select { min-height: 40px; padding: 0 10px; }
textarea::placeholder, input::placeholder { color: #8b9bac; }
textarea:focus, input:focus, select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15,118,110,.11); outline: none; }
.field-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
#emotionContentCount { white-space: nowrap; }
.safety-fieldset { margin: 22px 0 15px; padding: 15px; border: 1px solid var(--line); border-radius: 7px; }
.safety-fieldset legend { padding: 0 5px; color: var(--blue); font-size: 12px; font-weight: 800; }
.choice-group, .check-grid { display: grid; gap: 9px; }
.check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 12px; }
.choice { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 13px; }
.choice input { width: 17px; height: 17px; min-height: auto; margin-top: 3px; accent-color: var(--teal); }
.contact-choice { margin: 0 0 18px; }
.form-footnote, .muted { color: var(--muted); font-size: 12px; }
.form-footnote { margin: 13px 0 0; }
.result-card, .entries-card, .detail-card, .teacher-card { margin-top: 22px; }
.result-card { border-color: #cfe5e2; background: #f7fcfb; }
.result-card > p { color: var(--muted); font-size: 13px; }
.emergency-box { margin: 16px 0; padding: 16px; border-left: 4px solid var(--red); background: var(--red-soft); color: #7c3029; }
.emergency-box h3 { color: var(--red); font-size: 17px; }
.emergency-box p { margin-bottom: 0; font-size: 13px; }
.entry-list, .alert-list { display: grid; gap: 9px; margin: 15px 0 0; padding: 0; list-style: none; }
.reply-list { display: grid; gap: 10px; margin: 15px 0 0; padding: 0; list-style: none; }
.reply-card { padding: 14px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.reply-card time { color: var(--muted); font-size: 11px; }
.reply-card p { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.entry-card, .alert-row { width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 7px; background: #fff; text-align: left; }
.entry-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.entry-card:hover, .entry-card:focus-visible, .alert-row:hover { border-color: var(--teal); background: #f7fcfb; }
.entry-card strong, .alert-row strong { display: block; color: var(--ink); font-size: 13px; }
.entry-card span, .alert-row span { display: block; color: var(--muted); font-size: 11px; }
.entry-content { min-height: 100px; padding: 16px; border: 1px solid var(--line); border-radius: 7px; background: #fbfdfe; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-heading { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.teacher-card { background: #f9fbfd; }
.alert-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.alert-row .button { flex: 0 0 auto; }
.teacher-detail { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.safety-state { color: var(--amber); font-size: 13px; font-weight: 800; }
.teacher-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin-top: 18px; }
.teacher-form { display: grid; align-content: start; gap: 7px; padding: 15px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.teacher-form h4 { margin-bottom: 2px; }
.teacher-form textarea { min-height: 90px; }
.teacher-form .button { margin-top: 5px; }
.site-footer { padding: 22px 24px 40px; border-top: 1px solid var(--line); background: #fff; color: var(--muted); text-align: center; font-size: 12px; }
[hidden] { display: none !important; }
@media (max-width: 820px) {
  .notice-card, .content-grid { grid-template-columns: 1fr; }
  .notice-card { display: grid; }
  .notice-actions { flex-basis: auto; }
  .content-grid { display: grid; }
  .teacher-actions { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .header-inner { align-items: flex-start; flex-direction: column; gap: 8px; padding: 13px 16px; }
  .account-area { width: 100%; justify-content: space-between; }
  .session-name { max-width: 190px; }
  .page-shell { padding: 0 16px 50px; }
  .hero { padding: 42px 0 28px; }
  h1 { font-size: 37px; }
  .hero-copy { font-size: 15px; }
  .card, .notice-card { padding: 19px; }
  .section-heading { display: block; }
  .privacy-chip, .status-chip { margin-top: 12px; }
  .check-grid { grid-template-columns: 1fr; }
  .field-meta { align-items: flex-start; flex-direction: column; gap: 3px; }
  .form-actions .button { width: 100%; }
  .entry-card, .alert-row { align-items: flex-start; flex-direction: column; }
  .entry-card .button, .alert-row .button { width: 100%; }
  .support-contacts a { min-height: 42px; align-items: center; }
}

/* Warm-campus visual system. */
:root {
  --ui-ink: #39342f;
  --ui-muted: #70665d;
  --ui-paper: #fbf8f3;
  --ui-surface: #fffdf9;
  --ui-line: #e7ddd0;
  --ui-green: #267568;
  --ui-green-dark: #185c53;
  --ui-green-soft: #e7f2ee;
  --ui-orange: #c67836;
  --ui-orange-soft: #fff1df;
  --ui-blue: #58799a;
  --ui-blue-soft: #eaf0f6;
  --ui-danger: #a63832;
  --ui-danger-soft: #fff0ee;
  --ui-focus: #b96f26;
  --ui-shadow: 0 12px 28px rgba(70, 57, 45, .10);
  --ink: var(--ui-ink);
  --muted: var(--ui-muted);
  --line: var(--ui-line);
  --paper: var(--ui-paper);
  --white: var(--ui-surface);
  --teal: var(--ui-green);
  --teal-dark: var(--ui-green-dark);
  --teal-soft: var(--ui-green-soft);
  --blue: var(--ui-blue);
  --blue-soft: var(--ui-blue-soft);
  --red: var(--ui-danger);
  --red-soft: var(--ui-danger-soft);
  --shadow: var(--ui-shadow);
}
.ui-icon { width: 1.1em; height: 1.1em; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
body { color: var(--ui-ink); background: var(--ui-paper); font-size: 15px; line-height: 1.7; }
.site-header { border-bottom-color: var(--ui-line); background: rgba(255,253,249,.97); }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ui-green-dark); }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 8px; background: var(--ui-green-soft); }
.page-shell { max-width: 1120px; }
.hero { padding-top: 62px; padding-bottom: 34px; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; color: #93591f; letter-spacing: 0; }
h1 { font-size: clamp(38px, 5vw, 52px); }
.hero-copy { max-width: 760px; }
.button { min-height: 44px; border-radius: 7px; gap: 6px; }
.button-primary { background: var(--ui-green); }
.button-primary:hover:not(:disabled) { background: var(--ui-green-dark); }
.button-secondary { border-color: #d8c7b5; color: #70543c; }
.button-secondary:hover:not(:disabled) { border-color: var(--ui-orange); background: var(--ui-orange-soft); }
.notice-card, .card { border-color: var(--ui-line); border-radius: 8px; box-shadow: none; }
.notice-card { border-left: 4px solid var(--ui-blue); background: #f7fafc; }
#privacyNote { border-left-color: var(--ui-green); background: #f2f7f4; }
.content-grid { grid-template-columns: minmax(0, 1.55fr) minmax(280px, .65fr); gap: 18px; }
.write-card { box-shadow: var(--ui-shadow); }
.support-card { border-color: #ead4b5; background: #fffaf0; }
.support-contacts a { min-height: 44px; border-color: #ead4b5; color: #76512b; }
.section-heading { margin-bottom: 18px; }
.section-heading h2 { font-size: clamp(24px, 3vw, 30px); }
.privacy-chip, .status-chip { background: var(--ui-green-soft); color: var(--ui-green-dark); }
textarea, input, select { min-height: 44px; border-color: #d9cdbf; border-radius: 7px; }
textarea { min-height: 220px; padding: 14px; }
textarea:focus, input:focus, select:focus { border-color: var(--ui-green); box-shadow: 0 0 0 3px rgba(38,117,104,.16); }
.safety-fieldset { border-color: var(--ui-line); border-radius: 8px; background: #fbf8f3; }
.choice { color: #625a53; font-size: 14px; }
.choice input { width: 18px; height: 18px; accent-color: var(--ui-green); }
.status { border-radius: 7px; }
.result-card { border-left: 4px solid var(--ui-green); background: #f2f7f4; }
.emergency-box { border-left-color: var(--ui-danger); background: var(--ui-danger-soft); }
.reply-card, .entry-card, .alert-row, .entry-content, .teacher-form { border-color: var(--ui-line); border-radius: 7px; }
.entry-card, .alert-row { min-height: 58px; }
.entry-card:hover, .entry-card:focus-visible, .alert-row:hover { border-color: #9dc8be; background: #f2f7f4; }
.teacher-card { border-top: 4px solid var(--ui-green); background: #f8faf8; }
.teacher-actions { gap: 12px; }
.teacher-form { background: var(--ui-surface); }
.site-footer { border-top-color: var(--ui-line); background: var(--ui-surface); }
:focus-visible { outline: 3px solid var(--ui-focus); outline-offset: 3px; }
@media (max-width: 820px) {
  .content-grid { grid-template-columns: 1fr; }
  .support-card { order: 2; }
}
@media (max-width: 600px) {
  .header-inner { align-items: center; flex-direction: row; min-height: 64px; }
  .account-area { width: auto; }
  .session-name { display: none; }
  .hero { padding-top: 38px; }
  h1 { font-size: 32px; overflow-wrap: anywhere; }
  .card, .notice-card { padding: 17px; }
  .support-contacts a { min-height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (forced-colors: active) {
  .card, .notice-card, .entry-card, .alert-row, .teacher-form, textarea, input, select { border: 1px solid ButtonText; }
  .brand-mark, .privacy-chip, .status-chip { forced-color-adjust: none; }
}

