/* extinction.meme — "girl failure diary" theme. Self-hosted OFL fonts, no external requests. */

@font-face { font-family: "Bagel Fat One"; src: url(/fonts/BagelFatOne-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Caveat"; src: url(/fonts/Caveat-700.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Comic Neue"; src: url(/fonts/ComicNeue-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Comic Neue"; src: url(/fonts/ComicNeue-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ink: #2b1020;
  --ink-soft: #6d3a57;
  --paper: #fff8fb;
  --bg: #ffe2ef;
  --gingham: rgba(255, 140, 196, .26);
  --pink: #ff9ccf;
  --hot: #ff3d9a;
  --bubble: #ffd0e7;
  --butter: #fff27a;
  --sky: #a9dcff;
  --mint: #b6f3cf;
  --lilac: #dcc6ff;
  --nope: #6aa9ff;
  --line: #f4bcd6;
  --display: "Bagel Fat One", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --body: "Comic Neue", "Comic Sans MS", "Chalkboard SE", "Trebuchet MS", sans-serif;
  --shadow: 4px 4px 0 var(--ink);
  --shadow-lg: 7px 7px 0 var(--ink);
  --radius: 18px;
  --gut: 16px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.5;
  background-color: var(--bg);
  background-image:
    linear-gradient(90deg, var(--gingham) 50%, transparent 50%),
    linear-gradient(var(--gingham) 50%, transparent 50%);
  background-size: 44px 44px;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: var(--hot); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px dashed var(--hot); outline-offset: 3px; }
::selection { background: var(--butter); color: var(--ink); }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--butter); padding: 8px 14px; border: 3px solid var(--ink); border-radius: 12px; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px var(--gut);
  background: rgba(255, 248, 251, .92);
  backdrop-filter: blur(6px);
  border-bottom: 3px solid var(--ink);
}
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); margin-right: auto; }
.logo svg { width: 38px; height: 38px; flex: none; transition: transform .3s cubic-bezier(.3, 1.8, .5, 1); }
.logo:hover svg { transform: rotate(-14deg) scale(1.12); }
.logo span { font-family: var(--display); font-size: 24px; letter-spacing: .01em; line-height: 1; }
.logo i { font-style: normal; color: var(--hot); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs a {
  font-weight: 700; text-decoration: none; color: var(--ink);
  padding: 6px 12px; border: 2.5px solid var(--ink); border-radius: 999px; background: var(--paper);
  box-shadow: 2px 2px 0 var(--ink); transition: transform .12s, box-shadow .12s, background .12s;
  font-size: 16px; white-space: nowrap;
}
.tabs a:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); background: var(--bubble); }
.tabs a[aria-current="page"] { background: var(--hot); color: #fff; }
.pack-count {
  display: inline-block; min-width: 22px; padding: 0 6px; margin-left: 2px; border-radius: 999px;
  background: var(--butter); color: var(--ink); border: 2px solid var(--ink); font-size: 13px; text-align: center; line-height: 18px;
}
.pack-count.bump { animation: bump .45s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.6) rotate(-10deg); } 100% { transform: scale(1); } }

main { display: block; }
.view { padding: 28px var(--gut) 60px; max-width: 1240px; margin: 0 auto; }

