@font-face { font-family: "Bagel Fat One"; src: url(/fonts/bagel-fat-one-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: Nunito; font-weight: 400; src: url(/fonts/nunito-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: Nunito; font-weight: 700; src: url(/fonts/nunito-latin-700-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: Nunito; font-weight: 800; src: url(/fonts/nunito-latin-800-normal.woff2) format("woff2"); font-display: swap; }

:root {
  --cobalt: #1437c8; --cobalt-deep: #0d2596; --sun: #ffc531; --pink: #ffd3e4; --mint: #c9f4e6;
  --ink: #1c1f4a; --white: #fff; --green: #128c5e;
  --sticker-shadow: 0 2px 0 rgba(13, 37, 150, .12), 0 10px 18px rgba(13, 37, 150, .22);
  --display: "Bagel Fat One", "Arial Rounded MT Bold", sans-serif;
  --body: Nunito, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cobalt); color: var(--ink); font: 400 1.0625rem/1.6 var(--body); }
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2 { font-family: var(--display); font-weight: 400; line-height: 1.04; margin: 0; }
h2 { font-size: clamp(2.1rem, 6vw, 3.4rem); color: var(--cobalt-deep); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.hero :focus-visible { outline-color: var(--white); }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; border-radius: 8px; z-index: 5; }
.skip:focus { left: 8px; }
.wrap { width: min(1160px, 100%); margin: 0 auto; padding: 0 16px; }
.lead { font-size: 1.15rem; font-weight: 700; margin: 10px 0 0; max-width: 60ch; }
.hint { font-size: .9rem; margin: 4px 0 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 10px 24px; border: 3px solid transparent; border-radius: 999px; font: 800 1.05rem/1.2 var(--body); text-decoration: none; cursor: pointer; transition: transform .12s; }
.btn:hover { transform: translateY(-2px); }
.btn:disabled { opacity: .6; cursor: default; transform: none; }
.btn-sun { background: var(--sun); color: var(--cobalt-deep); }
.btn-blue { background: var(--cobalt); color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border-color: #fff; }
.btn-plain { background: #fff; color: var(--cobalt-deep); border-color: var(--cobalt-deep); }
.btn-small { min-height: 42px; padding: 6px 16px; font-size: .95rem; }

/* Hero */
.hero { display: grid; grid-template-columns: 1fr; gap: 28px; width: min(1160px, 100%); margin: 0 auto; padding: 44px 16px 56px; color: #fff; overflow: hidden; }
.hero h1 { font-size: clamp(3.9rem, 15.5vw, 8.4rem); line-height: .94; color: var(--sun); }
.hero-date { font: 400 clamp(1.7rem, 5vw, 2.6rem)/1.1 var(--display); margin: 14px 0 0; }
.hero-count { display: inline-block; margin: 16px 0 0; padding: 4px 16px; background: #fff; color: var(--cobalt-deep); border-radius: 999px; font-weight: 800; transform: rotate(-1.5deg); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-photo { position: relative; width: min(100%, 520px); margin: 0 auto; padding: 14px; }
.die-cut { background: #fff; padding: 12px; border-radius: 30px; box-shadow: var(--sticker-shadow); }
.hero-photo .die-cut { transform: rotate(2deg); border-radius: 34px; }
.peel { position: absolute; font-size: clamp(2.6rem, 9vw, 4rem); filter: drop-shadow(0 0 0 #fff) drop-shadow(0 5px 6px rgba(0,0,0,.3)); }
.peel-a { left: 0; top: 0; transform: rotate(-12deg); }
.peel-b { right: 2%; bottom: 8%; transform: rotate(10deg); }
.peel-c { right: 2%; top: 0; transform: rotate(8deg); }

/* Colour sheets */
.sheet { padding: 56px 0 64px; border-radius: 42px 42px 0 0; margin-top: -26px; position: relative; }
.sheet-sun { background: var(--sun); }
.sheet-pink { background: var(--pink); }
.sheet-mint { background: var(--mint); padding-bottom: 88px; }

/* Theme colours shared by stickers, wishes and swatches */
.theme-cobalt { --bg: #1437c8; --fg: #fff; }
.theme-marigold { --bg: #ffd65c; --fg: #0d2596; }
.theme-pink { --bg: #ff8fc0; --fg: #4d0a2c; }
.theme-mint { --bg: #5fe3bf; --fg: #05392c; }
.theme-lilac { --bg: #8a4fff; --fg: #fff; }
.theme-coral { --bg: #ff8a6e; --fg: #4a1006; }

/* Sticker wall */
.sticker-wall { margin-top: 30px; columns: 1; column-gap: 20px; }
.sticker-wall li { break-inside: avoid; padding: 9px 4px; }
.sticker { display: block; width: 100%; padding: 22px 22px; background: var(--bg); color: var(--fg); border: 7px solid #fff; box-shadow: var(--sticker-shadow); font: 800 1.2rem/1.35 var(--body); text-align: center; cursor: pointer; transform: rotate(var(--tilt, 0deg)); transition: transform .14s; }
.sticker:hover { transform: rotate(0deg) scale(1.03); }
.shape-a { border-radius: 30px; }
.shape-b { border-radius: 60px 22px 60px 22px; }
.shape-c { border-radius: 22px 60px 22px 60px; font-family: var(--display); font-weight: 400; font-size: 1.35rem; letter-spacing: .025em; line-height: 1.3; }
.shape-d { border-radius: 42px; padding-block: 30px; }

/* Form */
.write-grid { display: grid; gap: 30px; grid-template-columns: 1fr; }
.paper { background: #fff; border-radius: 30px; padding: 26px 20px; box-shadow: var(--sticker-shadow); }
.paper label, legend { display: block; font-weight: 800; margin: 18px 0 6px; padding: 0; }
input:not([type=radio]):not([type=file]), textarea { width: 100%; padding: 12px 14px; border: 2px solid var(--cobalt-deep); border-radius: 14px; font: 400 1.05rem/1.4 var(--body); color: var(--ink); background: #fff; }
textarea { resize: vertical; }
input[type=file] { width: 100%; font: 400 1rem var(--body); }
fieldset { border: 0; margin: 0; padding: 0; }
.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.paper .swatch { position: relative; display: flex; align-items: center; justify-content: center; min-height: 46px; margin: 0; padding: 4px; border-radius: 14px; background: var(--bg); color: var(--fg); cursor: pointer; font-size: .95rem; }
.swatch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.swatch:has(input:checked) { outline: 4px solid var(--ink); outline-offset: 2px; }
.swatch:has(input:focus-visible) { outline: 4px solid var(--ink); outline-offset: 4px; }
.photo-preview { margin-top: 10px; max-height: 180px; border-radius: 14px; }
.trap { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.form-error { margin: 14px 0 0; padding: 10px 14px; background: #ffe6e0; color: #8e1c07; border-radius: 12px; font-weight: 700; }
#submit { width: 100%; margin-top: 20px; }
.side-photos { display: none; }
.side-photos img { width: 78%; }
.tilt-l { transform: rotate(-3deg); }
.tilt-r { transform: rotate(3deg); margin: -30px 0 0 auto; }

/* Wall */
.wish-wall { margin-top: 30px; columns: 1; column-gap: 22px; }
.wish-wall li { break-inside: avoid; padding: 10px 4px; }
.wish { background: var(--bg); color: var(--fg); border: 7px solid #fff; border-radius: 28px; padding: 20px; box-shadow: var(--sticker-shadow); transform: rotate(var(--tilt, 0deg)); }
.wish img { width: 100%; max-height: 300px; object-fit: cover; border-radius: 16px; margin-bottom: 14px; }
.wish-message { margin: 0; font-weight: 700; font-size: 1.1rem; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.wish-from { margin: 12px 0 0; font-weight: 800; overflow-wrap: anywhere; }
.wish-save { margin-top: 12px; min-height: 44px; padding: 6px 18px; border: 0; border-radius: 999px; background: #fff; color: var(--cobalt-deep); font: 800 .95rem var(--body); cursor: pointer; }
.empty { margin-top: 24px; font-weight: 700; font-size: 1.15rem; }
.more { text-align: center; margin-top: 24px; }

.foot { background: var(--cobalt); color: #fff; text-align: center; padding: 34px 16px; font: 400 1.35rem/1.3 var(--display); border-radius: 42px 42px 0 0; margin-top: -26px; position: relative; }
.foot p { margin: 0; }

/* Card viewer */
.viewer { width: min(430px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); border: 0; border-radius: 26px; padding: 16px; background: #fff; color: var(--ink); }
.viewer::backdrop { background: rgba(9, 18, 90, .78); }
.viewer-title { font-size: 1.4rem; color: var(--cobalt-deep); padding-right: 42px; overflow-wrap: anywhere; }
.viewer-card { margin-top: 10px; aspect-ratio: 9 / 16; max-height: calc(100dvh - 210px); margin-inline: auto; background: var(--pink); border-radius: 16px; overflow: hidden; }
.viewer-card img { width: 100%; height: 100%; object-fit: contain; }
.viewer-actions { display: flex; gap: 8px; margin-top: 12px; }
.viewer-actions .btn { flex: 1; padding-inline: 10px; }
.viewer-close { position: absolute; right: 12px; top: 10px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--pink); color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer; }

/* Private page */
.admin-body { background: var(--pink); }
.admin { padding-block: 34px 60px; }
.admin h1 { font-size: clamp(2.4rem, 8vw, 3.8rem); color: var(--cobalt-deep); }
.login { max-width: 420px; margin: 8vh auto 0; }
.login .btn { width: 100%; margin-top: 18px; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.admin-list { margin-top: 24px; display: grid; gap: 14px; }
.admin-row { display: flex; flex-wrap: wrap; gap: 14px; background: #fff; border-radius: 22px; padding: 16px; box-shadow: var(--sticker-shadow); }
.admin-row > img { width: 120px; height: 120px; object-fit: cover; border-radius: 14px; }
.admin-row-body { flex: 1 1 240px; min-width: 0; }
.admin-row-body .wish-from { margin: 0 0 4px; color: var(--cobalt-deep); }
.admin-row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.is-hidden { opacity: .62; }

@media (min-width: 620px) {
  .sticker-wall, .wish-wall { columns: 2; }
  .swatches { grid-template-columns: repeat(6, 1fr); }
  .paper { padding: 32px; }
}
@media (min-width: 960px) {
  .hero { grid-template-columns: 1.1fr .9fr; align-items: center; padding-block: 64px 80px; }
  .sticker-wall, .wish-wall { columns: 3; }
  .write-grid { grid-template-columns: 1.3fr 1fr; align-items: start; }
  .side-photos { display: block; padding-top: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .sticker { transition: none; }
}
