:root {
  --bg: #1b1f23;
  --card: #24292e;
  --text: #e8eaed;
  --muted: #9aa0a6;
  --green: #467031;
  --purple: #8244cb;
  --line: #3a4048;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
main { max-width: 960px; margin: 0 auto; padding: 32px 20px; }
.banner { margin-bottom: 24px; position: relative; overflow: hidden; border-radius: 12px; border: 1px solid var(--line);
  background: linear-gradient(135deg, #2a1416 0%, #1b1f23 60%); padding: 22px 24px 0; }
.banner .kicker { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #ffd166; }
.banner .live { background: #d62828; color: #fff; padding: 2px 7px; border-radius: 3px; margin-right: 8px; letter-spacing: 0.08em; }
.banner h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 700;
  font-size: clamp(26px, 4.6vw, 42px); line-height: 1.15; letter-spacing: -0.01em; }
.banner .sub { margin: 6px 0 18px; font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: clamp(20px, 3.2vw, 28px); color: #f4a261; }
.banner .sub em { font-style: italic; text-decoration: underline wavy rgba(244, 162, 97, 0.6); text-underline-offset: 5px; }
.chyron { margin: 0 -24px; background: #d62828; color: #fff; font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; }
.ticker { display: inline-flex; padding: 8px 0; animation: ticker 38s linear infinite; will-change: transform; }
.ticker span { padding-right: 48px; }
.ticker span::before { content: "▸ "; opacity: 0.8; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.maker {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}
@media (max-width: 720px) { .maker { grid-template-columns: 1fr; } }
.preview-wrap { text-align: center; }
#preview {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1;
  border-radius: 50%;
  touch-action: none;
  cursor: grab;
  box-shadow: 0 0 0 4px var(--card), 0 0 0 5px var(--line);
}
#preview:active { cursor: grabbing; }
.controls { display: flex; flex-direction: column; gap: 16px; }
button {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
}
button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
button { background: var(--green); color: #fff; }
button:disabled { opacity: 0.4; cursor: not-allowed; }
.zoom { display: flex; align-items: center; gap: 12px; }
.zoom input { flex: 1; accent-color: var(--green); }
.small { font-size: 13px; color: var(--muted); margin: 0; }
.privacy { border-left: 3px solid var(--green); padding-left: 10px; }
footer { margin-top: 28px; text-align: center; }
footer .credit { margin-top: 6px; }
footer .credit a { color: inherit; text-underline-offset: 2px; }
footer .credit a:hover { color: #fff; }
footer .byline { color: #c9ced3; }
button.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); align-self: flex-start; }
dialog {
  width: min(520px, calc(100vw - 32px));
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
}
dialog::backdrop {
  background: rgba(10, 12, 14, 0.55);
  backdrop-filter: blur(18px) saturate(0.6);
  -webkit-backdrop-filter: blur(18px) saturate(0.6);
}
body.locked main { filter: blur(14px) grayscale(0.4); pointer-events: none; user-select: none; }
body.locked .dialog-close { display: none; }
dialog h2 { margin: 0 0 18px; font-size: 20px; padding-right: 30px; }
dialog.busy { cursor: progress; }
dialog.busy .drop, dialog.busy .link-form { opacity: 0.5; pointer-events: none; }
.dialog-close { position: absolute; top: 12px; right: 12px; }
.x { background: transparent; color: var(--muted); font-size: 24px; line-height: 1; padding: 4px 10px; }
.drop {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border: 2px dashed var(--line); border-radius: 10px; padding: 22px; cursor: pointer; text-align: center;
}
.drop.over, .drop:hover { border-color: #0a66c2; }
.drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.drop:focus-within { outline: 2px solid #fff; outline-offset: 2px; }
.drop-main { background: #0a66c2; color: #fff; font-weight: 600; padding: 10px 18px; border-radius: 999px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); margin: 18px 0; font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.link-form label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; }
.link-form .row { display: flex; gap: 8px; }
.link-form input {
  flex: 1; min-width: 0; font: inherit; font-size: 14px; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px;
}
.link-form .small { margin-top: 6px; }
.error { color: #ff9b9b; background: #3a1f22; border-radius: 8px; padding: 10px 12px; margin: 16px 0 0; font-size: 14px; }
dialog .privacy { margin-top: 16px; }
.status { color: var(--muted); margin: 16px 0 0; font-size: 14px; }
.link-form { position: relative; transition: margin-top 0.3s ease; }
.link-form.nudged { margin-top: 18px; }
.nudge-arrow { position: absolute; right: 0; top: -46px; width: 160px; height: 60px; pointer-events: none; opacity: 0; overflow: visible; }
.nudge-arrow path { fill: none; stroke: #f5c518; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.nudge-caption { position: absolute; right: 2px; top: -66px; font-size: 13px; font-style: italic; color: #f5c518; opacity: 0; pointer-events: none; white-space: nowrap; }
.link-form.nudged .nudge-arrow { opacity: 1; }
.link-form.nudged .nudge-arrow .shaft { animation: draw-line 0.8s ease-out forwards; }
.link-form.nudged .nudge-arrow .head { animation: draw-line 0.25s ease-out 0.75s forwards; }
.link-form.nudged .nudge-caption { animation: fade-in 0.4s ease-out 0.9s forwards; }
.link-form.nudged label { animation: gentle-flash 1.2s ease-in-out 3; }
@keyframes draw-line { to { stroke-dashoffset: 0; } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes gentle-flash {
  0%, 100% { color: inherit; text-shadow: none; }
  50% { color: #f5c518; text-shadow: 0 0 12px rgba(245, 197, 24, 0.55); }
}
@media (prefers-reduced-motion: reduce) {
  .link-form.nudged .nudge-arrow path { animation: none; stroke-dashoffset: 0; }
  .link-form.nudged .nudge-caption { animation: none; opacity: 1; }
  .link-form.nudged label { animation: none; color: #f5c518; }
}

/* fake "hot singles" skyscraper, right margin on wide screens only */
main { position: relative; }
.sky-sky { display: block; margin: 24px auto 0; max-width: 560px;
  background: #fff4f9; color: #2b0a1a; border: 3px solid #ff2d87; border-radius: 4px; padding: 8px 10px 12px;
  font-family: Verdana, Tahoma, sans-serif; box-shadow: 0 0 0 3px #ffe600, 0 6px 18px rgba(0,0,0,.45); }
.sky-sky[hidden] { display: none; }
@media (min-width: 1360px) {
  .sky-sky { position: absolute; top: 160px; left: calc(100% + 12px); width: 176px; margin: 0; }
}
/* narrow screens: same ad as a short banner under the maker */
@media (max-width: 1359px) {
  .sky-body { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "pic lonely cta" "pic hook cta" "pic list cta";
    align-items: center; column-gap: 12px; text-align: left; }
  .sky-chat { grid-area: pic; width: 200px; margin: 0; }
  .sky-lonely { grid-area: lonely; margin: 0; font-size: 28px; line-height: 1; }
  .sky-hook { grid-area: hook; margin: 2px 0; }
  .sky-h { display: none; }
  .sky-list { grid-area: list; margin: 0; padding: 0; list-style: none; font-size: 11px; }
  .sky-list li { display: inline; }
  .sky-list li + li::before { content: " ·  "; }
  .sky-cta { grid-area: cta; }
  .sky-top { height: 18px; }
}
@media (max-width: 640px) {
  .sky-body { grid-template-columns: auto 1fr; grid-template-areas: "lonely ." "pic hook" "pic list" "cta ."; column-gap: 16px; }
  .sky-chat { margin: 8px 0; }
  .sky-lonely, .sky-cta { justify-self: center; }
  .sky-hook { align-self: end; }
}
@media (max-width: 480px) {
  .sky-body { grid-template-columns: 1fr; grid-template-areas: "lonely" "hook" "pic" "list" "cta"; text-align: center; }
  .sky-chat { width: auto; margin: 6px 0 0; }
  .sky-list { margin: 6px 0 8px; }
  .sky-cta { justify-self: center; }
}
.sky-top { display: flex; justify-content: space-between; align-items: flex-start; height: 22px; }
.sky-label { font-size: 10px; font-weight: 700; color: #777; border: 1px solid #aaa; padding: 0 4px; border-radius: 2px; }
.sky-x { position: relative; z-index: 2; background: #fff; color: #555; border: 1px solid #bbb; border-radius: 50%; width: 20px; height: 20px; padding: 0;
  font-size: 15px; line-height: 17px; cursor: pointer; transition: transform 110ms ease-out; }
.sky-x:hover { color: #000; }
.sky-body { text-align: center; }
.sky-body[hidden] { display: none; }
.sky-lonely { margin: 4px 0 0; font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: 34px;
  letter-spacing: 1px; color: #ff2d87; text-shadow: 2px 2px 0 #ffe600; animation: sky-pulse 1.1s steps(2) infinite; }
.sky-hook { margin: 2px 0 8px; font-weight: 700; font-size: 15px; line-height: 1.25; }
.sky-chat { background: #fff; border: 1px solid #f3b6cf; border-radius: 10px; padding: 8px; margin: 0 0 10px; text-align: left; }
.sky-chat-head { display: flex; gap: 8px; align-items: center; font-size: 12px; line-height: 1.3; }
.sky-chat-av { width: 40px; height: 40px; flex: none; }
.sky-dot { color: #2ecc40; font-style: normal; }
.sky-bubble { margin: 8px 0 0; background: #ffe3ef; border-radius: 10px 10px 10px 2px; padding: 6px 8px; font-size: 12px; line-height: 1.35; }
.sky-sil-bg { fill: #ffc2dc; }
.sky-sil-fg { fill: #7a1f4a; }
.sky-h { margin: 0; font-weight: 700; font-size: 13px; text-align: left; }
.sky-list { margin: 2px 0 12px; padding-left: 16px; text-align: left; font-size: 12px; line-height: 1.35; }
.sky-cta { background: #ffe600; color: #c4005c; border: 2px solid #c4005c; border-radius: 3px; padding: 6px 10px;
  font: 700 15px Impact, Haettenschweiler, sans-serif; letter-spacing: 1px; cursor: pointer; animation: sky-pulse 0.9s steps(2) infinite; }
.sky-roast { margin: 10px 0 4px; font-weight: 700; font-size: 14px; line-height: 1.35; color: #c4005c; text-align: center; }
@keyframes sky-pulse { 50% { opacity: 0.55; } }
/* skyscraper is only 176px wide, shrink the chat header so "1 new message" fits on one line */
@media (min-width: 1360px) {
  .sky-chat { padding: 6px; }
  .sky-chat-head { gap: 6px; font-size: 11px; }
  .sky-chat-av { width: 28px; height: 28px; }
}
