: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%; }
