:root {
  --page-bg: #f7f1e7;
  --paper: #fff9ef;
  --paper-soft: #fbf4e8;
  --ink: #44382e;
  --muted: #81715e;
  --line: #d8c7ad;
  --point-brown: #8f7658;
  --point-green: #7e8b6b;
  --primary: var(--point-brown);
  --primary-strong: #6f5a42;
  --primary-soft: rgba(143, 118, 88, 0.12);
  --chip-text: var(--muted);
  --chip-bg: #fff9ef;
  --font-ui: "IBM Plex Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", sans-serif;
  --font-soft: "Gowun Dodum", "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --press-shadow: 0 2px 5px rgba(58, 48, 38, 0.05);
  color: var(--ink);
  background: var(--page-bg);
  font-family: var(--font-ui);
  line-height: 1.5;
}

:root[data-time-theme="early-morning"] {
  --time-accent: #a47a55;
}

:root[data-time-theme="morning"],
:root[data-time-theme="afternoon"] {
  --time-accent: var(--point-green);
}

:root[data-time-theme="evening"],
:root[data-time-theme="night"] {
  --time-accent: var(--point-brown);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page-bg);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(90deg, rgba(255, 249, 239, 0.22) 0 1px, transparent 1px 100%) 0 0 / 34px 34px,
    radial-gradient(circle at 1px 1px, rgba(58, 48, 38, 0.035) 1px, transparent 0) 0 0 / 18px 18px,
    var(--page-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button {
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--point-green);
  outline-offset: 3px;
}

.hidden {
  display: none !important;
}

.app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 16px 24px;
}

.app::before {
  content: "♡";
  position: absolute;
  top: 22px;
  right: 26px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(216, 199, 173, 0.9);
  border-radius: 9px;
  color: #b97a6a;
  background: rgba(255, 249, 239, 0.84);
  font-size: 15px;
  font-weight: 700;
  transform: rotate(8deg);
  pointer-events: none;
}

.app::after {
  content: "";
  position: absolute;
  top: 92px;
  right: 40px;
  width: 44px;
  height: 14px;
  border-top: 2px solid rgba(143, 118, 88, 0.32);
  border-radius: 50%;
  transform: rotate(-10deg);
  pointer-events: none;
}

.top {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand::after {
  content: "✦";
  position: absolute;
  left: 39px;
  top: -5px;
  color: #b97a4a;
  font-size: 13px;
  transform: rotate(12deg);
}

.brand-icon-preview,
.memo-mark {
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 4px 12px rgba(58, 48, 38, 0.06);
}

.brand-icon-preview {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 13px;
  object-fit: cover;
  padding: 0;
  border: 1px solid var(--line);
}

.memo-mark {
  min-width: 84px;
  min-height: 42px;
  padding: 9px 13px;
  border-radius: 10px;
  color: var(--point-brown);
  font-size: 15px;
  font-weight: 700;
}

.brand p,
.moods h2,
footer p {
  margin: 0;
}

.brand p {
  color: var(--muted);
  font-family: var(--font-soft);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.25;
}

.brand h1 {
  margin: 2px 0 0;
  color: var(--ink);
  font-family: var(--font-soft);
  font-size: 31px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
}

.date-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-self: flex-start;
  align-items: center;
}

.date {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: var(--paper);
  font-size: 13px;
  font-family: var(--font-soft);
  font-weight: 400;
  line-height: 1.25;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 17px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-soft);
}