/* ---------- shared bits ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border: 3px solid var(--ink); border-radius: 14px;
  background: var(--paper); box-shadow: var(--shadow); font-weight: 700; font-size: 17px; text-decoration: none; color: var(--ink);
  transition: transform .12s, box-shadow .12s, background .12s; user-select: none;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); color: var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: var(--shadow); }
.btn.pink { background: var(--pink); }
.btn.hot { background: var(--hot); color: #fff; }
.btn.butter { background: var(--butter); }
.btn.sky { background: var(--sky); }
.btn.mint { background: var(--mint); }
.btn.lilac { background: var(--lilac); }
.btn.small { padding: 6px 12px; font-size: 15px; border-radius: 11px; box-shadow: 3px 3px 0 var(--ink); }

.h-display {
  font-family: var(--display); font-weight: 400; line-height: 1; margin: 0;
  color: var(--hot); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill;
  text-shadow: 4px 4px 0 var(--ink);
}
.hand { font-family: var(--hand); font-weight: 700; }
.marker { background: linear-gradient(transparent 55%, var(--butter) 55%, var(--butter) 90%, transparent 90%); padding: 0 .1em; }
.kao { white-space: nowrap; }

/* ---------- home ---------- */
.hero { position: relative; text-align: center; padding: 34px 0 20px; min-height: 420px; }
.hero-title { font-size: clamp(54px, 12.5vw, 150px); letter-spacing: -.01em; }
.hero-title .l { display: inline-block; animation: hop 2.6s ease-in-out infinite; animation-delay: calc(var(--i) * 90ms); }
.hero-title .dot { color: var(--butter); }
.hero-title .tld { color: var(--sky); }
@keyframes hop { 0%, 70%, 100% { transform: translateY(0) rotate(0); } 80% { transform: translateY(-12px) rotate(-4deg); } 90% { transform: translateY(2px) rotate(2deg); } }
.hero-sub { font-family: var(--hand); font-size: clamp(26px, 4.4vw, 40px); margin: 18px auto 0; max-width: 820px; transform: rotate(-1.5deg); line-height: 1.15; }
.hero-sub b { color: var(--hot); }
.hero-kao { margin: 10px 0 0; color: var(--ink-soft); font-size: 18px; }

.modes { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin: 34px auto 0; max-width: 1000px; }
.mode {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 16px 20px;
  border: 3px solid var(--ink); border-radius: 24px; box-shadow: var(--shadow-lg); text-decoration: none; color: var(--ink);
  transition: transform .18s cubic-bezier(.3, 1.6, .5, 1), box-shadow .18s; text-align: center;
}
.mode:nth-child(1) { background: var(--sky); transform: rotate(-2deg); }
.mode:nth-child(2) { background: var(--pink); transform: rotate(1.2deg); }
.mode:nth-child(3) { background: var(--butter); transform: rotate(-.8deg); }
.mode:hover { transform: rotate(0) translate(-3px, -5px) scale(1.03); box-shadow: 10px 12px 0 var(--ink); color: var(--ink); }
.mode .emo { font-size: 46px; line-height: 1.1; }
.mode strong { font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1.05; }
.mode small { font-size: 16px; font-weight: 700; color: var(--ink-soft); }
.mode div { display: flex; flex-direction: column; align-items: center; gap: 2px; }

