:root {
  --milk: #fbfdf7;
  --mist: #eef5e6;
  --line: #dbe7cf;
  --ink: #2f4a3c;
  --soft: #6f8576;
  --leaf: #5f9a5c;
  --accent: #c4583f;
  --honey: #f4b942;
  --lift: 0 3px 0 rgba(47, 74, 60, .16), 0 8px 22px rgba(47, 74, 60, .14);
  --top: env(safe-area-inset-top, 0px);
  --bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html, body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: #a9d27e;
  color: var(--ink);
  font: 500 15px/1.35 Fredoka, ui-rounded, system-ui, sans-serif;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

#world { position: fixed; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; }

button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; touch-action: manipulation; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--honey); outline-offset: 2px; }
button:disabled { opacity: .45; cursor: default; }

/* ---------- üst ---------- */
#hud {
  position: fixed;
  top: calc(var(--top) + 8px);
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
}
#hud > * > *, #menu > * { pointer-events: auto; }
.stats { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; max-width: calc(100% - 66px); }
.pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px 5px 9px;
  background: var(--milk);
  border-radius: 999px;
  box-shadow: var(--lift);
  font-weight: 600;
}
.pill b { font-variant-numeric: tabular-nums; margin-right: 4px; }
.res { width: 18px; height: 18px; background: center / contain no-repeat; }
.res.coin { border-radius: 50%; background: radial-gradient(circle, #ffd76b 0 45%, #f7bd3a 48% 100%); box-shadow: inset 0 0 0 1.5px #c98e14; width: 16px; height: 16px; }
.res.wood { height: 11px; border-radius: 4px; background: linear-gradient(90deg, #a87448 0 68%, #e5bd8c 68%); }
.res.stone { height: 13px; background: #a9adb6; clip-path: polygon(0 100%, 10% 40%, 50% 0, 90% 35%, 100% 100%); }
.pill.level { padding-left: 12px; font-size: 13px; }
.xp { width: 70px; height: 8px; border-radius: 9px; background: var(--line); overflow: hidden; }
.xp i { display: block; height: 100%; background: var(--leaf); transition: width .4s; }
#questChip { font-size: 13px; font-weight: 500; text-align: left; padding-left: 12px; border-radius: 16px; max-width: 100%; }
#questChip b { color: var(--soft); }
#questChip.ready { background: var(--honey); }
#questChip.ready b { color: var(--ink); }
.pill.partner { background: var(--accent); color: #fff; font-size: 12px; }

#menu { display: flex; flex-direction: column; gap: 8px; }
.round {
  position: relative;
  width: 56px;
  height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--milk);
  border-radius: 18px;
  box-shadow: var(--lift);
}
.round svg { width: 23px; height: 23px; display: block; }
.round .glyph { display: block; height: 23px; }
.round .label { font-size: 10px; line-height: 1.2; }
.round .dot { display: none; position: absolute; top: -2px; right: -2px; width: 13px; height: 13px; border-radius: 50%; background: var(--accent); border: 2px solid var(--milk); }
.round.alert .dot { display: block; }
.round.small { width: 46px; height: 46px; border-radius: 50%; }
.round.love { color: var(--accent); }

/* ---------- alt ---------- */
#bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 8px calc(var(--bottom) + 8px);
  pointer-events: none;
}
#bottom > * { pointer-events: auto; }
.floaters { width: 100%; max-width: 560px; display: flex; justify-content: space-between; align-items: flex-end; position: relative; pointer-events: none !important; }
.floaters > * { pointer-events: auto; }
#emotes {
  position: absolute;
  right: 0;
  bottom: 54px;
  display: grid;
  grid-template-columns: repeat(4, 46px);
  padding: 6px;
  background: var(--milk);
  border-radius: 20px;
  box-shadow: var(--lift);
}
#emotes button { height: 44px; font-size: 25px; }

#tray { width: 100%; max-width: 560px; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.hint {
  font-size: 12.5px;
  text-align: center;
  padding: 5px 12px;
  border-radius: 14px;
  background: rgba(251, 253, 247, .86);
  max-width: 340px;
}
.strip {
  width: 100%;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 7px;
  background: var(--milk);
  border-radius: 20px;
  box-shadow: var(--lift);
  scrollbar-width: none;
  touch-action: pan-x;
}
.strip::-webkit-scrollbar { display: none; }
.card {
  flex: 0 0 auto;
  width: 78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 5px 2px 6px;
  border-radius: 14px;
  background: var(--mist);
  border: 2.5px solid transparent;
}
.card.on { border-color: var(--leaf); background: #e1f0d6; }
.card.locked img { filter: grayscale(1); opacity: .4; }
.card.poor .cost { color: var(--accent); }
.card b { font-size: 11px; font-weight: 500; line-height: 1.15; text-align: center; min-height: 26px; display: flex; align-items: center; }
.card small { font-size: 10.5px; color: var(--soft); }
.ico { width: 42px; height: 42px; flex: 0 0 auto; pointer-events: none; }
.mini { width: 15px; height: 15px; vertical-align: -3px; pointer-events: none; }
.cost { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 4px; }
.price { display: inline-flex; align-items: center; gap: 1px; font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--milk); border-radius: 999px; box-shadow: var(--lift); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs button { padding: 6px 8px; border-radius: 999px; font-size: 12px; white-space: nowrap; }
.tabs button.on { background: var(--ink); color: var(--milk); }
.tabs .erase { color: var(--accent); font-weight: 600; }
.tabs .move { color: #2f6f9f; font-weight: 600; }
.tabs .move.on { background: #2f6f9f; color: #fff; }
.tabs .erase.on { background: var(--accent); color: #fff; }

#dock { display: flex; gap: 4px; padding: 6px; background: var(--milk); border-radius: 26px; box-shadow: var(--lift); width: 100%; max-width: 400px; }
.tool { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 5px; border-radius: 20px; font-size: 11.5px; }
.tool .glyph { height: 28px; display: flex; align-items: center; justify-content: center; }
.tool svg { width: 27px; height: 27px; }
.seedico { width: 34px; height: 34px; }
.tool.on { background: var(--leaf); color: #fff; }

#toast {
  position: fixed;
  left: 50%;
  top: calc(var(--top) + 140px);
  z-index: 30;
  width: max-content;
  max-width: min(330px, calc(100% - 32px));
  padding: 9px 16px;
  text-align: center;
  background: var(--ink);
  color: var(--milk);
  border-radius: 18px;
  transform: translate(-50%, -8px);
  opacity: 0;
  transition: opacity .2s, transform .2s;
  pointer-events: none;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- paneller ---------- */
#shade { position: fixed; inset: 0; background: rgba(36, 58, 46, .34); z-index: 10; }
#sheet {
  position: fixed;
  z-index: 11;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  max-height: calc(100% - var(--top) - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 16px calc(var(--bottom) + 18px);
  background: var(--milk);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -8px 30px rgba(36, 58, 46, .2);
  animation: rise .25s ease-out;
}
@keyframes rise { from { transform: translate(-50%, 30px); opacity: 0; } }
#sheet header { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 16px 0 10px; background: var(--milk); }
#sheet h2 { font-size: 23px; font-weight: 600; }
.close { width: 36px; height: 36px; border-radius: 50%; background: var(--mist); font-size: 24px; line-height: 1; }
.section { font-size: 16px; margin: 18px 0 8px; }
.note { color: var(--soft); font-size: 14px; font-weight: 400; margin-bottom: 10px; }
.empty { padding: 28px 12px; text-align: center; color: var(--soft); background: var(--mist); border-radius: 18px; }

.quest { background: var(--mist); border-radius: 20px; padding: 14px; }
.quest.done { background: #fdf0cc; }
.quest h3 { font-size: 17px; font-weight: 600; margin-bottom: 9px; }
.bar { height: 10px; border-radius: 9px; background: #fff; overflow: hidden; margin-bottom: 10px; }
.bar i { display: block; height: 100%; background: var(--leaf); }
.row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; justify-content: flex-start; }
.reward { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; font-size: 13px; color: var(--soft); }
.item .reward { margin-left: 0; }

.item { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1.5px solid var(--line); }
.item:last-child { border-bottom: 0; }
.grow { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.item b { font-weight: 600; }
.sub { font-size: 12.5px; color: var(--soft); }
.stack { display: flex; flex-direction: column; gap: 4px; }
.wants { display: flex; flex-wrap: wrap; gap: 5px; }
.want { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px 2px 5px; border-radius: 99px; background: var(--mist); font-size: 12.5px; }
.want.ok { background: #d8efcc; }
.pips { display: flex; gap: 4px; margin-top: 2px; }
.pips i { width: 18px; height: 6px; border-radius: 6px; background: var(--line); }
.pips i.full { background: var(--honey); }
.max { color: var(--leaf); font-weight: 600; padding: 0 8px; }

.primary, .ghost { padding: 9px 14px; border-radius: 999px; font-weight: 600; font-size: 14px; white-space: nowrap; }
.primary { background: var(--leaf); color: #fff; box-shadow: 0 3px 0 #457843; }
.primary:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #457843; }
.primary .price { font-size: 14px; }
.primary:disabled { background: #a8b8a6; box-shadow: 0 3px 0 #8d9e8c; }
.ghost { background: var(--mist); }
.ghost.danger { display: block; margin: 16px auto 0; color: var(--accent); white-space: normal; }
.wide { display: block; width: 100%; margin-top: 12px; padding: 13px; font-size: 16px; }

input, textarea {
  width: 100%;
  font: 500 16px Fredoka, system-ui, sans-serif;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 11px 14px;
  -webkit-user-select: text;
  user-select: text;
}
textarea { resize: none; }
.editor { display: flex; flex-direction: column; gap: 10px; }
.preview { width: 130px; height: 130px; align-self: center; border-radius: 50%; background: #cfe8b6; }
.field { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.field > span { font-size: 13.5px; color: var(--soft); }
.swatches, .chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.swatches button { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--milk); box-shadow: 0 0 0 1.5px var(--line); }
.swatches button.on { box-shadow: 0 0 0 3px var(--ink); }
.chips button { padding: 6px 11px; border-radius: 99px; background: var(--mist); font-size: 13px; }
.chips button.on { background: var(--ink); color: var(--milk); }

@media (max-height: 700px) {
  .round { height: 44px; }
  .round .label { display: none; }
  .hint:not(.keep) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

.pill.weather { background: #dcecf8; font-size: 12px; font-weight: 500; padding-left: 12px; }
.segment { display: flex; gap: 4px; padding: 4px; margin-bottom: 12px; background: var(--mist); border-radius: 999px; }
.segment button { flex: 1; padding: 8px 4px; border-radius: 999px; font-size: 13.5px; }
.segment button.on { background: var(--ink); color: var(--milk); }
.editor .segment { margin-bottom: 0; }
.item .bar { width: 100%; height: 7px; margin: 0; background: var(--line); }
.item .cost { justify-content: flex-start; }
.item.locked img { filter: grayscale(1); opacity: .45; }
.item input { padding: 7px 11px; }
.sub.lock { color: var(--accent); }
.minimap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 8px; margin-bottom: 6px; background: #7fae66; border-radius: 18px; }
.plot { display: flex; align-items: center; justify-content: center; min-height: 62px; padding: 4px; text-align: center; font-size: 12px; line-height: 1.2; border-radius: 10px; background: rgba(28, 58, 46, .42); color: #fff; }
.plot.mine { background: #c9e6a8; color: var(--ink); }
.plot.home { background: #fbf3d9; color: var(--ink); font-weight: 600; aspect-ratio: auto !important; }
.editor .field { flex-direction: column; align-items: flex-start; gap: 5px; }
.editor .chips, .editor .swatches { justify-content: flex-start; }
/* ---------- joystick ve iş düğmesi ---------- */
.floaters .pad { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; pointer-events: none; }
.floaters .pad.right { align-items: flex-end; }
.pad > * { pointer-events: auto; }
#stick {
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(251, 253, 247, .55);
  border: 2px solid var(--milk);
  box-shadow: var(--lift);
  touch-action: none;
}
#stick i { width: 46px; height: 46px; border-radius: 50%; background: var(--milk); box-shadow: 0 3px 8px rgba(47, 74, 60, .3); pointer-events: none; }
#actBtn {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--leaf);
  color: #fff;
  border: 3px solid var(--milk);
  box-shadow: var(--lift);
  touch-action: none;
}
#actBtn:active { transform: scale(.94); }
#actBtn svg { width: 32px; height: 32px; }
#actBtn .seedico { width: 40px; height: 40px; }

/* fare ve klavyesi olan bilgisayarda joystick gerekmez */
@media (hover: hover) and (pointer: fine) {
  #stick, #actBtn { display: none; }
}
@media (max-height: 700px) {
  #stick { width: 88px; height: 88px; }
  #actBtn { width: 60px; height: 60px; }
}
/* ---------- giriş ---------- */
.accounts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 6px 0 14px; }
.account { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px 14px; border-radius: 22px; background: var(--mist); border: 3px solid transparent; }
.account:active { border-color: var(--leaf); transform: scale(.98); }
.account canvas { width: 100%; max-width: 150px; height: auto; }
.account b { font-size: 20px; font-weight: 600; }
.note.error { color: var(--accent); font-weight: 500; }
.ghost.on { background: var(--ink); color: var(--milk); }

/* ---------- depo ve birlikte ---------- */
.tabs.modes button { padding: 5px 12px; }
.tabs .stow { color: #8a6414; font-weight: 600; }
.tabs .stow.on { background: #8a6414; color: #fff; }
#together { display: flex; gap: 6px; max-width: 100%; overflow-x: auto; padding: 4px 4px 6px; scrollbar-width: none; touch-action: pan-x; }
#together::-webkit-scrollbar { display: none; }
#together button { flex: 0 0 auto; display: flex; align-items: center; gap: 5px; padding: 8px 13px 8px 10px; border-radius: 999px; background: var(--milk); box-shadow: var(--lift); font-size: 13px; white-space: nowrap; }
#together span { font-size: 18px; }
#sheet textarea { margin-bottom: 0; }
.letter { margin-top: 10px; padding: 11px 14px; border-radius: 18px 18px 18px 6px; background: #fdf0d8; }
.letter.mine { background: var(--mist); border-radius: 18px 18px 6px 18px; }
.letter p { font-weight: 400; margin: 2px 0 4px; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
@media (max-height: 760px) {
  #menu { gap: 5px; }
  .round { height: 46px; }
}
#together:not([hidden]) ~ #tray .hint:not(.keep) { display: none; }

/* ---------- mekanlar ve gorunum ---------- */
#placeChip { background: #3d9a99; color: #fff; font-size: 13px; padding-left: 12px; }
.segment button { font-size: 13px; padding-left: 2px; padding-right: 2px; }
.petpic { width: 52px; height: 52px; flex: 0 0 auto; }
.item.locked .petpic { filter: grayscale(1); opacity: .45; }
.preview { width: 150px; height: 150px; }
.lookTabs { position: sticky; top: 62px; z-index: 2; display: flex; gap: 4px; padding: 4px 0; background: var(--milk); overflow-x: auto; scrollbar-width: none; }
.lookTabs button { flex: 0 0 auto; padding: 7px 12px; border-radius: 99px; background: var(--mist); font-size: 13.5px; font-weight: 600; }
.lookTabs button.on { background: var(--leaf); color: #fff; }
.swatches button.none { display: grid; place-items: center; background: var(--mist); font-size: 13px; color: var(--soft); }
.editor, .editor > * { min-width: 0; max-width: 100%; }
.lookTabs { justify-content: space-between; }
.lookTabs button { flex: 1 0 auto; padding: 7px 8px; }
#sheet { overflow-x: hidden; }

/* ---------- kucuk telefonlar ---------- */
.tabs .paint { color: #8a4f9e; font-weight: 600; }
.tabs .paint.on { background: #8a4f9e; color: #fff; }
.tabs.modes button { padding: 5px 10px; }
@media (max-height: 700px) {
  #menu { gap: 4px; }
  .round { width: 46px; height: 40px; border-radius: 14px; }
  .pill { padding-top: 3px; padding-bottom: 3px; font-size: 13px; }
  #stick { width: 80px; height: 80px; }
  #stick i { width: 36px; height: 36px; }
  #actBtn { width: 54px; height: 54px; }
  .round.small { width: 38px; height: 38px; }
  .floaters .pad { gap: 4px; }
  .card { width: 70px; }
  .card .ico { width: 34px; height: 34px; }
  .card b { min-height: 22px; font-size: 10px; }
  .tool { padding: 4px 0 3px; }
  #sheet .preview { width: 120px; height: 120px; }
}
@media (max-width: 360px) {
  .tool { font-size: 10.5px; }
  .stats { max-width: calc(100% - 52px); }
}
/* ---------- gelen mektup ---------- */
#mail { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 20px; background: radial-gradient(circle at 50% 40%, rgba(120, 48, 66, .86), rgba(30, 30, 48, .92)); animation: mailIn .35s ease-out; }
@keyframes mailIn { from { opacity: 0; } }
.mailStage { position: relative; flex: 1 1 auto; min-width: 0; width: 100%; max-width: 360px; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.mailTitle { color: #fff7ee; font-size: 30px; font-weight: 600; animation: pop .55s cubic-bezier(.2, 1.6, .4, 1) both; }
.mailSub { color: #ffd9df; text-align: center; animation: pop .55s .12s cubic-bezier(.2, 1.6, .4, 1) both; }
.mailHint { color: #fff7ee; font-size: 14px; min-height: 20px; animation: blink 1.6s ease-in-out infinite; }
.mailSkip { color: #e9c7cf; font-size: 13px; text-decoration: underline; padding: 8px; }
@keyframes pop { from { opacity: 0; transform: scale(.4) translateY(30px); } }
@keyframes blink { 50% { opacity: .45; } }
.envelope { position: relative; width: 240px; height: 160px; margin: 56px 0 18px; perspective: 700px; animation: arrive .9s cubic-bezier(.2, 1.5, .4, 1) both, wiggle 2.4s 1.1s ease-in-out infinite; }
@keyframes arrive { from { opacity: 0; transform: translateY(-260px) rotate(-24deg) scale(.5); } }
@keyframes wiggle { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(-5deg) scale(1.04); } 84% { transform: rotate(5deg) scale(1.04); } 92% { transform: rotate(-2deg); } }
.envelope span { position: absolute; display: block; }
.envBack { inset: 0; background: #f0dcc0; border-radius: 12px; box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
.envFront { inset: 0; z-index: 2; background: linear-gradient(#fff6e6, #f8e6c9); border-radius: 12px; clip-path: polygon(0 0, 50% 58%, 100% 0, 100% 100%, 0 100%); }
.envFlap { left: 0; top: 0; width: 100%; height: 62%; z-index: 3; background: #f3dfbf; clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: top; transition: transform .55s ease-in; }
.envSeal { left: 50%; top: 56%; z-index: 4; width: 52px; height: 52px; margin: -26px 0 0 -26px; display: grid !important; place-items: center; border-radius: 50%; background: #c4364f; color: #ffe3e8; font-size: 24px; box-shadow: 0 4px 10px rgba(0, 0, 0, .3); transition: transform .3s, opacity .3s; }
.envelope.opening { animation: lift .85s ease-in forwards; }
.envelope.opening .envFlap { transform: rotateX(180deg); z-index: 1; }
.envelope.opening .envSeal { transform: scale(2.2) rotate(30deg); opacity: 0; }
@keyframes lift { 55% { transform: scale(1.14); } to { transform: translateY(40px) scale(.85); opacity: .2; } }
.paper { width: 100%; max-height: calc(100vh - 80px); display: flex; flex-direction: column; gap: 10px; padding: 22px 22px 18px; background: repeating-linear-gradient(#fffaf0, #fffaf0 31px, #efe2cc 32px); border-radius: 14px; box-shadow: 0 24px 50px rgba(0, 0, 0, .4); color: #4a2f2a; animation: unfold .7s cubic-bezier(.2, 1.3, .4, 1) both; }
@keyframes unfold { from { opacity: 0; transform: translateY(120px) scaleY(.12) rotate(4deg); } }
.paperDate { align-self: flex-end; font-size: 12px; color: #a98a72; }
.paperText { min-height: 96px; overflow-y: auto; font: 500 23px/32px "Caveat", "Bradley Hand", Fredoka, cursive; white-space: pre-wrap; overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; }
.paperSign { display: flex; flex-direction: column; align-items: flex-end; font: 500 19px/1.2 "Caveat", "Bradley Hand", Fredoka, cursive; opacity: 0; transform: translateY(8px); transition: .5s; }
.paperSign b { font-size: 26px; color: #c4364f; }
.paperActions { display: flex; justify-content: center; gap: 8px; opacity: 0; transition: .5s .3s; }
.paper.written .paperSign, .paper.written .paperActions { opacity: 1; transform: none; }
.confetti { position: absolute; left: 50%; top: 45%; z-index: 5; font-size: 22px; pointer-events: none; opacity: 0; animation: burst 1.3s ease-out forwards; }
@keyframes burst { 0% { opacity: 1; transform: translate(-50%, -50%) scale(.3); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1.3) rotate(25deg); } }
.flyMail { position: fixed; left: 50%; top: 62%; z-index: 50; font-size: 54px; pointer-events: none; animation: fly 1.4s cubic-bezier(.5, 0, .8, .4) forwards; }
@keyframes fly { 0% { transform: translate(-50%, 0) scale(.4); } 25% { transform: translate(-50%, -30px) scale(1.2); } 100% { transform: translate(130px, -75vh) rotate(28deg) scale(.3); opacity: 0; } }
.letter.sealed { display: block; width: 100%; text-align: left; background: #fbe3e7; border: 2px dashed #d9718a; }
@media (prefers-reduced-motion: reduce) { .paperSign, .paperActions { opacity: 1; transform: none; } .confetti, .flyMail { display: none; } }