.tabs button {
  position: relative;
  isolation: isolate;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  transition: transform 150ms ease, color 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.tabs button::after {
  content: "";
  position: absolute;
  right: 20%;
  bottom: 7px;
  left: 20%;
  z-index: -1;
  height: 6px;
  border-radius: 999px;
  background: rgba(126, 139, 107, 0.18);
  opacity: 0;
  transform: rotate(-1deg) scaleX(0.72);
  transform-origin: center;
  transition: opacity 160ms ease, transform 160ms ease;
}

.tabs button:active {
  transform: translateY(1px);
}

.tabs button.active {
  color: var(--ink);
  border-color: var(--line);
  background: var(--paper);
  box-shadow: 0 3px 9px rgba(58, 48, 38, 0.05);
}

.tabs button.active::after {
  opacity: 1;
  transform: rotate(-1deg) scaleX(1);
}

.tabs span {
  display: inline-grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  margin-left: 4px;
  border-radius: 8px;
  color: var(--paper);
  background: var(--point-green);
  font-size: 12px;
  font-weight: 600;
}

.tabs span:empty {
  display: none;
}

main {
  flex: 1;
}

.today-view,
.saved-view {
  display: grid;
  gap: 15px;
  padding-top: 15px;
}

.today-view.reveal-view,
.saved-view.reveal-view {
  animation: viewPaperIn 220ms ease both;
}

.moods {
  position: relative;
  isolation: isolate;
}

.moods::after {
  content: "";
  position: absolute;
  top: -10px;
  right: 2px;
  z-index: 0;
  width: 88px;
  height: 88px;
  background: url("data:image/svg+xml,%3Csvg width='96' height='96' viewBox='0 0 48 48' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%238F7658' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 40c9-4 15-13 18-27M18 31c5 1 9 3 12 7'/%3E%3Cpath fill='%23F8ECD7' d='M27 9c5 0 9 3 9 8-5 1-10-1-12-5 1-2 2-3 3-3z'/%3E%3Cpath fill='%23F8ECD7' d='M20 15c5-1 9 1 10 6-4 2-10 1-13-2 .5-2 1.5-3 3-4z'/%3E%3Cpath fill='%23F8ECD7' d='M16 23c4-1 8 1 9 5-4 2-8 1-11-2 .3-1.8.9-2.8 2-3z'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0.2;
  transform: rotate(-16deg);
  pointer-events: none;
}

.moods h2,
.mood-grid {
  position: relative;
  z-index: 1;
}

.moods h2 {
  color: var(--muted);
  font-family: var(--font-soft);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
}

.mood-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.mood-grid button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 50px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 3px 9px rgba(58, 48, 38, 0.04);
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.mood-grid button:hover {
  border-color: rgba(143, 118, 88, 0.66);
  background: #fffdf8;
  transform: translateY(-1px);
}

.mood-grid button:active {
  box-shadow: var(--press-shadow);
  transform: translateY(1px) rotate(-0.2deg);
}

.mood-grid button.button-press {
  animation: paperPress 190ms ease both;
}

.mood-grid button.selected {
  color: #2f3529;
  border-color: var(--mood-color, var(--point-green));
  background: var(--mood-soft, #eef1e6);
  box-shadow: inset 0 0 0 1px rgba(126, 139, 107, 0.12), 0 4px 10px rgba(58, 48, 38, 0.05);
}

.mood-grid button.selected::after {
  content: "";
  position: absolute;
  right: 11px;
  bottom: 9px;
  width: 23px;
  height: 8px;
  border-bottom: 1.5px solid color-mix(in srgb, var(--mood-color, var(--point-green)) 55%, #8f7658);
  border-radius: 50%;
  opacity: 0.62;
  transform: rotate(-7deg);
  pointer-events: none;
}

.mood-icon {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(216, 199, 173, 0.76);
  border-radius: 9px;
  color: var(--mood-color, var(--point-brown));
  background: #fffdf8;
  box-shadow: 0 2px 5px rgba(58, 48, 38, 0.04);
  line-height: 1;
  transform: rotate(-2deg);
}

.mood-doodle {
  display: block;
  width: 22px;
  height: 22px;
  color: inherit;
  overflow: visible;
}

.mood-doodle path,
.mood-doodle circle,
.mood-doodle rect {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mood-doodle .doodle-fill {
  fill: color-mix(in srgb, currentColor 13%, #fffdf8);
  stroke: currentColor;
}

.mood-grid button:nth-child(even) .mood-icon {
  transform: rotate(2deg);
}

.mood-grid button.selected .mood-icon {
  border-color: var(--mood-color, var(--point-green));
  background: #fffaf0;
}

.mood-grid strong {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  word-break: keep-all;
}

.empty-card,
.message-card,
.saved-card {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  box-shadow: 0 8px 18px rgba(58, 48, 38, 0.07);
}

.message-card.paper-enter,
.empty-card.paper-enter,
.situation-card.paper-enter {
  animation: paperSettle 260ms cubic-bezier(0.22, 0.78, 0.24, 1) both;
}

.actions.paper-enter {
  animation: viewPaperIn 220ms ease both;
}

.empty-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 11px;
  min-height: 220px;
  align-content: center;
  padding: 28px 22px;
  text-align: center;
}

.empty-card::before,
.message-card::before {
  box-shadow: none;
}

.intro-card::before {
  content: "⌁";
  position: absolute;
  left: 20px;
  top: 18px;
  color: rgba(143, 118, 88, 0.48);
  font-size: 22px;
  font-weight: 700;
  transform: rotate(-8deg);
}

.intro-card::after {
  content: "✎";
  position: absolute;
  right: 22px;
  bottom: 18px;
  color: rgba(126, 139, 107, 0.52);
  font-size: 18px;
  font-weight: 700;
  transform: rotate(7deg);
}

.intro-icon-wrap {
  position: relative;
}

.intro-icon-wrap::after {
  content: "";
  position: absolute;
  right: -8px;
  bottom: 5px;
  width: 20px;
  height: 9px;
  border-radius: 999px;
  background: rgba(143, 118, 88, 0.16);
  transform: rotate(-10deg);
}

.intro-icon-preview {
  position: relative;
  z-index: 1;
  display: block;
  width: 82px;
  height: 82px;
  border: 1px solid var(--line);
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 5px 14px rgba(58, 48, 38, 0.08);
}

.intro-card {
  min-height: 178px;
}

.empty-card h2 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
}

.empty-card p {
  max-width: 304px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
  word-break: keep-all;
}

.message-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  min-height: 390px;
  padding: 20px;
}

.message-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--time-accent, var(--point-brown));
}

.message-card::after {
  content: "”";
  position: absolute;
  right: 18px;
  bottom: 48px;
  color: rgba(143, 118, 88, 0.16);
  font-family: Georgia, serif;
  font-size: 76px;
  font-weight: 700;
  line-height: 0.75;
  pointer-events: none;
}

.message-card.is-kept::before {
  box-shadow: inset 0 -1px 0 rgba(255, 249, 239, 0.42);
}

.message-card.is-kept .message-top {
  padding-right: 58px;
}

.message-card.is-kept .message-top::after {
  content: "간직";
  position: absolute;
  top: 30px;
  right: 1px;
  display: inline-grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1.5px solid rgba(126, 139, 107, 0.68);
  border-radius: 999px;
  color: rgba(126, 139, 107, 0.9);
  font-family: var(--font-soft);
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  transform: rotate(8deg);
  opacity: 0.9;
  pointer-events: none;
}

.message-top,
.message-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.message-top::before {
  content: "";
  position: absolute;
  top: -15px;
  left: 50%;
  width: 58px;
  height: 16px;
  border: 1px solid rgba(216, 199, 173, 0.72);
  border-radius: 4px;
  background: rgba(248, 230, 192, 0.58);
  transform: translateX(-50%) rotate(-2deg);
}

.message-scene {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 246px;
  margin: 16px auto 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f2eadf;
  box-shadow: 0 4px 12px rgba(58, 48, 38, 0.05);
  overflow: hidden;
}

.time-scene-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: contrast(1.035) saturate(1.02);
  transform: translateZ(0);
}

