:root {
  --berry: #9d3c65;
  --ink: #49323d;
  --muted: #765d68;
  --app: #f7f0f3;
  --pink: #eed0dd;
  --paper: #fffdf8;
  --line: #e4d9df;
  --surface: #fcf9fb;
  --selected: #eedce5;
  --berry-hover: #873353;
  --ease: cubic-bezier(.2, .75, .25, 1);
  --ui: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  --hand: "Kaiti SC", "STKaiti", "KaiTi", serif;
  --number: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background: #eae3e7;
  color: var(--ink);
  font-family: var(--ui);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  line-break: strict;
}

button,
input,
textarea {
  font: inherit;
  caret-color: var(--berry);
  accent-color: var(--berry);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  cursor: pointer;
  color: inherit;
  background: none;
  transition: background-color 180ms, transform 180ms var(--ease), box-shadow 180ms;
}

button:active:not(:disabled) {
  transform: scale(.96);
}

button:disabled {
  cursor: default;
  opacity: .35;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--berry);
  outline-offset: 4px;
}

button:hover:not(:disabled) {
  color: var(--berry);
}

button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

svg {
  flex-shrink: 0;
}

::selection {
  background: var(--pink);
}

[x-cloak] {
  display: none !important;
}

.icon-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.app {
  width: 390px;
  max-width: 100%;
  height: 844px;
  max-height: 100dvh;
  background: var(--app);
  position: relative;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  overflow: hidden;
  box-shadow: 0 20px 50px #49323d18;
}

.screen {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.app-header {
  height: 79px;
  flex-shrink: 0;
  padding: 24px 23px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  padding: 0;
  text-decoration: none;
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--berry);
  font-family: var(--hand);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 1px;
}

.brand-mark {
  width: 30px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-7deg);
}

