* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: #f0f0f0; color: #222;
  font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
#app { display: flex; flex-direction: column; min-height: 100vh; }
#toolbar { display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  background: #fff; border-bottom: 1px solid #ddd; flex-wrap: wrap; }
#toolbar h1 { font-size: 15px; margin: 0 8px 0 0; font-weight: 600; }
#toolbar .spacer { flex: 1; }
button { font-size: 14px; padding: 8px 12px; border: 1px solid #bbb; background: #fafafa;
  border-radius: 8px; cursor: pointer; }
button.primary { background: #2d7ef7; color: #fff; border-color: #2d7ef7; }
.fmt { border-color: #bbb; }
.fmt.active { background: #2d7ef7; color: #fff; border-color: #2d7ef7; }
button:active { transform: translateY(1px); }
#note { font-size: 12px; color: #777; padding: 8px 12px; background: #fff; border-bottom: 1px solid #eee; line-height: 1.5; }
#sheetWrap { flex: 1; overflow: auto; padding: 12px; display: flex; justify-content: center; align-items: flex-start; }
#sheet { background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.15); touch-action: none; }

/* editor modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex;
  align-items: center; justify-content: center; z-index: 50; padding: 12px; }
.modal.hidden { display: none; }
.modal-box { background: #fff; border-radius: 14px; width: 100%; max-width: 440px;
  max-height: 94vh; overflow: auto; padding: 14px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.modal-head strong { font-size: 16px; }
#edCanvas { display: block; margin: 0 auto; background:
    repeating-conic-gradient(#f3f3f3 0% 25%, #fff 0% 50%) 0 0 / 24px 24px;
  border-radius: 10px; touch-action: none; max-width: 100%; }
.ed-controls { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.ed-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ed-row label { font-size: 13px; display: flex; align-items: center; gap: 8px; flex: 1; }
.ed-row input[type=range] { flex: 1; }
#edInfo { font-size: 12px; color: #666; line-height: 1.5; }
.hint { font-size: 12px; color: #999; margin-top: 8px; line-height: 1.5; }