.stickers { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.sticker {
  position: absolute; pointer-events: auto; touch-action: none; cursor: grab; user-select: none;
  font-family: var(--hand); font-weight: 700; font-size: 24px; line-height: 1; white-space: nowrap;
  padding: 6px 12px; border: 2.5px solid var(--ink); border-radius: 999px; background: var(--paper); box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(var(--r, 0deg)); transition: box-shadow .1s;
}
.sticker.emoji { font-size: 40px; padding: 0; border: 0; background: none; box-shadow: none; filter: drop-shadow(2px 3px 0 var(--ink)); }
.sticker.dragging { cursor: grabbing; box-shadow: 6px 8px 0 var(--ink); z-index: 10; }
.sticker.emoji.dragging { box-shadow: none; filter: drop-shadow(4px 6px 0 var(--ink)); }
.sticker.s-butter { background: var(--butter); }
.sticker.s-mint { background: var(--mint); }
.sticker.s-lilac { background: var(--lilac); }
.sticker.s-sky { background: var(--sky); }
.sticker.s-pink { background: var(--pink); }
.drag-hint { font-family: var(--hand); font-size: 20px; color: var(--ink-soft); margin-top: 18px; }

.diary {
  position: relative; max-width: 780px; margin: 64px auto 0; padding: 40px 34px 34px 74px;
  background-color: var(--paper);
  background-image: linear-gradient(90deg, transparent 54px, #ff8db4 54px, #ff8db4 56px, transparent 56px),
    repeating-linear-gradient(transparent 0 33px, #cfe3ff 33px 35px);
  background-position: 0 0, 0 22px;
  border: 3px solid var(--ink); border-radius: 6px 22px 8px 18px; box-shadow: var(--shadow-lg); transform: rotate(.6deg);
}
.diary::before, .diary::after {
  content: ""; position: absolute; top: -16px; width: 120px; height: 32px; background: rgba(169, 220, 255, .75);
  border: 2px dashed rgba(43, 16, 32, .25);
}
.diary::before { left: 24px; transform: rotate(-6deg); }
.diary::after { right: 30px; transform: rotate(5deg); background: rgba(255, 242, 122, .8); }
.diary h2 { font-family: var(--hand); font-size: 48px; line-height: 1; margin: 0 0 14px; color: var(--hot); transform: rotate(-2deg); }
.diary p { margin: 0 0 17px; line-height: 35px; font-size: 19px; }
.diary p:last-of-type { margin-bottom: 0; }
.diary .sig { font-family: var(--hand); font-size: 34px; text-align: right; margin: 8px 0 0; color: var(--ink); line-height: 1.1; }
.diary .heart { color: var(--hot); display: inline-block; animation: beat 1.2s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.3); } 30% { transform: scale(1); } 45% { transform: scale(1.18); } }
.diary .doodle { position: absolute; font-size: 42px; right: -24px; bottom: -26px; transform: rotate(12deg); filter: drop-shadow(2px 2px 0 var(--ink)); }

.realq { max-width: 780px; margin: 30px auto 0; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; align-items: center; }
.realq p { font-family: var(--hand); font-size: 28px; margin: 0; transform: rotate(-1deg); }

.fresh { margin: 64px 0 0; }
.fresh-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.fresh-head h2 { font-size: clamp(32px, 5vw, 48px); }
.marquee { overflow: hidden; border: 3px solid var(--ink); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); padding: 16px 0; }
.marquee-track { display: flex; gap: 16px; width: max-content; animation: slide var(--dur, 80s) linear infinite; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
.marquee button { flex: none; padding: 0; border: 2.5px solid var(--ink); border-radius: 12px; background: #fff; overflow: hidden; height: 190px; box-shadow: 3px 3px 0 var(--ink); transition: transform .15s; }
.marquee button:nth-child(odd) { transform: rotate(-2deg); }
.marquee button:nth-child(even) { transform: rotate(2deg); }
.marquee button:hover { transform: scale(1.06) rotate(0); }
.marquee img { height: 100%; width: auto; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- scroll / grid ---------- */
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.view-head h1 { font-size: clamp(40px, 7vw, 72px); }
.view-head p { margin: 6px 0 0; font-family: var(--hand); font-size: 26px; line-height: 1.1; }
.toolbar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; padding: 12px;
  background: var(--paper); border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow);
  position: sticky; top: 72px; z-index: 20;
}
.search {
  flex: 1 1 200px; min-width: 0; padding: 9px 14px; border: 2.5px solid var(--ink); border-radius: 12px; background: #fff;
  font: inherit; font-size: 17px; color: var(--ink);
}
.search::placeholder { color: #b27a98; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 4px 11px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; font-weight: 700; font-size: 15px;
  transition: background .12s, transform .12s;
}
.chip:hover { background: var(--bubble); transform: rotate(-3deg); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--butter); }
.count-line { font-family: var(--hand); font-size: 22px; margin: -8px 0 14px; color: var(--ink-soft); }

