:root {
  color-scheme: dark;
  --bg: #111110;
  --panel: #20201e;
  --muted: #96968e;
  --ink: #f6f5ec;
  --accent: #d1ff58;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    16px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    sans-serif;
}
button,
input,
textarea {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  color: inherit;
}
#app {
  max-width: 760px;
  margin: auto;
  padding: 0 24px;
}
header {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -2px;
}
.wordmark span {
  color: var(--accent);
  margin-left: 3px;
}
.small,
.muted {
  color: var(--muted);
  font-size: 14px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 700;
  text-transform: uppercase;
}
.hero {
  max-width: 470px;
  margin: 25px auto 70px;
  text-align: center;
}
.hero .eyebrow {
  display: flex;
  justify-content: center;
  gap: 14px;
}
.eyebrow span {
  color: var(--accent);
}
.portrait-wrap {
  position: relative;
  width: 215px;
  margin: 30px auto;
}
.portrait {
  width: 215px;
  height: 245px;
  object-fit: cover;
  transform: rotate(-4deg);
  border: 7px solid #f6f5ec;
  border-bottom-width: 25px;
  border-radius: 3px;
}
.stamp {
  position: absolute;
  right: -50px;
  bottom: 14px;
  transform: rotate(8deg);
  font-size: 20px;
  line-height: 0.9;
  color: var(--accent);
  font-weight: 900;
  letter-spacing: -1px;
  text-align: left;
}
h1 {
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin: 32px 0 18px;
}
h1 span {
  font-size: 21px;
  letter-spacing: -0.5px;
}
h2 {
  font-size: 24px;
  letter-spacing: -0.8px;
}
.invitation {
  font-size: 22px;
  line-height: 1.5;
  margin: 10px 0;
}
.primary,
.secondary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 19px 22px;
  font-weight: 700;
  transition: transform 0.18s;
}
.primary {
  background: var(--accent);
  color: #111;
  margin: 28px 0 12px;
}
.primary:active,
.secondary:active {
  transform: scale(0.98);
}
.secondary {
  background: var(--panel);
  justify-content: center;
}
.plain {
  background: transparent;
  border: 0;
  padding: 6px;
}
.section-line,
.work-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-line {
  border-top: 1px solid #383833;
  padding-top: 15px;
}
.section-line h2 {
  font-size: 18px;
}
.section-line > span,
.work-meta {
  color: var(--muted);
  font-size: 12px;
}
.wall-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px 16px;
}
.work {
  min-width: 0;
}
.work > a > img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #1a1a18;
  border-radius: 10px;
}
.work-meta {
  padding: 8px 0;
}
.like {
  font-size: 17px;
}
.like[data-liked="true"] {
  color: var(--accent);
}
.response {
  font-size: 14px;
  display: flex;
  gap: 8px;
  align-items: start;
}
.response img {
  width: 26px;
  height: 26px;
  object-fit: cover;
  border-radius: 50%;
}
.empty {
  text-align: center;
  padding: 30px 0 45px;
  color: var(--muted);
}
.empty > span {
  font-size: 60px;
  line-height: 1;
  color: var(--accent);
}
.empty p {
  color: var(--ink);
  font-size: 20px;
}
.empty small {
  font-size: 13px;
}
footer {
  text-align: center;
  padding: 50px 0;
  color: var(--muted);
  font-size: 12px;
}
footer a {
  display: block;
  margin-top: 20px;
  color: var(--accent);
  font-size: 15px;
}
.choose,
.generation,
.detail,
.create {
  max-width: 520px;
  margin: 30px auto 60px;
}
.choose h1,
.generation h1 {
  font-size: 36px;
}
.meme-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 35px;
}
.meme {
  padding: 0;
  text-align: left;
  border: 0;
  background: transparent;
}
.meme img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 12px;
  background: #20201e;
}
.meme span {
  display: block;
  padding: 8px 2px;
  font-size: 13px;
}
.fine {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  margin-top: 22px;
}
.overlay {
  position: fixed;
  inset: 0;
  background: #0009;
  display: flex;
  justify-content: center;
  align-items: end;
  z-index: 10;
  backdrop-filter: blur(8px);
}
.sheet {
  position: relative;
  background: #242420;
  border-radius: 26px 26px 0 0;
  padding: 32px 24px max(25px, env(safe-area-inset-bottom));
  width: 100%;
  max-width: 550px;
  max-height: 94dvh;
  overflow: auto;
  animation: slide 0.25s ease-out;
}
.sheet h2 {
  margin-top: 0;
}
.close {
  position: absolute;
  right: 18px;
  top: 16px;
  border: 0;
  background: #3b3b35;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 22px;
  line-height: 1;
}
.sheet-image {
  max-height: 240px;
  max-width: 100%;
  display: block;
  margin: auto;
  border-radius: 12px;
}
.share-preview {
  height: 44dvh;
  max-height: 460px;
  max-width: 100%;
  object-fit: contain;
  display: block;
  margin: 24px auto;
  border-radius: 12px;
}
.share-actions {
  display: flex;
  justify-content: space-around;
  gap: 12px;
}
.share-actions > * {
  background: none;
  border: 0;
  font-size: 28px;
  display: flex;
  align-items: center;
  flex-direction: column;
  min-width: 75px;
}
.share-actions span {
  font-size: 12px;
  margin-top: 8px;
}
.detail-image {
  display: block;
  width: 100%;
  max-height: 65dvh;
  object-fit: contain;
  margin: 28px 0 8px;
}
.detail .secondary {
  margin-bottom: 24px;
}
.detail > .plain {
  display: block;
  margin: 20px auto;
}
.spinner-face {
  font-family: monospace;
  font-size: 100px;
  color: var(--accent);
  text-align: center;
  margin: 90px 0 40px;
  animation: wobble 2s infinite;
}
.generation #preview > .muted,
.generation #preview > .fine {
  text-align: center;
}
.compare figure {
  margin: 30px 0 20px;
}
.compare figure > img {
  width: 100%;
  max-height: 65dvh;
  object-fit: contain;
}
.compare figcaption {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}
.compare details img {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  margin-top: 15px;
}
.compare summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
}
.consent {
  font-size: 13px;
  color: var(--muted);
  margin: 28px 0 0;
}
.resume {
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  border-radius: 12px;
  padding: 14px;
  width: 100%;
  margin-top: 16px;
}
.intro {
  font-size: 22px;
  color: var(--muted);
  margin-bottom: 45px;
}
label {
  display: block;
  font-size: 13px;
  margin: 20px 0;
}
input,
textarea {
  display: block;
  border: 1px solid #49493f;
  background: #20201c;
  color: var(--ink);
  border-radius: 10px;
  padding: 16px;
  width: 100%;
  margin-top: 8px;
}
textarea {
  min-height: 110px;
}
.checkbox {
  display: flex;
  gap: 10px;
  align-items: start;
  color: var(--muted);
  line-height: 1.7;
}
.checkbox input {
  width: 18px;
  margin: 3px 0 0;
}
.upload {
  border: 1px dashed #79796c;
  border-radius: 16px;
  padding: 30px;
  text-align: center;
}
.upload input {
  font-size: 12px;
}
#toast {
  position: fixed;
  bottom: 35px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #111;
  border-radius: 12px;
  padding: 14px 20px;
  font-size: 14px;
  max-width: 90vw;
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
#toast.show {
  opacity: 1;
}
@keyframes slide {
  from {
    transform: translateY(40px);
    opacity: 0.4;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes wobble {
  0%,
  100% {
    transform: rotate(-12deg);
  }
  50% {
    transform: rotate(12deg);
  }
}
@media (min-width: 700px) {
  .hero {
    margin-top: 45px;
  }
  .portrait-wrap {
    width: 245px;
  }
  .portrait {
    width: 245px;
    height: 280px;
  }
  .wall-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .sheet {
    border-radius: 26px;
    margin-bottom: 30px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
}