.brand-mark svg {
  height: 28px;
  width: 28px;
  fill: var(--pink);
  stroke: var(--berry);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-actions {
  display: flex;
  gap: 7px;
  align-items: center;
}

.icon-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.icon-button:hover:not(:disabled) {
  background: var(--selected);
}

.undo-button svg {
  width: 20px;
  height: 20px;
}

.save-button {
  height: 44px;
  width: 92px;
  flex-shrink: 0;
  padding: 0 13px;
  border-radius: 7px;
  background: var(--berry);
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
  justify-content: center;
}

.save-button:hover:not(:disabled) {
  background: var(--berry-hover);
  color: var(--paper);
}

.save-button.is-saved {
  background: var(--selected);
  color: var(--berry);
}

.save-button svg {
  width: 16px;
  height: 16px;
}

.app-header h1 {
  font-size: 23px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -.5px;
}

.journal-scroll,
.drawer-scroll,
.month-scroll {
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
}

.journal-scroll::-webkit-scrollbar,
.drawer-scroll::-webkit-scrollbar,
.month-scroll::-webkit-scrollbar {
  display: none;
}

.journal-scroll {
  padding: 0 20px 10px;
}

.date-heading {
  display: flex;
  align-items: center;
  height: 93px;
  padding: 0 4px 12px;
  gap: 14px;
}

.date-number {
  font-family: var(--number);
  font-size: 67px;
  line-height: 1;
  letter-spacing: -4px;
  font-style: italic;
  color: var(--ink);
  margin-left: -3px;
  margin-right: 3px;
}

.date-info p {
  font-size: 14px;
  font-weight: 600;
  margin: 5px 0 7px;
}

.date-info span {
  font-size: 13px;
  color: var(--muted);
}

.weather {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  min-width: 54px;
  min-height: 54px;
  font-size: 12px;
  color: var(--muted);
}

.weather svg {
  width: 23px;
  height: 23px;
  stroke-width: 1.4;
}

.paper {
  position: relative;
  height: 510px;
  width: 100%;
  background-color: var(--paper);
  background-image: radial-gradient(#cfc4b8 0.65px, transparent .65px);
  background-size: 15px 15px;
  background-position: 8px 9px;
  border-radius: 3px 3px 9px 3px;
  box-shadow: 0 2px 3px #69465b10, 0 9px 24px #69465b12;
  overflow: visible;
}

.paper:after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("assets/paper-grain.svg");
  opacity: .18;
  pointer-events: none;
  mix-blend-mode: multiply;
  border-radius: inherit;
  z-index: 8;
}

.paper-punches {
  position: absolute;
  left: -4px;
  top: 41px;
  display: flex;
  flex-direction: column;
  gap: 170px;
}

.paper-punches i {
  width: 9px;
  height: 11px;
  border-radius: 50%;
  background: var(--app);
  box-shadow: inset -2px 0 2px #68445b19;
}

.handwriting {
  font-family: var(--hand);
  font-weight: 500;
}

.paper-title {
  position: absolute;
  left: 25px;
  top: 21px;
  font-size: 25px;
  letter-spacing: 0;
  line-height: 1.3;
  max-width: 290px;
  z-index: 2;
}

.polaroid {
  position: absolute;
  padding: 8px 8px 5px;
  background: #fffefb;
  box-shadow: 0 1px 3px #624a4030, 2px 5px 8px #624a4017;
  touch-action: none;
  cursor: grab;
  text-align: center;
  color: inherit;
}

.polaroid:active {
  cursor: grabbing;
}

.polaroid img {
  display: block;
  width: 100%;
  object-fit: cover;
  pointer-events: none;
}

.polaroid.photo-selected {
  outline: 1.5px dashed var(--berry);
  outline-offset: 4px;
}

.polaroid.photo-selected:before {
  content: "";
  position: absolute;
  inset: -7px;
  background:
    radial-gradient(circle at 3px 3px, var(--berry) 2px, transparent 3px),
    radial-gradient(circle at calc(100% - 3px) calc(100% - 3px), var(--berry) 2px, transparent 3px);
  pointer-events: none;
}

.cafe-photo {
  left: 25px;
  top: 81px;
  width: 219px;
  transform: rotate(-6deg);
  z-index: 2;
}

.cafe-photo img {
  height: 226px;
  object-position: 50% 65%;
}

.photo-caption {
  font-size: 14px;
  display: block;
  line-height: 27px;
  text-align: center;
  color: #725845;
  white-space: nowrap;
}

.photo-tape {
  position: absolute;
  z-index: 3;
  display: block;
  width: 87px;
  height: 28px;
  left: 59px;
  top: -10px;
  opacity: .74;
  clip-path: polygon(3% 0, 99% 4%, 96% 100%, 0 92%);
  box-shadow: 0 1px 2px #6b404422;
}

.tape-rose {
  background: repeating-linear-gradient(90deg, #c7859e 0 4px, #e9b0c2 4px 8px);
  transform: rotate(3deg);
}

.little-ticket {
  position: absolute;
  top: 84px;
  right: 15px;
  width: 81px;
  height: 159px;
  border: 1px solid #bc87687a;
  padding: 12px 5px;
  text-align: center;
  color: #9c674b;
  background: #f7e7cf;
  transform: rotate(6deg);
  z-index: 1;
  clip-path: polygon(0 3%, 6% 0, 12% 3%, 18% 0, 24% 3%, 30% 0, 36% 3%, 42% 0, 48% 3%, 54% 0, 60% 3%, 66% 0, 72% 3%, 78% 0, 84% 3%, 90% 0, 96% 3%, 100% 0, 100% 97%, 94% 100%, 88% 97%, 82% 100%, 76% 97%, 70% 100%, 64% 97%, 58% 100%, 52% 97%, 46% 100%, 40% 97%, 34% 100%, 28% 97%, 22% 100%, 16% 97%, 10% 100%, 4% 97%, 0 100%);
}

.little-ticket span {
  font-size: 11px;
  letter-spacing: 2px;
}

.little-ticket svg {
  display: block;
  margin: 10px auto 4px;
  width: 25px;
  height: 25px;
  stroke: currentColor;
  stroke-width: 1.3;
  fill: none;
  stroke-linecap: round;
}

.little-ticket b {
  font-family: var(--number);
  font-size: 24px;
  font-weight: 400;
}

.ticket-line {
  border-bottom: 1px dashed #b89271;
  margin: 8px 9px;
}

.little-ticket small {
  font-family: var(--hand);
  font-size: 14px;
  line-height: 1.5;
}

.dog-photo {
  width: 139px;
  right: 13px;
  top: 277px;
  transform: rotate(7deg);
  z-index: 4;
  padding: 6px 6px 3px;
}

.dog-photo img {
  height: 138px;
  object-position: 50% 53%;
}

.dog-photo .photo-caption {
  font-size: 12px;
  line-height: 25px;
}

.tape-check {
  width: 60px;
  height: 22px;
  left: 41px;
  background:
    repeating-linear-gradient(0deg, transparent 0 5px, #9babc059 5px 10px),
    repeating-linear-gradient(90deg, #d9e0e1 0 5px, #b6c3cf 5px 10px);
  transform: rotate(-5deg);
}

.paper-note {
  position: absolute;
  left: 29px;
  top: 359px;
  margin: 0;
  white-space: pre-line;
  font-size: 18px;
  line-height: 1.65;
  color: #6c5147;
  width: 170px;
  z-index: 3;
}

.paper.long-note {
  height: 510px;
}

.paper.long-note .paper-note {
  top: 359px;
  width: 170px;
  max-height: 98px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #be91a6 transparent;
}

.paper.blank-page .paper-note {
  top: 102px;
  max-width: 280px;
  width: calc(100% - 58px);
}

.paper-label {
  position: absolute;
  left: 25px;
  right: 23px;
  bottom: 16px;
  height: 34px;
  display: flex;
  gap: 8px;
  align-items: center;
  padding-top: 7px;
  color: var(--muted);
  font-size: 12px;
  z-index: 2;
}

.paper-label.photo-help {
  color: var(--berry);
  font-size: 12px;
}

.paper-label button {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  margin-left: auto;
  color: var(--berry);
  font-size: 12px;
}

.paper-label.photo-help .label-date {
  display: none;
}

.label-date {
  margin-left: auto;
  font-family: var(--number);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .5px;
}

.placed-material {
  position: absolute;
  width: 83px;
  height: 83px;
  padding: 0;
  z-index: 6;
  touch-action: none;
  user-select: none;
  cursor: grab;
  filter: drop-shadow(1px 2px 1px #5e42371b);
}

.placed-material:active {
  cursor: grabbing;
}

.placed-material:hover {
  filter: drop-shadow(1px 3px 3px #5e423735);
}

.placed-material img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.placed-material.photo {
  width: 124px;
  height: 147px;
  background: #fff;
  padding: 5px;
  box-shadow: 0 2px 6px #0002;
}

.placed-material.photo img {
  object-fit: cover;
}

.placed-material.tape {
  width: 118px;
  height: 36px;
  left: unset;
  opacity: .85;
}

.placed-material.note {
  width: 108px;
  height: 90px;
}

.placing-hidden {
  visibility: hidden;
}

.editor-tools {
  margin: 13px 5px 0;
  height: 64px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: relative;
}

.editor-tools button {
  min-width: 44px;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
}

.editor-tools button svg {
  width: 23px;
  height: 23px;
  stroke-width: 1.5;
}

.editor-tools button:hover {
  background: var(--selected);
  border-radius: 8px;
}

.bottom-nav {
  flex-shrink: 0;
  height: 76px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 9px 30px 11px;
  background: var(--app);
  border-top: .5px solid var(--line);
}

.bottom-nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.bottom-nav button span {
  width: 49px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  transition: background 200ms;
}

.bottom-nav button svg {
  width: 23px;
  height: 23px;
  stroke-width: 1.5;
}

.bottom-nav button.active {
  color: var(--berry);
  font-weight: 600;
}

.bottom-nav button.active span {
  background: var(--selected);
}

/* 素材抽屉页 */
.drawer-scroll {
  padding: 10px 22px 14px;
  flex: 1;
}

.material-tabs {
  height: 45px;
  display: flex;
  padding: 4px;
  position: relative;
  border-radius: 10px;
  background: var(--surface);
  margin-bottom: 23px;
}

.material-tabs button {
  flex: 1;
  position: relative;
  z-index: 1;
  height: 37px;
  min-width: 44px;
  font-size: 14px;
  color: var(--muted);
}

.material-tabs button:before {
  content: "";
  position: absolute;
  inset: -4px 0;
}

.material-tabs button.active {
  color: var(--berry);
  font-weight: 600;
}

.tab-slider {
  position: absolute;
  left: 4px;
  top: 4px;
  width: calc((100% - 8px) / 4);
  height: 37px;
  display: block;
  background: var(--selected);
  border-radius: 7px;
  box-shadow: 0 1px 4px #66334a10;
  transition: transform 240ms var(--ease);
}

.collection-cover {
  height: 108px;
  position: relative;
  border-radius: 4px;
  background: #efdae4;
  overflow: hidden;
}

.collection-cover:after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('assets/paper-grain.svg');
  opacity: .16;
  pointer-events: none;
}

.collection-title {
  position: absolute;
  left: 19px;
  bottom: 23px;
  z-index: 3;
}

.collection-title span {
  font-family: var(--hand);
  font-size: 31px;
  letter-spacing: 0;
  font-weight: 600;
  color: #753553;
}

.cover-flower {
  position: absolute;
  width: 85px;
  height: 85px;
  left: 209px;
  top: 8px;
  transform: rotate(8deg);
  z-index: 2;
  filter: drop-shadow(1px 3px 0 #9d657b25);
}

.cover-coffee {
  position: absolute;
  width: 74px;
  height: 74px;
  right: 7px;
  bottom: 7px;
  transform: rotate(8deg);
  z-index: 3;
}

.cover-other {
  position: absolute;
  right: 20px;
  top: 14px;
  display: flex;
  gap: 0;
  align-items: center;
  transform: rotate(8deg);
}

.cover-other .material-tape {
  width: 150px;
  height: 32px;
}

.cover-other .material-note {
  width: 68px;
  height: 69px;
  font-size: 15px;
}

.cover-other img {
  width: 60px;
  height: 74px;
  object-fit: cover;
  border: 4px solid var(--paper);
  box-shadow: 0 2px 3px #4a35402b;
  transform: rotate(-8deg);
}

.cover-other img + img {
  transform: rotate(5deg);
  margin-left: -12px;
}

.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 25px 0 12px;
}

.section-label h2 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

.section-label span {
  color: var(--muted);
  font-size: 12px;
}

.material-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 12px;
  row-gap: 15px;
}

.material-tile {
  height: 135px;
  padding: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  border-radius: 8px;
}

.material-image {
  width: 100%;
  height: 106px;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--surface);
  position: relative;
  transition: background-color 180ms, border-color 180ms;
}

.material-image img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  filter: drop-shadow(0 2px 1px #7b484b12);
}

.material-name {
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

.selected .material-image {
  border: 1px solid var(--berry);
  background: var(--selected);
}

.selected .material-name {
  color: var(--berry);
  font-weight: 600;
}

.selection-check {
  position: absolute;
  right: 5px;
  top: 5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--berry);
  color: #fff;
  display: grid;
  place-items: center;
}

.selection-check svg {
  width: 13px;
  height: 13px;
  stroke-width: 2;
}

.selection-tray {
  flex-shrink: 0;
  height: 89px;
  margin: 0 22px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-top: .5px solid var(--line);
  padding: 13px 0 18px;
}

.selection-preview {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.selection-preview img {
  width: 45px;
  height: 45px;
  object-fit: contain;
}

.selection-preview .material-note {
  width: 42px;
  height: 42px;
  font-size: 10px;
  text-align: center;
  line-height: 1.3;
  padding: 3px;
}

.selection-summary {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.selection-summary strong {
  font-weight: 500;
  font-size: 14px;
}

.paste-button {
  display: flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  background: var(--berry);
  color: #fff;
  min-height: 44px;
  padding: 0 17px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}

.paste-button svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.7;
}

.paste-button:hover:not(:disabled) {
  background: var(--berry-hover);
  color: #fff;
}

.material-tape {
  display: block;
  width: 86px;
  height: 31px;
  background: #d98bac;
  clip-path: polygon(3% 0, 98% 4%, 96% 100%, 0 95%);
  transform: rotate(-9deg);
  opacity: .86;
}

.material-tape.rose {
  background: repeating-linear-gradient(90deg, #c989a4 0 5px, #ecb8ca 5px 10px);
}

.material-tape.check {
  background:
    repeating-linear-gradient(0deg, transparent 0 8px, #9aacc066 8px 16px),
    repeating-linear-gradient(90deg, #dce4e6 0 8px, #a7b9cd 8px 16px);
}

.material-tape.caramel {
  background: #dba86f;
}

.material-tape.flower-tape {
  background-color: #ebc3cd;
  background-image: radial-gradient(#b96583 2px, transparent 3px);
  background-size: 13px 13px;
}

.material-tape.dots {
  background: #dacb9f;
  background-image: radial-gradient(#997e55 1.4px, transparent 1.6px);
  background-size: 9px 9px;
}

.material-tape.plain {
  background: #b4bfb0;
}

.placed-material .material-tape {
  width: 100%;
  height: 100%;
}

.material-note {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 77px;
  height: 77px;
  background: #f3deb2;
  transform: rotate(-6deg);
  font-size: 17px;
  color: #825846;
  white-space: pre-line;
  text-align: center;
  line-height: 1.4;
  padding: 6px;
  box-shadow: 1px 2px 3px #674c3712;
}

.material-tile:nth-child(2n) .material-note {
  background: #ead2df;
}

.material-tile:nth-child(3n) .material-note {
  background: #dce2e8;
}

.placed-material .material-note {
  width: 100%;
  height: 100%;
  transform: none;
}

.material-grid.photo .material-image img {
  width: 78px;
  height: 91px;
  object-fit: cover;
  padding: 4px;
  background: var(--paper);
  transform: rotate(-5deg);
}

/* 翻翻手账月历页 */
.mini-brand {
  font-family: var(--hand);
  font-size: 17px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.month-scroll {
  padding: 0 22px 18px;
}

.month-heading {
  display: flex;
  gap: 17px;
  align-items: center;
  height: 98px;
}

.month-number {
  font-family: var(--number);
  font-size: 72px;
  font-style: italic;
  color: var(--ink);
  letter-spacing: -3px;
  margin-left: -3px;
  line-height: 1;
}

.month-heading p {
  color: var(--muted);
  font-size: 13px;
  margin: 4px 0 7px;
}

.month-heading h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.month-arrows {
  margin-left: auto;
  display: flex;
  gap: 1px;
  align-items: center;
}

.month-arrows .icon-button {
  width: 44px;
  min-width: 44px;
  height: 44px;
}

.month-arrows svg {
  width: 18px;
  height: 18px;
}

.reverse {
  transform: rotate(180deg);
}

.month-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0 20px;
  font-size: 13px;
  color: var(--muted);
}

.month-summary strong {
  color: var(--berry);
  font-weight: 500;
}

.month-summary span + span {
  font-size: 11px;
}

.calendar {
  background: var(--paper);
  border-radius: 5px;
  padding: 16px 10px 13px;
  box-shadow: 0 2px 5px #70445806, 0 6px 18px #70445806;
}

.weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  margin-bottom: 9px;
}

.weekdays span:nth-last-child(-n+2) {
  color: var(--muted);
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px 0;
}

.calendar-day {
  height: 59px;
  width: 100%;
  padding: 3px 1px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
  border-radius: 7px;
  isolation: isolate;
}

.calendar-day.blank {
  visibility: hidden;
}

.calendar-day:hover:not(:disabled) {
  background: #f5e7ee;
}

.day-number {
  font-size: 13px;
  font-family: var(--ui);
  line-height: 15px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.calendar-day.weekend .day-number {
  color: var(--muted);
}

.calendar-day.chosen {
  background: var(--selected);
  box-shadow: inset 0 0 0 1px #9d3c653d;
}

.calendar-day.chosen .day-number {
  color: var(--berry);
  font-weight: 700;
}

.mini-page {
  display: block;
  width: 28px;
  height: 31px;
  background: #fff7ec;
  box-shadow: 0 1px 2px #68453330;
  padding: 3px 3px 5px;
  position: relative;
  transform: rotate(-7deg);
}

.mini-page img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-page i {
  position: absolute;
  top: -2px;
  left: 7px;
  width: 15px;
  height: 5px;
  background: #dba3b5c9;
  transform: rotate(2deg);
}

.mini-page b {
  display: none;
  position: absolute;
  bottom: -1px;
  right: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d08daa;
  box-shadow: 0 0 0 2px #fffaf4;
}

.mini-page.dog {
  transform: rotate(8deg);
}

.mini-page.dog i {
  background: #aebecdde;
}

.mini-page.sticker {
  background: #f4e3cb;
  transform: rotate(5deg);
}

.mini-page.sticker img {
  object-fit: contain;
}

.mini-page.sticker b {
  width: 8px;
  height: 8px;
  background: #b5be8f;
}

.mini-page.note {
  background: #efd4e1;
  transform: rotate(-4deg);
  padding: 7px 2px 2px;
}

.mini-page .mini-note {
  display: flex;
  font-family: var(--hand);
  font-size: 7px;
  line-height: 1.25;
  justify-content: center;
  align-items: center;
  white-space: pre-line;
}

.mini-page.picnic {
  transform: rotate(4deg);
  background: #f2dfbb;
}

.mini-page.flowers {
  transform: rotate(-4deg);
}

.mini-page.note i {
  background: #b2c2d7;
}

.empty-dot {
  width: 3px;
  height: 3px;
  background: #d9cbd1;
  border-radius: 50%;
  position: absolute;
  bottom: 21px;
}

.selected-entry {
  margin-top: 22px;
}

.entry-date {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 13px;
}

.entry-date span:first-child {
  font-family: var(--number);
  font-size: 19px;
  letter-spacing: .5px;
  font-style: italic;
  color: var(--berry);
}

.entry-date span + span {
  font-size: 11px;
  color: var(--muted);
}

.entry-preview {
  display: flex;
  width: 100%;
  align-items: center;
  text-align: left;
  gap: 16px;
  padding: 0;
  min-height: 106px;
}

.entry-thumb {
  height: 100px;
  width: 78px;
  flex-shrink: 0;
  position: relative;
  transform: rotate(-4deg);
  background: #fffdfa;
  padding: 5px;
  box-shadow: 0 2px 4px #70445820;
}

.entry-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-tape {
  position: absolute;
  top: -5px;
  left: 19px;
  width: 35px;
  height: 12px;
  background: #c98ba780;
  transform: rotate(4deg);
}

.entry-preview-text {
  flex: 1;
  min-width: 0;
}

.entry-preview-text h3 {
  font-size: 16px;
  font-weight: 500;
  margin: 2px 0 7px;
  line-height: 1.4;
}

.entry-preview-text p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 10px;
}

.entry-preview-text span {
  font-size: 12px;
  color: var(--berry);
}

.entry-arrow {
  width: 18px;
  height: 18px;
  color: var(--berry);
}

.no-entry .entry-preview {
  padding: 10px 3px;
}

.hidden-input {
  display: none;
}

.toast {
  position: absolute;
  bottom: 177px;
  left: 50%;
  transform: translateX(-50%);
  background: #654456ef;
  color: #fff;
  font-size: 13px;
  padding: 11px 17px;
  border-radius: 9px;
  z-index: 30;
  white-space: nowrap;
  box-shadow: 0 4px 12px #4f2f4526;
  pointer-events: none;
}

.save-error {
  font-size: 13px;
  color: #873053;
  line-height: 1.5;
  margin: 0 23px 9px;
  flex-shrink: 0;
}

.edit-dialog {
  position: absolute;
  inset: auto 15px 110px;
  width: calc(100% - 30px);
  max-height: calc(100dvh - 50px);
  border: 0;
  padding: 22px;
  border-radius: 14px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 10px 50px #70445830;
}

.edit-dialog::backdrop {
  background: #43233470;
}

.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.dialog-heading h2 {
  font-size: 20px;
  margin: 0;
}

.dialog-heading .icon-button {
  margin-right: -10px;
}

.edit-dialog label {
  font-size: 13px;
  display: block;
  margin: 14px 0 8px;
  color: var(--muted);
}

.edit-dialog input,
.edit-dialog textarea {
  width: 100%;
  background: #fffdf9;
  border: 1px solid #ddc8d3;
  border-radius: 6px;
  padding: 11px 12px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  resize: none;
  accent-color: var(--berry);
}

.edit-dialog .paste-button {
  width: 100%;
  margin-top: 17px;
}

.flying-sticker {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  width: 83px;
  height: 83px;
  filter: drop-shadow(2px 5px 3px #49323d25);
}

.paper-enter {
  animation: paper-enter 420ms var(--ease) both;
}

@keyframes paper-enter {
  from {
    opacity: 0;
    transform: translateY(7px) rotate(.5deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(0);
  }
}

@media (max-width: 389px) {
  .journal-scroll {
    padding-inline: 16px;
  }
  .paper-title {
    font-size: 23px;
  }
  .cafe-photo {
    width: 62%;
    left: 6%;
  }
  .cafe-photo img {
    height: 234px;
  }
  .dog-photo {
    right: 4%;
    width: 39%;
  }
  .paper-note {
    font-size: 17px;
    width: 48%;
    left: 7%;
  }
  .little-ticket {
    right: 4%;
  }
  .date-info span {
    font-size: 11px;
  }
  .collection-cover {
    height: 177px;
  }
  .cover-flower {
    left: 45%;
    width: 115px;
  }
  .material-grid {
    gap: 14px 9px;
  }
  .material-tile {
    height: 131px;
  }
  .material-image {
    height: 103px;
  }
  .calendar-day {
    height: 66px;
  }
}

@media (max-height: 800px) {
  .app-header {
    height: 70px;
    padding-top: 17px;
  }
  .date-heading {
    height: 85px;
  }
  .paper {
    height: 510px;
  }
  .journal-scroll,
  .drawer-scroll,
  .month-scroll {
    padding-bottom: 18px;
  }
  .bottom-nav {
    height: 70px;
  }
  .selection-tray {
    height: 80px;
  }
  .editor-tools {
    margin-top: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .flying-sticker {
    display: none;
  }
  .placing-hidden {
    visibility: visible;
  }
}
