* {
  box-sizing: border-box;
}

:root {
  --ink: #1c2d42;
  --muted-ink: rgba(28, 45, 66, .68);
  --paper: #fffaf0;
  --paper-edge: #ead8b7;
  --line: rgba(88, 139, 185, .26);
  --margin-line: rgba(217, 86, 86, .36);
  --shadow: rgba(53, 35, 12, .24);
  --highlight-yellow: rgba(255, 231, 96, .58);
  --highlight-pink: rgba(255, 155, 183, .34);
  --highlight-green: rgba(176, 229, 160, .38);
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, .68), transparent 28%),
    radial-gradient(circle at 80% 85%, rgba(77, 50, 18, .16), transparent 30%),
    linear-gradient(135deg, #b99b72, #dcc29b 48%, #a77f51);
  font-family: "Comic Sans MS", "Bradley Hand", "Segoe Print", cursive;
}

.note-page {
  width: min(760px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 34px 18px;
  display: grid;
  place-items: center;
}

.paper-note {
  position: relative;
  width: min(620px, 100%);
  min-height: 720px;
  padding: 62px 46px 50px 70px;
  border: 1px solid var(--paper-edge);
  border-radius: 5px 18px 10px 14px;
  background:
    linear-gradient(90deg, transparent 0 43px, var(--margin-line) 44px 46px, transparent 47px),
    repeating-linear-gradient(0deg, transparent 0 34px, var(--line) 35px 36px),
    radial-gradient(circle at 18% 22%, rgba(118, 88, 40, .07), transparent 24%),
    radial-gradient(circle at 82% 76%, rgba(118, 88, 40, .08), transparent 28%),
    var(--paper);
  box-shadow: 0 24px 55px var(--shadow), 0 2px 0 rgba(255, 255, 255, .52) inset;
  transform: rotate(-1.25deg);
  isolation: isolate;
}

.paper-note::before,
.paper-note::after {
  content: "";
  position: absolute;
  z-index: -1;
  background: rgba(72, 45, 10, .14);
  filter: blur(10px);
}

.paper-note::before {
  inset: auto 22px -10px 34px;
  height: 32px;
  transform: rotate(1.7deg);
}

.paper-note::after {
  top: 24px;
  right: -8px;
  bottom: 22px;
  width: 26px;
  transform: rotate(1.5deg);
}

.tape {
  position: absolute;
  top: 18px;
  width: 110px;
  height: 34px;
  background: rgba(255, 247, 195, .72);
  border: 1px solid rgba(180, 153, 77, .22);
  box-shadow: 0 2px 8px rgba(80, 54, 10, .12);
}

.tape-left {
  left: 35px;
  transform: rotate(-8deg);
}

.tape-right {
  right: 38px;
  transform: rotate(7deg);
}

.editor-link {
  position: absolute;
  top: 56px;
  right: 34px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px 6px;
  border: 1px solid rgba(28, 45, 66, .2);
  border-radius: 999px 820px 940px 860px;
  color: rgba(28, 45, 66, .78);
  background: rgba(255, 231, 96, .28);
  box-shadow: 0 2px 0 rgba(83, 63, 4, .12);
  text-decoration: none;
  font-size: .98rem;
  line-height: 1;
  transform: rotate(2deg);
}

.editor-link:hover {
  color: var(--ink);
  background: rgba(255, 231, 96, .48);
  transform: rotate(-.8deg) translateY(-1px);
}

.editor-link:focus-visible {
  outline: 3px solid rgba(28, 45, 66, .22);
  outline-offset: 4px;
}

.note-header {
  margin-bottom: 24px;
}

.small-note {
  margin: 0 0 -4px;
  color: var(--muted-ink);
  font-size: 1.05rem;
  transform: rotate(-2deg);
}

h1 {
  margin: 0;
  padding-right: 120px;
  font-size: clamp(2.8rem, 8vw, 5rem);
  line-height: .95;
  letter-spacing: .02em;
  text-decoration: underline wavy rgba(28, 45, 66, .28);
  text-underline-offset: 8px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.note-form,
.status {
  display: none !important;
}

.note-list {
  list-style: none;
  display: grid;
  gap: 12px;
  margin: 20px 0 0;
  padding: 0;
}

.item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  min-height: 38px;
  padding: 2px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: clamp(1.55rem, 5vw, 2.18rem);
  line-height: 1.12;
}

.item:not(.done) {
  display: none !important;
}

.item:nth-child(2n) {
  transform: rotate(.35deg);
}

.item:nth-child(3n) {
  transform: rotate(-.45deg);
}

.item:nth-child(4n + 1) .name {
  background: linear-gradient(transparent 42%, var(--highlight-yellow) 42% 78%, transparent 78%);
}

.item:nth-child(4n + 2) .name {
  background: linear-gradient(transparent 45%, var(--highlight-pink) 45% 80%, transparent 80%);
}

.item:nth-child(5n) .name {
  background: linear-gradient(transparent 44%, var(--highlight-green) 44% 79%, transparent 79%);
}

.item input[type="checkbox"],
.delete {
  display: none !important;
}

.name {
  display: inline;
  width: fit-content;
  max-width: 100%;
  padding: 0 .16em;
  border-radius: 45% 22% 40% 18%;
  color: var(--ink);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.item.done .name {
  color: var(--ink);
  text-decoration: none;
}

.item.done .name::after {
  content: none;
}

.empty {
  margin: 30px 0 0;
  padding: 18px;
  color: var(--muted-ink);
  text-align: center;
  font-size: 1.45rem;
  transform: rotate(-1deg);
}

.view-hint {
  margin: 30px 0 0;
  color: rgba(28, 45, 66, .48);
  font-size: 1.03rem;
  transform: rotate(-1.3deg);
}

.paper-footer {
  position: absolute;
  right: 36px;
  bottom: 18px;
  display: flex;
  gap: 14px;
  color: rgba(28, 45, 66, .35);
  font-size: .9rem;
  transform: rotate(-2deg);
}

@media (max-width: 560px) {
  .note-page {
    padding: 18px 10px;
    align-items: start;
  }

  .paper-note {
    min-height: calc(100vh - 36px);
    padding: 58px 22px 46px 48px;
    transform: rotate(-.6deg);
  }

  .editor-link {
    top: 46px;
    right: 20px;
    padding: 7px 9px 6px;
  }

  .editor-text {
    display: none;
  }

  h1 {
    padding-right: 46px;
  }

  .paper-footer {
    display: none;
  }
}