.grid { columns: 260px; column-gap: 22px; }
.tile {
  position: relative; break-inside: avoid; margin: 0 0 24px; padding: 10px 10px 8px; background: #fff;
  border: 3px solid var(--ink); border-radius: 10px; box-shadow: var(--shadow);
  transform: rotate(var(--r, 0deg)); transition: transform .2s cubic-bezier(.3, 1.6, .5, 1), box-shadow .2s;
}
.tile:hover, .tile:focus-within { transform: rotate(0) scale(1.03); box-shadow: var(--shadow-lg); z-index: 2; }
.tile .open { display: block; width: 100%; padding: 0; border: 0; background: #f6e6ee; border-radius: 4px; overflow: hidden; }
.tile img { width: 100%; height: auto; }
.tile .cap { display: flex; align-items: center; gap: 6px; margin-top: 7px; }
.tile .cap span { flex: 1; min-width: 0; font-family: var(--hand); font-size: 21px; line-height: 1.05; }
.icon-btn {
  flex: none; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; font-size: 18px; line-height: 1;
  border: 2.5px solid var(--ink); border-radius: 50%; background: var(--paper); box-shadow: 2px 2px 0 var(--ink);
  transition: transform .12s, background .12s;
}
.icon-btn:hover { transform: scale(1.12) rotate(-8deg); background: var(--bubble); }
.icon-btn[aria-pressed="true"] { background: var(--hot); color: #fff; }
.tile .tape { position: absolute; top: -12px; left: 50%; width: 76px; height: 22px; margin-left: -38px; background: rgba(255, 242, 122, .78); border: 1.5px dashed rgba(43, 16, 32, .2); transform: rotate(var(--tr, -3deg)); pointer-events: none; }
.tile:nth-child(3n) .tape { background: rgba(169, 220, 255, .78); }
.tile:nth-child(3n+1) .tape { background: rgba(255, 156, 207, .7); }
.empty {
  text-align: center; padding: 40px 20px; background: var(--paper); border: 3px dashed var(--ink); border-radius: var(--radius);
}
.empty p { font-family: var(--hand); font-size: 30px; margin: 0 0 16px; line-height: 1.15; }

/* ---------- swipe ---------- */
.view-swipe { max-width: 720px; text-align: center; }
.swipe-meta { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; font-family: var(--hand); font-size: 24px; margin: 4px 0 12px; }
.stage { position: relative; height: min(66vh, 620px); min-height: 360px; margin: 0 auto; max-width: 520px; }
.card {
  position: absolute; inset: 0; display: flex; flex-direction: column; padding: 14px 14px 10px; background: #fff;
  border: 3px solid var(--ink); border-radius: 22px; box-shadow: var(--shadow-lg); touch-action: none; user-select: none;
  transform-origin: 50% 100%; will-change: transform;
}
.card.is-top { cursor: grab; }
.card.is-top:active { cursor: grabbing; }
.card.behind-1 { transform: translateY(14px) scale(.95) rotate(2deg); }
.card.behind-2 { transform: translateY(28px) scale(.9) rotate(-2.5deg); }
.card[class*="behind"] .ttl { visibility: hidden; }
.card .pic { position: relative; flex: 1; min-height: 0; background: #f8eaf1; border-radius: 12px; overflow: hidden; }
.card .pic img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: contain; pointer-events: none; -webkit-user-drag: none; }
.card .ttl { font-family: var(--hand); font-size: 28px; line-height: 1.05; margin: 9px 4px 0; min-height: 30px; }
.card.fly { transition: transform .42s cubic-bezier(.4, .1, .6, 1), opacity .42s; }
.card.snap { transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.stamp {
  position: absolute; top: 34px; padding: 4px 16px; border: 5px solid; border-radius: 14px; font-family: var(--display);
  font-size: 46px; line-height: 1.1; opacity: 0; pointer-events: none; background: rgba(255, 255, 255, .85); text-transform: lowercase;
}
.stamp.nope { right: 26px; color: var(--nope); transform: rotate(14deg); }
.stamp.keep { left: 26px; color: var(--hot); transform: rotate(-14deg); }
.stamp.share { left: 50%; top: auto; bottom: 90px; color: #c99a00; border-color: #c99a00; background: var(--butter); transform: translateX(-50%) rotate(-4deg); }
.swipe-btns { display: flex; justify-content: center; align-items: center; gap: 18px; margin: 34px 0 10px; }
.round {
  width: 72px; height: 72px; display: grid; place-items: center; padding: 0; font-size: 32px; line-height: 1;
  border: 3px solid var(--ink); border-radius: 50%; box-shadow: var(--shadow); transition: transform .15s cubic-bezier(.3, 1.8, .5, 1);
}
.round:hover { transform: scale(1.12) rotate(-6deg); }
.round:active { transform: scale(.92); }
.round.nope { background: var(--sky); }
.round.share { width: 86px; height: 86px; font-size: 38px; background: var(--butter); }
.round.keep { background: var(--pink); }
.round.undo { width: 50px; height: 50px; font-size: 22px; background: var(--paper); }
.round span { display: block; }
.round small { display: block; font-size: 11px; font-weight: 700; margin-top: -2px; }
.keys-hint { font-size: 15px; color: var(--ink-soft); }
.keys-hint kbd { font-family: var(--body); font-weight: 700; padding: 1px 7px; border: 2px solid var(--ink); border-radius: 6px; background: #fff; }
.done-card {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px;
  background: var(--paper); border: 3px dashed var(--ink); border-radius: 22px;
}
.done-card h2 { font-family: var(--hand); font-size: 40px; line-height: 1.05; margin: 0; }
.done-card .row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ---------- pack ---------- */
.pack-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pack-grid { columns: 200px; column-gap: 18px; }
.pack-grid .tile .cap span { font-size: 19px; }

/* ---------- make ---------- */
.notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 24px; margin: 10px 0 34px; }
.note {
  padding: 22px 18px 18px; border: 3px solid var(--ink); box-shadow: var(--shadow); border-radius: 4px 4px 4px 22px;
  font-size: 18px; line-height: 1.4; transform: rotate(var(--r, -1deg));
}
.note:nth-child(5n+1) { background: var(--butter); --r: -1.6deg; }
.note:nth-child(5n+2) { background: var(--pink); --r: 1.4deg; }
.note:nth-child(5n+3) { background: var(--sky); --r: -.6deg; }
.note:nth-child(5n+4) { background: var(--mint); --r: 2deg; }
.note:nth-child(5n+5) { background: var(--lilac); --r: -2.2deg; }
.note b { display: block; font-family: var(--hand); font-size: 30px; line-height: 1.05; margin-bottom: 6px; }
.make-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: center; padding: 24px; background: var(--paper); border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; }
.make-cta p { flex-basis: 100%; margin: 0; font-family: var(--hand); font-size: 30px; line-height: 1.15; }

/* ---------- lightbox ---------- */
dialog.lightbox {
  width: min(1100px, calc(100vw - 20px)); max-width: none; max-height: calc(100dvh - 20px); padding: 0; border: 3px solid var(--ink); border-radius: 22px;
  background: var(--paper); color: var(--ink); box-shadow: 10px 10px 0 var(--ink); overflow: hidden;
}
dialog.lightbox[open] { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr); animation: pop .28s cubic-bezier(.3, 1.6, .5, 1); }
dialog::backdrop { background: rgba(43, 16, 32, .62); backdrop-filter: blur(3px); }
@keyframes pop { from { transform: scale(.88) rotate(-2deg); opacity: 0; } to { transform: none; opacity: 1; } }
.lb-pic { position: relative; display: grid; place-items: center; background: #f6e3ed; min-height: 300px; max-height: calc(100dvh - 26px); padding: 14px; }
.lb-pic img { max-height: calc(100dvh - 54px); width: auto; height: auto; max-width: 100%; border-radius: 8px; }
.lb-nav { position: absolute; top: 50%; margin-top: -24px; width: 48px; height: 48px; border: 3px solid var(--ink); border-radius: 50%; background: var(--paper); box-shadow: 3px 3px 0 var(--ink); font-size: 22px; font-weight: 700; display: grid; place-items: center; padding: 0; }
.lb-nav.prev { left: 10px; }
.lb-nav.next { right: 10px; }
.lb-nav:hover { background: var(--butter); }
.lb-side { display: flex; flex-direction: column; gap: 14px; padding: 22px 20px 20px; overflow-y: auto; max-height: calc(100dvh - 26px); }
.lb-close { position: absolute; top: 10px; right: 10px; z-index: 3; }
.lb-title { font-family: var(--hand); font-size: 36px; line-height: 1; margin: 0 40px 0 0; }
.lb-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.lb-tags span { font-size: 13px; font-weight: 700; padding: 1px 9px; border: 2px solid var(--ink); border-radius: 999px; background: var(--bubble); }
.lb-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lb-actions .btn { padding: 9px 10px; font-size: 16px; }
.lb-alt { font-size: 15px; color: var(--ink-soft); }
.lb-alt summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.lb-alt p { margin: 6px 0 0; }

.share-box h3 { margin: 0 0 8px; font-family: var(--display); font-weight: 400; font-size: 24px; }
.share-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.share-grid a, .share-grid button {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border: 2.5px solid var(--ink); border-radius: 999px;
  font-weight: 700; font-size: 15px; text-decoration: none; color: #fff; box-shadow: 2px 2px 0 var(--ink); transition: transform .12s;
}
.share-grid a:hover, .share-grid button:hover { transform: translate(-1px, -2px) rotate(-3deg); color: #fff; }
.share-grid .native { background: var(--hot); font-size: 16px; padding: 8px 14px; }
.sx { background: #111; } .sreddit { background: #ff4500; } .sfb { background: #1877f2; } .sbsky { background: #1185fe; }
.sthreads { background: #000; } .swa { background: #1fa855; } .stg { background: #229ed9; } .sli { background: #0a66c2; }
.stumblr { background: #36465d; } .spin { background: #e60023; } .smail { background: var(--lilac); color: var(--ink) !important; }
.share-tip { margin: 10px 0 0; font-size: 14.5px; color: var(--ink-soft); line-height: 1.4; }

/* bottom share sheet (super like) */
.sheet {
  position: fixed; left: 50%; bottom: 0; z-index: 60; width: min(640px, 100vw); transform: translate(-50%, 110%);
  background: var(--paper); border: 3px solid var(--ink); border-bottom: 0; border-radius: 26px 26px 0 0; box-shadow: 0 -6px 0 var(--ink);
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); transition: transform .38s cubic-bezier(.3, 1.4, .5, 1);
}
.sheet.open { transform: translate(-50%, 0); }
.sheet-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.sheet-head img { width: 64px; height: 64px; object-fit: cover; border: 2.5px solid var(--ink); border-radius: 10px; }
.sheet-head h3 { flex: 1; margin: 0; font-family: var(--hand); font-size: 30px; line-height: 1.05; }
.sheet-head h3 small { display: block; font-family: var(--body); font-size: 15px; font-weight: 700; color: var(--ink-soft); }
.sheet .row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* progress modal */
.progress-dlg { width: min(460px, calc(100vw - 24px)); padding: 26px; border: 3px solid var(--ink); border-radius: 22px; background: var(--paper); color: var(--ink); box-shadow: 8px 8px 0 var(--ink); text-align: center; }
.progress-dlg h2 { font-family: var(--hand); font-size: 36px; margin: 0 0 6px; line-height: 1.05; }
.progress-dlg p { margin: 0 0 14px; min-height: 27px; }
.bar { height: 28px; border: 3px solid var(--ink); border-radius: 999px; background: #fff; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(-45deg, var(--hot) 0 14px, var(--pink) 14px 28px); transition: width .2s; animation: stripes 1s linear infinite; background-size: 40px 40px; }
@keyframes stripes { to { background-position: 40px 0; } }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 80; transform: translate(-50%, 160%); max-width: calc(100vw - 32px);
  padding: 10px 18px; background: var(--ink); color: var(--butter); border-radius: 999px; font-weight: 700; font-size: 17px;
  box-shadow: 4px 4px 0 var(--hot); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1), opacity .2s, visibility .3s; pointer-events: none; text-align: center;
  opacity: 0; visibility: hidden;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.sheet.open ~ .toast { bottom: auto; top: 16px; }

/* sparkles + confetti */
.fx { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.spark { position: absolute; font-size: 16px; color: var(--hot); animation: spark .8s ease-out forwards; }
@keyframes spark { from { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); } to { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.3) rotate(160deg); } }
.confetti { position: absolute; top: -40px; font-size: 26px; animation: fall var(--t, 2.4s) cubic-bezier(.3, .4, .6, 1) forwards; }
@keyframes fall { to { transform: translate(var(--dx), 110vh) rotate(var(--rot)); } }

/* ---------- footer ---------- */
footer { border-top: 3px solid var(--ink); background: var(--paper); padding: 26px var(--gut) 34px; text-align: center; font-size: 16px; }
footer p { margin: 4px 0; }
footer .hand { font-size: 26px; }

/* static fallback for no-js + crawlers */
.nojs-list { columns: 220px; column-gap: 16px; }
.nojs-list a { display: block; break-inside: avoid; margin-bottom: 14px; color: var(--ink); }
.only-js { }

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  body { font-size: 17px; }
  .top { position: static; padding: 8px 12px; gap: 8px; }
  .lbl-long { display: none; }
  .hero-title { font-size: 15vw; }
  .hero-title .w1, .hero-title .w2 { display: block; }
  .hero { padding-top: 54px; }
  .view-swipe .view-head { margin-bottom: 4px; justify-content: center; }
  .view-swipe .view-head h1 { font-size: 44px; }
  .view-swipe .view-head p { font-size: 21px; }
  .swipe-meta { margin: 0 0 8px; font-size: 21px; }
  .logo span { font-size: 21px; }
  .logo svg { width: 32px; height: 32px; }
  .tabs { width: 100%; justify-content: space-between; gap: 4px; flex-wrap: nowrap; }
  .tabs a { padding: 5px 10px; font-size: 15px; }
  .view { padding: 22px 16px 50px; }
  .hero { min-height: 0; padding-top: 18px; }
  .modes { grid-template-columns: 1fr; gap: 16px; }
  .mode { flex-direction: row; text-align: left; gap: 14px; padding: 14px 16px; }
  .mode .emo { font-size: 40px; }
  .mode strong { font-size: 24px; }
  .mode div { align-items: flex-start; }
  .sticker { font-size: 19px; }
  .sticker.emoji { font-size: 32px; }
  .diary { padding: 30px 18px 26px 46px; background-image: linear-gradient(90deg, transparent 32px, #ff8db4 32px, #ff8db4 34px, transparent 34px), repeating-linear-gradient(transparent 0 33px, #cfe3ff 33px 35px); }
  .diary h2 { font-size: 40px; }
  .diary p { font-size: 17.5px; }
  .toolbar { top: 6px; padding: 10px; }
  .grid { columns: 2 150px; column-gap: 12px; }
  .tile { padding: 6px 6px 5px; margin-bottom: 16px; border-width: 2.5px; }
  .tile .cap span { font-size: 17px; }
  .icon-btn { width: 30px; height: 30px; font-size: 15px; }
  .tile .tape { width: 50px; margin-left: -25px; height: 16px; top: -9px; }
  .marquee button { height: 140px; }
  dialog.lightbox[open] { grid-template-columns: 1fr; overflow-y: auto; }
  .lb-pic { max-height: none; min-height: 0; padding: 10px; }
  .lb-pic img { max-height: 62dvh; }
  .lb-side { max-height: none; overflow: visible; padding: 16px; }
  .lb-nav { width: 40px; height: 40px; margin-top: -20px; }
  .stage { height: max(300px, calc(100dvh - 350px)); min-height: 0; }
  .swipe-btns { gap: 12px; margin: 40px 0 6px; }
  .round { width: 62px; height: 62px; font-size: 28px; }
  .round.share { width: 74px; height: 74px; }
  .round.undo { width: 44px; height: 44px; }
  .keys-hint { display: none; }
  .stamp { font-size: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .marquee-track { animation: none; }
  .marquee { overflow-x: auto; }
}
