/* imagebath /start/: the first-ad flow. Centred, soft sky-and-peach glow, black pills, light modals. */
:root {
  --bg: #ffffff; --ink: #0d0d0d; --ink-2: #4b5257; --ink-3: #8a9196;
  --line: #e3e5e7; --soft: #f5f6f7; --btn: #0d0d0d; --btn-ink: #ffffff; --card: #ffffff;
  --glow-a: rgba(140, 205, 240, .45); --glow-b: rgba(255, 205, 170, .40);
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 16px 40px rgba(0,0,0,.10);
  --ok: #2b8a92; --bad: #b4232c; --scrim: rgba(250,250,250,.72);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121314; --ink: #f2f4f5; --ink-2: #bcc4c8; --ink-3: #848c91;
    --line: #2c3032; --soft: #1c1f20; --btn: #f2f4f5; --btn-ink: #0d0d0d; --card: #1a1c1d;
    --glow-a: rgba(40, 110, 150, .35); --glow-b: rgba(150, 90, 50, .28);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 16px 40px rgba(0,0,0,.45);
    --ok: #6cc6cd; --bad: #ff8a8f; --scrim: rgba(10,10,10,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121314; --ink: #f2f4f5; --ink-2: #bcc4c8; --ink-3: #848c91;
  --line: #2c3032; --soft: #1c1f20; --btn: #f2f4f5; --btn-ink: #0d0d0d; --card: #1a1c1d;
  --glow-a: rgba(40, 110, 150, .35); --glow-b: rgba(150, 90, 50, .28);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 16px 40px rgba(0,0,0,.45);
  --ok: #6cc6cd; --bad: #ff8a8f; --scrim: rgba(10,10,10,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--ink); font: 400 15px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; letter-spacing: -0.01em; -webkit-font-smoothing: antialiased; min-height: 100dvh; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
p, h1, h2 { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--ok); outline-offset: 2px; }
h1:focus { outline: none; }

.glow { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 50% at 15% 95%, var(--glow-a), transparent 70%), radial-gradient(55% 45% at 90% 92%, var(--glow-b), transparent 70%); }

.bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; font-size: 17px; letter-spacing: -0.02em; text-decoration: none; }
.pill { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; text-decoration: none; font-size: 14px; color: var(--ink-2); background: var(--bg); }
.pill:hover { color: var(--ink); }

main { padding: 0 16px 64px; }
.step { max-width: 520px; margin: clamp(32px, 11vh, 140px) auto 0; text-align: center; display: flex; flex-direction: column; align-items: center; }
.tile { width: 60px; height: 60px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); display: grid; place-items: center; color: #3b8fe6; margin-bottom: 28px; }
.step h1 { font-size: clamp(24px, 3.4vw, 30px); font-weight: 450; letter-spacing: -0.02em; line-height: 1.2; }
.sub { margin-top: 12px; color: var(--ink-2); max-width: 440px; }
.body { margin-top: 32px; max-width: 500px; }
.body.left { text-align: left; margin-top: 40px; }