.message-label,
.message-mood,
.message-bottom span,
.message-bottom strong {
  font-size: 12px;
  line-height: 1.35;
  font-weight: 600;
}

.message-label {
  color: var(--muted);
  font-family: var(--font-soft);
  font-weight: 400;
}

.message-mood {
  display: inline-flex;
  align-items: center;
  max-width: 64%;
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--paper-soft);
  white-space: nowrap;
}

.message-card p {
  position: relative;
  z-index: 1;
  margin: 20px 0 23px;
  color: var(--ink);
  font-family: var(--font-soft);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.72;
  letter-spacing: 0;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.message-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.message-bottom span {
  min-width: 0;
  justify-self: start;
  font-family: var(--font-soft);
  font-weight: 400;
}

.message-bottom strong {
  color: var(--ink);
  font-weight: 600;
  justify-self: end;
  white-space: nowrap;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.actions button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--paper);
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(58, 48, 38, 0.05);
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background 150ms ease;
}

.actions button:hover {
  transform: translateY(-1px);
}

.actions button:active {
  box-shadow: var(--press-shadow);
  transform: translateY(1px) rotate(-0.2deg);
}

.actions button.button-press {
  animation: paperPress 190ms ease both;
}

.actions button::before {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 249, 239, 0.2);
  font-size: 15px;
  line-height: 1;
}

#saveButton::before {
  content: "♡";
}

#saveButton.saved::before {
  content: "♥";
}

#shareButton::before {
  content: "↗";
  color: var(--point-brown);
  border: 1px solid rgba(216, 199, 173, 0.86);
  background: #fffdf8;
}

.actions button:first-child {
  color: #fffdf8;
  border-color: #786248;
  background: var(--point-brown);
}

