:root {
  --bg: #06142b; --bg2: #0b3a5c; --card: rgba(120,230,255,.07); --line: rgba(120,230,255,.30);
  --ink: #eafcff; --muted: #a9cde0; --gold: #f2d28b; --violet: #b49bff; --aqua: #5fe3f0; --glow: rgba(95,227,240,.45);
}
* { box-sizing: border-box; }
html, body {
  min-height: 100vh; color: var(--ink); background: var(--bg);
  background-image: linear-gradient(180deg, rgba(6,20,43,.55), rgba(6,20,43,.86) 70%), var(--bgimg, url("bg.jpg"));
  background-size: cover; background-position: center top; background-attachment: fixed;
  font: 17px/1.55 Georgia, "Times New Roman", serif;
}
body {
  min-height: 100vh; color: var(--ink); background: var(--bg);
  background-image: radial-gradient(900px 500px at 50% -10%, var(--bg2), transparent 70%), radial-gradient(600px 400px at 90% 100%, rgba(140,100,235,.28), transparent 70%);
  font: 17px/1.55 Georgia, "Times New Roman", serif;
}
.wrap { max-width: 560px; margin: 0 auto; padding: 40px 16px 64px; }
.wrap.wide { max-width: 720px; }
.head { text-align: center; margin-bottom: 28px; }
.orb { display: block; width: 132px; height: 132px; margin: 0 auto 14px; border-radius: 50%; box-shadow: 0 0 44px var(--glow), 0 0 90px rgba(180,155,255,.25); }
h1 { margin: 0 0 4px; font-size: 28px; letter-spacing: .02em; }
.tag { color: var(--aqua); margin: 0; }
.bio { color: var(--muted); font-size: 15px; margin: 6px 0 0; }
.links { display: grid; gap: 12px; }
.link { display: block; backdrop-filter: blur(6px); padding: 14px 18px; text-align: center; color: var(--ink); text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: 999px; transition: transform .15s, box-shadow .15s, border-color .15s; }
.link:hover, .link:focus-visible { transform: translateY(-2px); box-shadow: 0 0 22px var(--glow); border-color: var(--aqua); outline: none; }
.link b { display: block; font-weight: 600; }
.link .price { color: var(--gold); margin-left: 6px; }
.link small { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.link.soft { background: transparent; border-style: dashed; }
.foot { text-align: center; color: var(--muted); font-size: 13px; margin-top: 36px; }
/* the post page */
.back { display: inline-block; color: var(--muted); text-decoration: none; margin-bottom: 18px; }
.back:hover { color: var(--ink); }
article h1 { font-size: 30px; margin-bottom: 6px; }
article h2 { margin: 34px 0 8px; font-size: 22px; color: var(--gold); }
article h3 { margin: 22px 0 4px; font-size: 18px; }
article ul, article ol { padding-left: 22px; }
.panel { backdrop-filter: blur(6px); background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 18px; margin: 12px 0; }
.panel b { color: var(--gold); }
.quote { border-left: 3px solid var(--violet); padding: 4px 0 4px 14px; color: var(--muted); font-style: italic; margin: 12px 0; }
.prices { list-style: none; padding: 0; display: grid; gap: 12px; }
.prices li { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px 16px; }
.prices .p { float: right; color: var(--gold); font-weight: 700; }

/* link-in-bio blocks */
.social { display: flex; justify-content: center; gap: 14px; margin-top: 14px; }
.soc { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--ink); border: 1px solid var(--line); background: var(--card); transition: transform .15s, box-shadow .15s, color .15s; }
.soc:hover, .soc:focus-visible { transform: translateY(-2px); color: var(--aqua); box-shadow: 0 0 18px var(--glow); outline: none; }
.sec { margin: 18px 0 2px; font-size: 14px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; text-align: center; color: var(--aqua); }
.link.glow { border-color: var(--gold); box-shadow: 0 0 22px rgba(242,210,139,.30); }
body.square .link, body.square .sub, body.square .video-frame { border-radius: 14px; }
.sub, .video { padding: 14px 18px; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 22px; backdrop-filter: blur(6px); }
.sub b, .video b { display: block; margin-bottom: 8px; }
.sub-row { display: flex; gap: 8px; }
.sub input { flex: 1; min-width: 0; padding: 11px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0,0,0,.28); color: var(--ink); font: inherit; font-size: 16px; }
.sub button { padding: 0 20px; border: 0; border-radius: 999px; background: var(--aqua); color: #04202b; font: inherit; font-weight: 700; cursor: pointer; }
.sub button:disabled { opacity: .6; }
.sub-msg { display: block; min-height: 1.2em; margin-top: 6px; color: var(--gold); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (prefers-reduced-motion: reduce) { .link, .soc { transition: none; } }

/* Linktree-style shapes and motion (colours stay ocean + gold) */
body { font-family: "Epilogue", system-ui, "Segoe UI", sans-serif; }
h1, h2, h3, .link b, .sub b, .video b { font-family: "Epilogue", system-ui, sans-serif; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 7vw, 36px); line-height: 1.1; }
.link { border-radius: 28px; padding: 16px 22px; box-shadow: 4px 4px 0 rgba(0,0,0,.38); transition: transform .18s ease-out, box-shadow .18s ease-out, border-color .18s ease-out, background .18s ease-out; }
.link:hover, .link:focus-visible { transform: translate(2px, 2px); box-shadow: 2px 2px 0 rgba(0,0,0,.38), 0 0 22px var(--glow); background: rgba(120,230,255,.12); }
.link:active { transform: translate(4px, 4px); box-shadow: 0 0 0 rgba(0,0,0,.38); }
.link.glow { box-shadow: 4px 4px 0 rgba(0,0,0,.38), 0 0 22px rgba(242,210,139,.30); }
.link small { font-weight: 400; }
.sub, .video { border-radius: 28px; box-shadow: 4px 4px 0 rgba(0,0,0,.38); }
.sub input { border-radius: 18px; } .sub button { border-radius: 18px; font-weight: 800; transition: transform .15s ease-out; } .sub button:hover { transform: translateY(-1px); }
.soc { box-shadow: 3px 3px 0 rgba(0,0,0,.38); } .soc:hover { transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(0,0,0,.38), 0 0 18px var(--glow); }
.panel, .prices li { border-radius: 28px; box-shadow: 4px 4px 0 rgba(0,0,0,.30); }
.sec { font-weight: 800; }
.orb { box-shadow: 0 0 44px var(--glow), 0 0 90px rgba(180,155,255,.25), 5px 5px 0 rgba(0,0,0,.35); }
body.square .link, body.square .sub, body.square .video-frame { border-radius: 14px; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.head > *, .links > * { animation: rise .45s ease-out both; }
.links > :nth-child(2) { animation-delay: .05s; } .links > :nth-child(3) { animation-delay: .1s; } .links > :nth-child(4) { animation-delay: .15s; }
.links > :nth-child(5) { animation-delay: .2s; } .links > :nth-child(6) { animation-delay: .25s; } .links > :nth-child(n+7) { animation-delay: .3s; }
@media (prefers-reduced-motion: reduce) { .head > *, .links > * { animation: none; } .link, .soc, .sub button { transition: none; } }

/* v3 blocks: thumbnails, featured, badges, groups, notes, players, forms, share, themes */
.link { display: flex; align-items: center; gap: 12px; text-align: center; position: relative; }
.link .txt { flex: 1; min-width: 0; }
.link .txt b, .link .txt small { display: block; }
.link .ico { display: grid; place-items: center; width: 34px; flex: none; color: var(--aqua); }
.link .thumb { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; flex: none; }
.link .badge { position: absolute; top: -9px; right: 16px; padding: 2px 10px; border-radius: 999px; background: var(--gold); color: #1d1608; font-size: 12px; font-weight: 800; letter-spacing: .03em; box-shadow: 2px 2px 0 rgba(0,0,0,.35); }
.link.featured { flex-direction: column; align-items: stretch; padding: 0 0 16px; overflow: hidden; }
.link.featured .thumb { width: 100%; height: 170px; border-radius: 0; }
.link.featured .txt { padding: 0 18px; }
.group { display: block; }
.grp-btn { all: unset; box-sizing: border-box; display: flex; width: 100%; justify-content: center; align-items: center; gap: 8px; cursor: pointer; margin: 18px 0 6px; font-size: 14px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--aqua); }
.grp-btn:focus-visible { outline: 2px solid var(--aqua); outline-offset: 4px; border-radius: 8px; }
.chev { display: inline-block; transition: transform .2s ease-out; font-size: 18px; line-height: 1; }
.group.open .chev { transform: rotate(180deg); }
.grp-body { display: grid; gap: 12px; margin-top: 8px; }
.grp-body[hidden] { display: none; }
.note-block { padding: 14px 18px; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 28px; backdrop-filter: blur(6px); }
.note-block b { display: block; margin-bottom: 4px; font-weight: 800; }
.note-block p { margin: 6px 0 0; color: var(--muted); }
.embed-frame { border-radius: 16px; overflow: hidden; }
.embed-frame iframe { width: 100%; height: 100%; border: 0; }
.req { display: grid; gap: 10px; text-align: left; }
.req > b { text-align: center; margin: 0; }
.req-note { color: var(--muted); text-align: center; }
.req input, .req select, .req textarea { width: 100%; padding: 12px 14px; border-radius: 18px; border: 1px solid var(--line); background: rgba(0,0,0,.28); color: var(--ink); font: inherit; font-size: 16px; }
.req textarea { resize: vertical; }
.req-btn { padding: 13px; border: 0; border-radius: 18px; background: var(--aqua); color: #04202b; font: inherit; font-weight: 800; cursor: pointer; }
.req-btn:disabled { opacity: .6; }
.share { position: absolute; top: 14px; right: 16px; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; box-shadow: 3px 3px 0 rgba(0,0,0,.38); }
.share:hover, .share:focus-visible { color: var(--aqua); outline: none; box-shadow: 0 0 18px var(--glow); }
.share.done::after { content: "Link copied"; position: absolute; right: 0; top: 50px; padding: 3px 10px; border-radius: 999px; background: var(--gold); color: #1d1608; font-size: 12px; font-weight: 800; white-space: nowrap; }
.wrap { position: relative; }
@media (prefers-reduced-motion: reduce) { .chev { transition: none; } }

/* colour themes (chosen in the admin) */
body[data-theme="midnight"] { --bg: #0b0b12; --bg2: #1c1c2b; --card: rgba(255,255,255,.06); --line: rgba(255,255,255,.2); --ink: #f4f4f8; --muted: #b6b6c6; --glow: rgba(255,255,255,.25); background-image: linear-gradient(180deg, rgba(11,11,18,.82), rgba(11,11,18,.96)), var(--bgimg, url("bg.jpg")); }
body[data-theme="violet"] { --bg: #120a26; --bg2: #2a1458; --card: rgba(190,160,255,.09); --line: rgba(190,160,255,.32); --ink: #f5efff; --muted: #c2b3e6; --glow: rgba(169,139,255,.5); background-image: linear-gradient(180deg, rgba(18,10,38,.6), rgba(18,10,38,.9) 70%), var(--bgimg, url("bg.jpg")); }
body[data-theme="light"] { --bg: #f6f4ee; --bg2: #ffffff; --card: rgba(255,255,255,.85); --line: rgba(0,0,0,.14); --ink: #14110f; --muted: #5d5a52; --glow: rgba(0,0,0,.18); background-image: linear-gradient(180deg, rgba(246,244,238,.9), rgba(246,244,238,.97)), var(--bgimg, url("bg.jpg")); }
body[data-theme="light"] .link, body[data-theme="light"] .sub, body[data-theme="light"] .video, body[data-theme="light"] .note-block, body[data-theme="light"] .soc, body[data-theme="light"] .share { box-shadow: 4px 4px 0 rgba(0,0,0,.18); }
body[data-theme="light"] .tag, body[data-theme="light"] .sec, body[data-theme="light"] .grp-btn { color: #7a5200; }
body[data-theme="light"] .link .ico { color: #7a5200; }
body[data-theme="light"] .req input, body[data-theme="light"] .req select, body[data-theme="light"] .req textarea, body[data-theme="light"] .sub input { background: #fff; color: #14110f; }

.link.featured .badge { top: 10px; right: 12px; }
button.link { font: inherit; color: inherit; cursor: pointer; width: 100%; }

/* v5: a real desktop layout. Left: your art, large and fixed, with the name over it. Right: the links, scrolling. */
body.home { background-image: radial-gradient(900px 600px at 85% -10%, rgba(140,100,235,.22), transparent 70%); background-attachment: scroll; }
body.home[data-theme="light"] { background-image: none; }
.stage { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.intro { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(28px, 4vw, 64px); isolation: isolate; text-align: left; margin: 0; }
.intro .art { position: absolute; inset: -4%; z-index: -2; background-size: cover; background-position: center; animation: drift 38s ease-in-out infinite alternate; }
.intro::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(6,20,43,.10) 0%, rgba(6,20,43,.30) 40%, rgba(6,20,43,.94) 100%); }
.intro > * { animation: rise .6s ease-out both; }
.intro .orb { width: 84px; height: 84px; margin: 0 0 18px; }
.intro h1 { font-size: clamp(40px, 5vw, 78px); line-height: .98; margin: 0 0 10px; letter-spacing: -.03em; text-wrap: balance; }
.intro .tag { font-size: clamp(18px, 1.6vw, 24px); color: var(--gold); }
.intro .bio { font-size: clamp(16px, 1.3vw, 19px); color: var(--ink); opacity: .9; margin: 10px 0 0; max-width: 34ch; }
.intro .social { justify-content: flex-start; margin-top: 20px; }
.links-col { padding: clamp(56px, 8vh, 96px) clamp(20px, 5vw, 80px) 80px; width: 100%; max-width: 760px; margin: 0 auto; }
body.home .wrap { all: unset; }
.share { position: fixed; top: 16px; right: 16px; z-index: 20; }
@keyframes drift { from { transform: scale(1.04) translate3d(0, 0, 0); } to { transform: scale(1.12) translate3d(-1.5%, -1%, 0); } }
@media (max-width: 899px) {
  .stage { display: block; }
  .intro { position: relative; height: auto; min-height: 380px; padding: 28px 20px 28px; justify-content: flex-end; }
  .intro h1 { font-size: clamp(36px, 10vw, 52px); }
  .intro .orb { width: 72px; height: 72px; }
  .links-col { padding: 28px 16px 64px; }
}
@media (prefers-reduced-motion: reduce) { .intro .art { animation: none; transform: scale(1.04); } .intro > * { animation: none; } }

/* v5.1: the art shows only the top of the picture, so its own lettering never sits behind the page's name */
.intro { background: var(--bg); }
.intro .art { inset: 0 0 auto 0; height: 60%; background-size: auto 220%; background-position: 50% 0; animation: none; transform: none; }
.intro::after { inset: 0 0 auto 0; height: 60%; background: linear-gradient(180deg, rgba(6,20,43,0) 40%, var(--bg) 100%); }
@media (max-width: 899px) {
  .intro { min-height: 0; padding-top: 250px; }
  .intro .art { height: 270px; }
  .intro::after { height: 270px; }
}
.req .req-btn { padding: 15px; width: 100%; font-size: 17px; }

/* v5.2: readable sizes and line lengths */
.link small, .note-block p, .req-note, .sub small, .sub-msg { font-size: 15px; line-height: 1.5; }
.link .txt small, .note-block p, .req-note { max-width: 60ch; margin-inline: auto; }
@media (max-width: 899px) { .intro { padding-top: 200px; } .intro .art { height: 220px; } .intro::after { height: 220px; } .intro h1 { margin-bottom: 6px; } .intro .bio { margin-top: 6px; } }

.link.pending { cursor: default; }
#toast { position: fixed; left: 50%; bottom: 28px; translate: -50% 20px; padding: 10px 18px; border-radius: 999px; background: var(--gold); color: #1d1608; font-weight: 800; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .2s ease-out, translate .2s ease-out; z-index: 40; }
#toast.on { opacity: 1; translate: -50% 0; }
@media (prefers-reduced-motion: reduce) { #toast { transition: none; } }

/* v6: feels native on a phone. Press feedback is instant, hover only exists where there is a real pointer. */
a, button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.link, .soc, .share, .req-btn, .sub button { -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
.intro { height: 100dvh; }
.share { top: max(16px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); }
.links-col { padding-bottom: max(80px, calc(env(safe-area-inset-bottom) + 48px)); }
@media (max-width: 899px) { .intro { height: auto; } }
@media (hover: none) {
  .link:hover, .link:focus-visible { transform: none; box-shadow: 4px 4px 0 rgba(0,0,0,.38); background: var(--card); border-color: var(--line); }
  .link.glow:hover { box-shadow: 4px 4px 0 rgba(0,0,0,.38), 0 0 22px rgba(242,210,139,.30); border-color: var(--gold); }
  .soc:hover { transform: none; box-shadow: 3px 3px 0 rgba(0,0,0,.38); color: var(--ink); }
  .sub button:hover { transform: none; }
}
.link:active, .soc:active, .req-btn:active, .sub button:active { transition: none; }
.link:active { transform: translate(4px, 4px); box-shadow: 0 0 0 rgba(0,0,0,.38); }
.link.pending:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 rgba(0,0,0,.38); }