.site-f { width: 100%; max-width: 320px; margin-top: 32px; display: grid; gap: 12px; }
.field { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 999px; padding: 0 16px; background: var(--card); color: var(--ink-2); }
.field input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; padding: 10px 0; font-size: 15px; color: var(--ink); }
.field:focus-within { border-color: var(--ink-3); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 20px; border-radius: 999px; background: var(--btn); color: var(--btn-ink); border: 1px solid var(--btn); cursor: pointer; font-size: 14px; font-weight: 500; text-decoration: none; }
.btn:hover { opacity: .88; }
.btn:disabled { opacity: .5; cursor: progress; }
.btn.wide { width: 100%; max-width: 320px; padding: 12px 20px; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.more { margin-top: 24px; font-size: 14px; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.err { margin-top: 16px; color: var(--bad); font-size: 14px; max-width: 420px; }

.work { list-style: none; padding: 0; margin: 24px 0 0; text-align: left; font-size: 14px; display: grid; gap: 8px; }
.work li { padding-left: 24px; position: relative; color: var(--ink-2); }
.work li::before { content: ""; position: absolute; left: 0; top: 4px; width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--line); }
.work li.on::before { border-color: var(--ok); border-right-color: transparent; animation: spin .8s linear infinite; }
.work li.done { color: var(--ink); }
.work li.done::before { background: var(--ok); border-color: var(--ok); }
.work li.bad { color: var(--bad); }
.work li.bad::before { border-color: var(--bad); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .work li.on::before { animation: none; } }

/* native ad card */
.ad-slot { width: 100%; max-width: 400px; margin: 32px 0 40px; }
.ad { display: flex; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-align: left; }
.ad img { width: 116px; height: 116px; object-fit: cover; flex: none; }
.ad-t { padding: 12px 14px 12px 16px; min-width: 0; flex: 1; }
.ad-by { display: flex; align-items: center; gap: 7px; font-size: 12px; margin-bottom: 8px; }
.ad-by b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 14px; height: 14px; border-radius: 50%; color: #fff; font-size: 8px; font-weight: 700; display: grid; place-items: center; flex: none; }
.tag { margin-left: auto; background: var(--soft); border-radius: 999px; padding: 1px 8px; font-size: 11px; color: var(--ink-2); }
.dots { color: var(--ink-3); letter-spacing: 1px; }
.ad-h { font-size: 14px; font-weight: 500; }
.ad-p { font-size: 14px; color: var(--ink-2); line-height: 1.45; }

.ad-wrap, .det-wrap { width: 100%; max-width: 508px; display: flex; flex-direction: column; align-items: center; }
.ad-wrap { margin-top: 36px; max-width: 344px; }
.ad-wrap .ad-slot { margin: 8px 0 0; }
.edit { align-self: flex-end; display: inline-flex; gap: 5px; align-items: center; background: none; border: 0; color: var(--ink-3); font-size: 14px; cursor: pointer; padding: 4px 2px; }
.edit:hover { color: var(--ink); }
.det-wrap { margin: 20px 0 40px; }
.det { width: 100%; margin: 8px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; text-align: left; border: 1px solid var(--line); border-radius: 14px; padding: 18px 18px; background: color-mix(in srgb, var(--card) 80%, transparent); }
.det dt { font-size: 14px; }
.det dd { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; overflow-wrap: anywhere; }
@media (max-width: 420px) { .det { grid-template-columns: 1fr; } .ad img { width: 96px; height: 96px; } }
.fine { margin-top: 16px; color: var(--ink-2); font-size: 13px; max-width: 420px; }
.fine a { text-underline-offset: 2px; }

/* dialogs */
.dlg { border: 0; padding: 0; border-radius: 16px; width: min(640px, calc(100% - 32px)); max-height: calc(100dvh - 32px); background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.dlg::backdrop { background: var(--scrim); backdrop-filter: blur(3px); }
.dlg-in { padding: 24px; display: flex; flex-direction: column; }
.dlg-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.dlg-top h2 { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; }
.x { background: none; border: 0; cursor: pointer; color: var(--ink-2); padding: 6px; border-radius: 8px; }
.x:hover { background: var(--soft); }
.lab { font-size: 14px; font-weight: 500; margin: 16px 0 8px; display: block; }
.lab:first-of-type { margin-top: 0; }
.hint { font-size: 12px; color: var(--ink-2); margin-top: 6px; line-height: 1.45; }
.hint.side { margin: 0; align-self: center; }
.dlg input, .dlg select { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--card); font-size: 15px; }
.dlg select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a9196' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.cnt { position: relative; }
.cnt input { padding-right: 64px; }
.cnt span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--ink-3); }
.alts { display: grid; gap: 8px; }
.alt { text-align: left; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: none; cursor: pointer; display: grid; gap: 2px; font-size: 13px; }
.alt b { font-weight: 500; }
.alt span { color: var(--ink-2); }
.alt:hover { border-color: var(--ink-3); }
.pics { display: flex; gap: 10px; flex-wrap: wrap; }
.pic { padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden; cursor: pointer; background: none; }
.pic img { width: 76px; height: 76px; object-fit: cover; }
.pic.on { border-color: var(--ink); }
.search { position: relative; color: var(--ink-3); }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); }
.search input { padding-left: 36px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--ink); border-radius: 999px; padding: 4px 8px 4px 12px; font-size: 14px; }
.chip button { background: none; border: 0; padding: 2px; cursor: pointer; color: var(--ink-2); display: grid; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .two { grid-template-columns: 1fr; } }
.money { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; color: var(--ink-2); }
.money input { border: 0 !important; padding: 10px 0 !important; color: var(--ink); min-width: 0; }
.money input:focus { outline: none; }
.money:focus-within { outline: 2px solid var(--ok); outline-offset: 1px; }
.money.cap { margin-top: 10px; max-width: 280px; }
.url { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.url span { padding: 10px 0 10px 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60%; }
.url input { border: 0 !important; border-radius: 0 !important; padding-left: 2px !important; }
.dlg-b { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.dlg-b .btn { padding: 12px; font-size: 15px; }