.actions button.saved {
  color: var(--ink);
  border-color: var(--point-green);
  background: #eef1e6;
}

.actions button.saved.just-saved {
  animation: stampPop 420ms ease both;
}

.saved-head {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 15px 16px 15px 58px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  box-shadow: 0 6px 14px rgba(58, 48, 38, 0.055);
  overflow: hidden;
}

.saved-head::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 17px;
  width: 28px;
  height: 42px;
  border: 1px solid rgba(216, 199, 173, 0.94);
  border-radius: 8px 8px 12px 12px;
  background: #eef1e6;
  box-shadow: inset 0 -8px 0 rgba(126, 139, 107, 0.12);
  transform: rotate(-3deg);
}

.saved-head::after {
  content: "";
  position: absolute;
  right: 68px;
  top: 13px;
  width: 62px;
  height: 62px;
  background: url("data:image/svg+xml,%3Csvg width='96' height='96' viewBox='0 0 48 48' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%238F7658' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 40c9-4 15-13 18-27M18 31c5 1 9 3 12 7'/%3E%3Cpath fill='%23F8ECD7' d='M27 9c5 0 9 3 9 8-5 1-10-1-12-5 1-2 2-3 3-3z'/%3E%3Cpath fill='%23F8ECD7' d='M20 15c5-1 9 1 10 6-4 2-10 1-13-2 .5-2 1.5-3 3-4z'/%3E%3Cpath fill='%23F8ECD7' d='M16 23c4-1 8 1 9 5-4 2-8 1-11-2 .3-1.8.9-2.8 2-3z'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0.19;
  transform: rotate(-15deg);
  pointer-events: none;
}

.saved-head h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-soft);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.3;
}

.saved-head p {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid rgba(216, 199, 173, 0.86);
  border-radius: 9px;
  color: var(--muted);
  background: var(--paper-soft);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.saved-list {
  display: grid;
  gap: 14px;
}

.saved-card {
  position: relative;
  display: grid;
  gap: 13px;
  padding: 22px 48px 21px 18px;
  overflow: hidden;
  transform: rotate(var(--saved-tilt, 0deg));
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.saved-card:hover {
  border-color: rgba(143, 118, 88, 0.5);
  box-shadow: 0 10px 20px rgba(58, 48, 38, 0.075);
  transform: translateY(-1px) rotate(var(--saved-tilt, 0deg));
}

.saved-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 20px;
  width: 48px;
  height: 14px;
  border: 1px solid rgba(216, 199, 173, 0.72);
  border-radius: 4px;
  background: rgba(248, 230, 192, 0.52);
  transform: rotate(-2deg);
}

.saved-card::after {
  content: "”";
  position: absolute;
  right: 17px;
  bottom: 16px;
  color: rgba(143, 118, 88, 0.12);
  font-family: Georgia, serif;
  font-size: 54px;
  line-height: 0.75;
  pointer-events: none;
}

.saved-card-meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.saved-card-meta span,
.saved-card-meta strong {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 9px;
  border: 1px solid rgba(216, 199, 173, 0.86);
  border-radius: 8px;
  color: var(--muted);
  background: #fffdf8;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
}

.saved-card-meta strong {
  color: #3a3026;
  background: #eef1e6;
}

.saved-card-flower {
  position: absolute;
  top: 14px;
  right: 48px;
  z-index: 0;
  width: 54px;
  height: 54px;
  background: url("data:image/svg+xml,%3Csvg width='96' height='96' viewBox='0 0 48 48' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%238F7658' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 40c9-4 15-13 18-27M18 31c5 1 9 3 12 7'/%3E%3Cpath fill='%23F8ECD7' d='M27 9c5 0 9 3 9 8-5 1-10-1-12-5 1-2 2-3 3-3z'/%3E%3Cpath fill='%23F8ECD7' d='M20 15c5-1 9 1 10 6-4 2-10 1-13-2 .5-2 1.5-3 3-4z'/%3E%3Cpath fill='%23F8ECD7' d='M16 23c4-1 8 1 9 5-4 2-8 1-11-2 .3-1.8.9-2.8 2-3z'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0.22;
  transform: rotate(-13deg);
  pointer-events: none;
}

.saved-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-soft);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.72;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.saved-card button {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--paper-soft);
  font-size: 18px;
  line-height: 1;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.saved-card button span {
  display: block;
  transform: translateY(-1px);
}

.saved-card button:hover {
  border-color: rgba(143, 118, 88, 0.6);
  background: #fffdf8;
  transform: translateY(-1px);
}

.saved-card button:active {
  box-shadow: var(--press-shadow);
  transform: translateY(1px) rotate(-0.2deg);
}

.saved-card button.button-press {
  animation: paperPress 190ms ease both;
}

.saved-empty {
  min-height: 230px;
  border-style: dashed;
  background: var(--paper);
}

.saved-empty::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 20px;
  width: 44px;
  height: 44px;
  background: url("data:image/svg+xml,%3Csvg width='96' height='96' viewBox='0 0 48 48' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%238F7658' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 40c9-4 15-13 18-27M18 31c5 1 9 3 12 7'/%3E%3Cpath fill='%23F8ECD7' d='M27 9c5 0 9 3 9 8-5 1-10-1-12-5 1-2 2-3 3-3z'/%3E%3Cpath fill='%23F8ECD7' d='M20 15c5-1 9 1 10 6-4 2-10 1-13-2 .5-2 1.5-3 3-4z'/%3E%3Cpath fill='%23F8ECD7' d='M16 23c4-1 8 1 9 5-4 2-8 1-11-2 .3-1.8.9-2.8 2-3z'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0.22;
  transform: rotate(-8deg);
}

.saved-empty::after {
  content: "✎";
  position: absolute;
  right: 22px;
  bottom: 18px;
  color: rgba(126, 139, 107, 0.48);
  font-size: 18px;
  transform: rotate(7deg);
}

footer {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding-top: 20px;
}

footer p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
  word-break: keep-all;
}

