:root {
  color: #1c2027;
  background: #e7eaee;
  font-family: "SF Pro Text", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
  background: #e7eaee;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
}

.note-page {
  display: flex;
  width: min(100%, 920px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 24px max(22px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) max(22px, env(safe-area-inset-left, 0px));
  flex-direction: column;
}

.note-header {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.note-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 8px;
  background: #f2c94c;
  color: #252218;
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.note-brand h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 730;
  letter-spacing: 0;
}

.note-brand p {
  margin: 3px 0 0;
  color: #6b7380;
  font-size: 12px;
}

.note-brand p.is-saving {
  color: #a56d00;
}

.note-brand p.is-error {
  color: #b42318;
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border: 1px solid #cfd4db;
  border-radius: 6px;
  background: #f8f9fa;
  color: #5f6874;
  cursor: pointer;
}

.icon-button:hover {
  border-color: #e09a9a;
  background: #fff4f3;
  color: #b42318;
}

.icon-button:focus-visible,
.note-title:focus-visible,
.note-content:focus-visible {
  outline: 3px solid rgba(38, 111, 181, 0.2);
  outline-offset: 2px;
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.note-sheet {
  display: flex;
  min-height: 560px;
  flex: 1;
  overflow: hidden;
  border: 1px solid #d4d9df;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(30, 39, 52, 0.08);
  flex-direction: column;
}

.note-title {
  width: 100%;
  height: 74px;
  padding: 0 26px;
  border: 0;
  border-bottom: 1px solid #e6e9ed;
  background: #fff;
  color: #1b1f26;
  font-size: 28px;
  font-weight: 680;
  letter-spacing: 0;
}

.note-title::placeholder,
.note-content::placeholder {
  color: #adb3bc;
}

.note-content {
  width: 100%;
  min-height: 430px;
  flex: 1;
  padding: 22px 26px;
  resize: none;
  border: 0;
  outline: 0;
  background: #fff;
  color: #2c323b;
  font-size: 17px;
  line-height: 1.75;
}

.note-footer {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  border-top: 1px solid #eceef1;
  background: #fafbfc;
  color: #7a828e;
  font-size: 11px;
}

@media (max-width: 600px) {
  body {
    background: #fff;
  }

  .note-page {
    min-height: 100dvh;
    padding: 12px 0 max(0px, env(safe-area-inset-bottom, 0px));
  }

  .note-header {
    min-height: 58px;
    margin: 0;
    padding: 0 15px 12px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .note-brand h1 {
    font-size: 22px;
  }

  .note-sheet {
    min-height: calc(100dvh - 70px);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .note-title {
    height: 64px;
    padding: 0 18px;
    font-size: 24px;
  }

  .note-content {
    min-height: 360px;
    padding: 18px;
    font-size: 16px;
  }

  .note-footer {
    padding-right: 16px;
    padding-left: 16px;
  }
}
