:root {
  color-scheme: light;
  font: 100%/1.55 "Noto Sans SC", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: #231e3c;
  background: #f5f5fa;
  --ink: #231e3c;
  --muted: #66617a;
  --accent: #5538c6;
  --line: #e3e0ee;
  --paper: #fff;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, select, textarea { font: inherit; }
button, select, input[type="checkbox"] { cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, .result:focus-visible {
  outline: 2px solid #7b62e8;
  outline-offset: 3px;
}

.topbar { background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar-inner, main { width: min(1120px, calc(100% - 72px)); margin-inline: auto; }
.topbar-inner { min-height: 69px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.wordmark { display: flex; gap: 10px; align-items: center; font-size: 1.02rem; font-weight: 750; }
.brand-icon {
  display: grid;
  width: 33px;
  height: 33px;
  place-items: center;
  border-radius: 9px;
  background: #ece7ff;
  color: #4f32ad;
  font: 700 1.13rem Georgia, serif;
}
.local-status { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .875rem; }
.local-status span { width: 7px; height: 7px; border-radius: 50%; background: #378369; }

main { padding-block: 32px 20px; }
.hero {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 218px;
  border-radius: 18px;
  padding: 33px 44px;
  background: radial-gradient(ellipse at 95% 3%, #6c53bd 0%, transparent 55%), linear-gradient(115deg, #20173f, #3e2b7f);
  color: white;
}
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 410px;
  height: 410px;
  right: -95px;
  top: -185px;
  border-radius: 50%;
  border: 1px solid #ffffff23;
  box-shadow: 0 0 0 36px #ffffff10, 0 0 0 73px #ffffff08;
}
h1 { margin: 0; font-size: clamp(1.8rem, 4.2vw, 3rem); line-height: 1.26; letter-spacing: -.04em; }
.hero-description { margin: 13px 0 0; color: #e1d7ff; }
.narrow-break { display: none; }
.document-art { width: 172px; height: 150px; flex: 0 0 auto; position: relative; margin-right: 30px; }
.paper { width: 110px; height: 131px; position: absolute; border-radius: 12px; }
.paper-back { right: 9px; top: 12px; transform: rotate(20deg); background: #baaaf848; border: 1px solid #dfd6ff72; }
.paper-front {
  right: 43px;
  top: 5px;
  transform: rotate(-10deg);
  padding: 14px 16px;
  background: linear-gradient(145deg, #fff, #ded3ff);
  box-shadow: 0 13px 20px #17093548;
}
.paper-front b { display: block; font: 700 1.8rem Georgia, serif; margin-bottom: 12px; color: #5438a4; }
.paper-front i { display: block; height: 4px; margin: 7px 0; border-radius: 5px; background: #b6a8e1; }
.paper-front i:nth-of-type(2) { width: 84%; background: #8e72e7; }
.paper-front i:last-child { width: 64%; }

.workspace, .change-panel { margin-top: 22px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); }
.workspace { overflow: hidden; box-shadow: 0 8px 25px #32205608; }
.toolbar, .actionbar, .panel-heading, .settings, .setting, .action-group, .change-heading {
  display: flex;
  align-items: center;
}
.toolbar, .actionbar, .panel-heading { justify-content: space-between; }
.toolbar { padding: 14px 22px; border-bottom: 1px solid var(--line); gap: 10px; }
.settings, .action-group { gap: 18px; flex-wrap: wrap; }
.setting { gap: 9px; }
.setting label, .spelling, .quiet, .primary, select { font-size: .875rem; font-weight: 650; }
select {
  appearance: none;
  color: var(--ink);
  padding: 7px 33px 7px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: linear-gradient(45deg, transparent 48%, #69617c 49% 65%, transparent 66%) right 15px center / 6px 6px no-repeat,
              linear-gradient(135deg, transparent 35%, #69617c 36% 51%, transparent 52%) right 10px center / 6px 6px no-repeat, #faf9fd;
}
.spelling { display: flex; align-items: center; gap: 6px; }
.spelling input { width: 15px; height: 15px; accent-color: var(--accent); margin: 0; }
.quiet { color: #5236ad; background: #f1edff; border: none; border-radius: 7px; padding: 6px 11px; white-space: nowrap; }
.quiet:hover:not(:disabled) { background: #e8e0ff; }
.quiet:disabled { background: #f2f1f6; color: #777284; }
.panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel { padding: 16px 22px 18px; min-width: 0; }
.output-panel { border-left: 1px solid var(--line); }
.panel-heading { margin-bottom: 11px; gap: 10px; }
h2, .panel-heading label { margin: 0; font-size: 1rem; font-weight: 750; }
textarea, .result {
  display: block;
  width: 100%;
  height: 205px;
  min-height: 205px;
  padding: 14px;
  background: #fcfbfe;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.65;
}
textarea { resize: vertical; }
textarea::placeholder, .result.empty { color: #6e6881; }
.result { overflow: auto; overflow-wrap: anywhere; white-space: pre-wrap; background: #faf8ff; }
.result mark { color: #332078; background: #e9ddff; border-radius: 3px; box-decoration-break: clone; }
.actionbar { min-height: 66px; border-top: 1px solid var(--line); padding: 12px 22px; gap: 12px; }
.count, #status { color: var(--muted); font-size: .875rem; }
.primary { color: white; background: var(--accent); border: 0; border-radius: 8px; padding: 10px 18px; }
.primary:hover:not(:disabled) { background: #472ba9; }
.primary:disabled { color: #655e77; background: #eae7f1; }
.change-panel { padding: 16px 22px; }
.change-heading { gap: 9px; }
.change-count { border-radius: 12px; padding: 1px 8px; color: #5236ad; background: #f1edff; font-size: .875rem; }
#change-message { margin: 6px 0 0; font-size: .875rem; color: var(--muted); }
#changes { list-style: none; padding: 0; margin: 10px 0 0; }
#changes li { padding: 9px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; font-size: .9375rem; }
#changes del { color: #7a3e51; }
#changes strong { color: #4d34a2; }
#changes .reason { display: inline-block; margin-left: .65em; color: var(--muted); }
footer { padding-top: 17px; color: var(--muted); font-size: .8125rem; }

@media (max-width: 760px) {
  .topbar-inner, main { width: calc(100% - 32px); }
  main { padding-top: 20px; }
  .hero { padding: 26px; min-height: 184px; }
  .document-art { transform: scale(.78); margin-right: 0; width: 130px; }
  .panels { grid-template-columns: 1fr; }
  .output-panel { border-left: 0; border-top: 1px solid var(--line); }
  .toolbar, .actionbar, .panel, .change-panel { padding-inline: 14px; }
  textarea, .result { height: 165px; min-height: 165px; }
}

@media (max-width: 480px) {
  .topbar-inner { min-height: 59px; }
  .hero { padding: 24px 18px; }
  .narrow-break { display: initial; }
  .document-art { display: none; }
  .settings, .action-group { gap: 8px; }
  .toolbar { align-items: flex-start; }
  .actionbar { align-items: flex-start; }
  .action-group { justify-content: flex-end; }
}
