html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

body {
  font-family: Arial, sans-serif;
  background: linear-gradient(180deg, #f7f3ee 0%, #eee7dd 100%);
  overflow: hidden;
}

#toolbar {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 18px;
  padding: 10px 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

#fontSelect,
#drawToggle,
#eraseDrawing {
  border: none;
  outline: none;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}

#fontSelect {
  padding: 10px 14px;
  font-size: 15px;
  cursor: pointer;
}

#drawToggle,
#eraseDrawing {
  width: 42px;
  height: 42px;
  font-size: 18px;
  cursor: pointer;
}

#drawToggle.active {
  background: #1f1f1f;
  color: white;
}

#pageWrapper {
  width: 100vw;
  height: 100vh;
  padding-top: 90px;
  box-sizing: border-box;
}

#page {
  position: relative;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.55), transparent 35%),
    radial-gradient(circle at bottom right, rgba(255,255,255,0.35), transparent 30%),
    linear-gradient(180deg, #f9f6f1 0%, #f3ede4 100%);
  overflow: hidden;
}

#drawCanvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

#placeholder {
  position: absolute;
  top: 34px;
  left: 50%;
  transform: translateX(-50%);
  color: #8d867f;
  font-size: 20px;
  font-style: italic;
  pointer-events: none;
  z-index: 3;
  letter-spacing: 0.2px;
}

.note {
  position: absolute;
  width: 240px;
  min-height: 42px;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  font-size: 24px;
  line-height: 1.5;
  color: #1f1f1f;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: break-word;
  z-index: 4;
  padding: 0;
}

.note::selection {
  background: rgba(0, 0, 0, 0.12);
}