@font-face {
    font-family: "Sticker Marker";
    src: url("assets/fonts/PermanentMarker-Regular.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Sticker Script";
    src: url("assets/fonts/Knewave-Regular.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

:root {
    color-scheme: dark;
    background: #000;
    --sticker-red: #db4e2e;
    --sticker-paper: #f3e6c9;
    --sticker-ink: #11110e;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-width: 240px;
    min-height: 100%;
}

body {
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    place-items: center;
    background: #000;
}

/* The original is 1254 × 1254. All positions scale with this square. */
.poster {
    position: relative;
    width: min(100vw, 100vh);
    width: min(100vw, 100svh);
    aspect-ratio: 1;
    container-type: inline-size;
    isolation: isolate;
}

.sticker {
    --type-scale: 1;
    position: absolute;
    overflow: hidden;
    border-radius: 8.3% / 13.2%;
    background: linear-gradient(to bottom,
        var(--sticker-red) 0% 34%,
        var(--sticker-paper) 34% 88%,
        var(--sticker-red) 88% 100%);
    box-shadow: inset 0 0 0 .18cqw #d3bc91, 0 .22cqw .15cqw #080705;
    filter: url(#paper-edge);
}

.sticker--group {
    left: 8.93%;
    top: 5.82%;
    width: 59.33%;
    height: 36.60%;
    transform: rotate(-1.3deg);
    z-index: 1;
}

.sticker--date {
    --type-scale: .89;
    left: 44.12%;
    top: 37.08%;
    width: 51.83%;
    height: 33.33%;
    transform: rotate(5.7deg);
    z-index: 3;
}

.sticker--place {
    --type-scale: .92;
    left: 7.49%;
    top: 59.17%;
    width: 53.83%;
    height: 34.05%;
    transform: rotate(.15deg);
    z-index: 2;
}

.sticker__header {
    position: absolute;
    inset: 4.6% 5% auto;
    color: #f1e4c4;
    text-align: center;
    font-family: Arial, Helvetica, sans-serif;
    filter: url(#ink-edge);
}

.hello, .introduction { display: block; }

.hello {
    font-size: calc(6.75cqw * var(--type-scale));
    font-weight: 700;
    letter-spacing: .55cqw;
    line-height: 1.04;
}

.introduction {
    font-size: calc(3.52cqw * var(--type-scale));
    font-weight: 500;
    line-height: 1;
    transform: scaleX(1.24);
    letter-spacing: -.025cqw;
}

.sticker__writing {
    position: absolute;
    z-index: 5; /* Keep pale paper scuffs behind the solid marker ink. */
    inset: 34% 3% 12%;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--sticker-ink);
    font-weight: 400;
}

.handwritten {
    display: block;
    flex-shrink: 0;
    width: max-content;
    max-width: none;
    white-space: nowrap;
    font-family: "Sticker Marker", "Brush Script MT", cursive;
    font-weight: 400;
    line-height: 1;
    -webkit-text-stroke: 0;
    paint-order: stroke fill;
    transform: scaleX(var(--fit, 1));
    transform-origin: center;
    filter: url(#ink-edge);
}

.handwritten--title {
    --line-width: .79;
    letter-spacing: -.55cqw;
    font-size: 11cqw;
    line-height: .8;
    margin-top: -.4cqw;
}

.handwritten--subtitle {
    --line-width: .97;
    letter-spacing: -.50cqw;
    font-size: 9.9cqw;
    line-height: .92;
    margin-top: .35cqw;
}

.handwritten--date {
    --line-width: .98;
    font-family: "Sticker Script", "Brush Script MT", cursive;
    font-size: 9.2cqw;
    letter-spacing: -.28cqw;
    margin-top: .2cqw;
}

.handwritten--place {
    --line-width: .96;
    letter-spacing: -.75cqw;
    font-size: 14.1cqw;
    margin-top: -1.75cqw;
}

.underline {
    position: absolute;
    z-index: 5;
    left: 20.5%;
    top: 76.1%;
    width: 56.5%;
    height: 13.2%;
    overflow: visible;
    fill: none;
    stroke: var(--sticker-ink);
    stroke-width: 17;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: url(#ink-edge);
}

/* All wear is a procedural SVG overlay; no part of the original PNG is used. */
.sticker__texture {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    user-select: none;
    z-index: 4;
}

.filter-definitions {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

::selection { background: #c54b2e; color: #fff1ce; }

@media print {
    @page { margin: 0; }
    body { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .poster { width: min(100vw, 100vh); }
}