.about-link {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--point-brown);
  background: var(--paper);
  font-size: 12px;
  font-weight: 600;
}

.about-sheet {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  align-items: end;
  padding: 18px;
  background: rgba(58, 48, 38, 0.28);
}

.about-panel {
  position: relative;
  width: min(100%, 430px);
  margin: 0 auto;
  padding: 24px 22px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 14px 32px rgba(58, 48, 38, 0.16);
}

.about-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--paper-soft);
  font-size: 20px;
  line-height: 1;
}

.about-kicker {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--point-green);
  background: #f1f3e8;
  font-size: 12px;
  font-weight: 600;
}

.about-panel h2 {
  max-width: calc(100% - 42px);
  margin: 14px 0 10px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.28;
}

.about-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.72;
  word-break: keep-all;
}

.about-panel p + p {
  margin-top: 10px;
}

.about-contact {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-soft);
}

.about-contact span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.about-contact a {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 20;
  width: min(430px, calc(100% - 36px));
  margin: 0 auto;
  padding: 13px 16px 12px;
  border: 1px solid #5f4d39;
  border-radius: 10px;
  color: #fffdf8;
  background: rgba(58, 48, 38, 0.94);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
}

@keyframes paperPress {
  0% {
    transform: translateY(0) rotate(0);
  }
  48% {
    transform: translateY(2px) rotate(-0.28deg);
  }
  100% {
    transform: translateY(0) rotate(0);
  }
}

@keyframes paperSettle {
  0% {
    opacity: 0;
    transform: translateY(9px) rotate(-0.35deg);
  }
  72% {
    opacity: 1;
    transform: translateY(-1px) rotate(0.12deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotate(0);
  }
}

@keyframes viewPaperIn {
  0% {
    opacity: 0;
    transform: translateY(7px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes stampPop {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(0.96) rotate(-0.4deg);
  }
  72% {
    transform: scale(1.045) rotate(0.4deg);
  }
  100% {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 390px) {
  .app {
    padding-right: 12px;
    padding-left: 12px;
  }

  .moods::after {
    right: -8px;
    width: 72px;
    height: 72px;
    opacity: 0.16;
  }

  .saved-head {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 15px 14px 15px 54px;
  }

  .saved-head::after {
    right: 18px;
    top: 15px;
    width: 48px;
    height: 48px;
    opacity: 0.14;
  }

  .saved-head p {
    width: fit-content;
  }

  .saved-card {
    padding: 21px 44px 20px 16px;
  }

  .saved-card-flower {
    right: 42px;
    width: 46px;
    height: 46px;
    opacity: 0.18;
  }

  .saved-card p {
    font-size: 16px;
    line-height: 1.68;
  }

  .message-card {
    padding: 18px;
  }

  .message-scene {
    max-height: 228px;
    border-radius: 11px;
  }

  .message-card p {
    font-size: 20px;
    line-height: 1.62;
  }
}
