/* Fab Guys — forms, wizard, dashboard, modals. Loaded after style.css */

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.field label.lbl { display: block; font-size: 13px; font-weight: 620; color: var(--navy); margin-bottom: 5px; }
.field .req { color: var(--red); margin-left: 2px; }
.field .help { font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.45; }
.field .err { font-size: 12px; color: var(--red); margin-top: 5px; font-weight: 550; display: none; }
.field.invalid .err { display: block; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--red); }

input[type=text], input[type=date], input[type=number], input[type=email], select, textarea {
  width: 100%; font: inherit; font-size: 14px; color: var(--ink);
  padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 15%, transparent);
}
textarea { resize: vertical; min-height: 92px; line-height: 1.5; }
input:disabled, select:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.counter { float: right; font-size: 11.5px; color: var(--faint); font-weight: 500; }
.counter.over { color: var(--red); }

.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opt {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 550; color: var(--muted);
  padding: 7px 13px; border: 1px solid var(--line); border-radius: 20px;
  cursor: pointer; user-select: none; background: var(--surface);
  transition: background .12s, border-color .12s, color .12s;
}
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt:hover { border-color: var(--faint); }
.opt:has(input:checked) { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); font-weight: 620; }
.opt:has(input:disabled) { opacity: .45; cursor: not-allowed; }

.switchrow {
  display: flex; align-items: flex-start; gap: 12px; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--line-soft);
}
.switchrow:last-child { border-bottom: 0; }
.switchrow-txt { min-width: 0; }
.switchrow-txt b { display: block; font-size: 14px; font-weight: 600; color: var(--navy); }
.switchrow-txt span { font-size: 12.5px; color: var(--muted); }
.sw { position: relative; flex: none; width: 42px; height: 24px; }
.sw input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.sw i { position: absolute; inset: 0; border-radius: 12px; background: var(--line); transition: background .16s; pointer-events: none; }
.sw i::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; transition: transform .16s; box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.sw input:checked + i { background: var(--blue); }
.sw input:checked + i::after { transform: translateX(18px); }

.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 9px; }
.photo-slot {
  position: relative; aspect-ratio: 3/4; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line);
}
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-slot .badge {
  position: absolute; top: 5px; left: 5px; font-size: 9.5px; font-weight: 700;
  letter-spacing: .04em; padding: 2px 5px; border-radius: 3px; color: #fff;
}
.badge.main { background: var(--blue); }
.badge.pending { background: var(--amber); }
.badge.private { background: var(--navy); }
.photo-slot .rm {
  position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; border: 0;
  border-radius: 50%; background: rgba(12,16,26,.7); color: #fff; cursor: pointer;
  font-size: 15px; line-height: 1; display: grid; place-items: center;
}
.photo-slot .lockbtn {
  position: absolute; bottom: 5px; right: 5px; border: 0; border-radius: 5px;
  background: rgba(12,16,26,.7); color: #fff; font-size: 10.5px; font-weight: 600;
  padding: 3px 7px; cursor: pointer;
}
.photo-add {
  aspect-ratio: 3/4; border: 1.5px dashed var(--line); border-radius: var(--radius-sm);
  background: var(--surface); display: flex; flex-direction: column; gap: 5px;
  align-items: center; justify-content: center; cursor: pointer; color: var(--muted);
  font-size: 12px; font-weight: 550; text-align: center; padding: 8px;
  transition: border-color .12s, color .12s, background .12s;
}
.photo-add:hover, .photo-add.drag { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }

.steps { display: flex; gap: 4px; margin-bottom: 22px; }
.step { flex: 1; min-width: 0; }
.step-bar { height: 4px; border-radius: 2px; background: var(--line); transition: background .2s; }
.step.done .step-bar, .step.on .step-bar { background: var(--blue); }
.step-lbl { font-size: 11.5px; font-weight: 600; color: var(--faint); margin-top: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step.on .step-lbl { color: var(--blue); }
.step.done .step-lbl { color: var(--muted); }
@media (max-width: 620px) { .step-lbl { display: none; } }

.panel { display: none; }
.panel.on { display: block; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.panel h2 { font-size: 21px; margin-bottom: 4px; }
.panel > p.lead { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.wizard-nav { display: flex; gap: 10px; align-items: center; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.wizard-nav .spacer { flex: 1; }

.dash { display: grid; grid-template-columns: 250px 1fr; gap: 22px; align-items: start; }
@media (max-width: 900px) { .dash { grid-template-columns: 1fr; } }
.sidenav { position: sticky; top: 76px; }
.sidenav a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 12px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 550; color: var(--muted);
}
.sidenav a:hover { background: var(--surface-2); text-decoration: none; color: var(--navy); }
.sidenav a[aria-current] { background: var(--blue-soft); color: var(--blue); font-weight: 640; }
.sidenav .n { font-size: 11.5px; font-weight: 700; background: var(--blue); color: #fff; border-radius: 9px; padding: 1px 7px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.tile b { display: block; font-size: 25px; font-weight: 700; color: var(--navy); letter-spacing: -.02em; line-height: 1.1; }
.tile span { font-size: 12.5px; color: var(--muted); }
.tile .delta { font-size: 11.5px; font-weight: 650; color: var(--green); }

.meter { height: 7px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--green)); transition: width .3s; }
.checklist { list-style: none; padding: 0; margin: 12px 0 0; }
.checklist li { display: flex; align-items: center; gap: 9px; padding: 6px 0; font-size: 13.5px; }
.checklist .tick { width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 10px; font-weight: 800; }
.checklist .tick.yes { background: var(--green); color: #fff; }
.checklist .tick.no { background: var(--surface-2); color: var(--faint); border: 1px solid var(--line); }
.checklist li.done span { color: var(--muted); text-decoration: line-through; }

.modal-back {
  position: fixed; inset: 0; z-index: 200; background: rgba(12,16,26,.55);
  display: flex; align-items: center; justify-content: center; padding: 18px;
  animation: fade .14s ease; backdrop-filter: blur(2px);
}
.modal {
  background: var(--surface); border-radius: var(--radius); width: 100%; max-width: 480px;
  max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow-lg); border: 1px solid var(--line);
}
.modal-hd { padding: 16px 18px 0; display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.modal-hd h3 { font-size: 17px; margin: 0; }
.modal-x { border: 0; background: transparent; font-size: 22px; line-height: 1; color: var(--faint); cursor: pointer; padding: 0 2px; }
.modal-bd { padding: 14px 18px 18px; }
.modal-ft { padding: 14px 18px; border-top: 1px solid var(--line); display: flex; gap: 9px; justify-content: flex-end; background: var(--surface-2); }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 300;
  background: var(--navy); color: #fff; font-size: 13.5px; font-weight: 550;
  padding: 11px 18px; border-radius: 22px; box-shadow: var(--shadow-lg); animation: rise .2s ease;
}
@media (prefers-color-scheme: dark) { .toast { background: #2a3446; } }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

.radio-list { display: flex; flex-direction: column; gap: 2px; }
.radio-list label {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; font-size: 13.5px;
}
.radio-list label:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.radio-list input { margin: 2px 0 0; flex: none; accent-color: var(--blue); }
.radio-list b { display: block; color: var(--navy); font-weight: 620; font-size: 13.5px; }
.radio-list span { color: var(--muted); font-size: 12.5px; }

.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); padding: 9px 0; }
.consent input { margin: 2px 0 0; flex: none; accent-color: var(--blue); width: 16px; height: 16px; }

.authorbox { display: flex; gap: 13px; align-items: center; }
.authorbox .ph {
  width: 52px; height: 52px; border-radius: 50%; flex: none;
  background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 17px;
}

/* ---- profile: gallery, lightbox, facts, openers ---- */
.fg-prof { display: grid; grid-template-columns: 320px 1fr; gap: 22px; align-items: start; }
@media (max-width: 760px) { .fg-prof { grid-template-columns: 1fr; } }
.fg-gallery { position: sticky; top: 76px; }
.fg-main {
  position: relative; display: block; width: 100%; aspect-ratio: 3/4; padding: 0; cursor: zoom-in;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface-2);
}
.fg-main.locked { cursor: default; }
.fg-main .fg-zoom {
  position: absolute; bottom: 10px; right: 10px; z-index: 2; width: 34px; height: 34px;
  display: grid; place-items: center; border-radius: 8px; font-size: 17px; color: #fff;
  background: rgba(12,16,26,.55); backdrop-filter: blur(4px);
}
.fg-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.fg-thumb {
  position: relative; aspect-ratio: 1; padding: 0; cursor: pointer; overflow: hidden;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2);
}
.fg-thumb.locked { cursor: default; }
.fg-thumb-lock { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(12,16,26,.4); }

.fg-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
@media (max-width: 480px) { .fg-facts { grid-template-columns: repeat(2, 1fr); } }
.fg-fact { background: var(--surface); padding: 11px 13px; }
.fg-fact span { display: block; font-size: 11.5px; color: var(--muted); }
.fg-fact b { font-size: 14.5px; color: var(--navy); font-weight: 640; }

.fg-openers { display: flex; flex-direction: column; gap: 8px; }
.fg-opener {
  text-align: left; font: inherit; font-size: 13.5px; color: var(--navy);
  padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); cursor: pointer; transition: background .12s, border-color .12s;
}
.fg-opener:hover { background: var(--blue-soft); border-color: var(--blue); }

.fg-lightbox {
  position: fixed; inset: 0; z-index: 400; background: rgba(8,11,18,.92);
  display: flex; align-items: center; justify-content: center; animation: fade .14s ease;
}
.fg-lb-stage { width: min(92vw, 620px); }
.fg-lb-photo { position: relative; aspect-ratio: 3/4; border-radius: 12px; overflow: hidden; box-shadow: 0 12px 60px rgba(0,0,0,.6); }
.fg-lb-close { position: fixed; top: 18px; right: 22px; font-size: 30px; line-height: 1; color: #fff; background: none; border: 0; cursor: pointer; }
.fg-lb-nav { position: fixed; top: 50%; transform: translateY(-50%); font-size: 44px; color: #fff; background: none; border: 0; cursor: pointer; padding: 0 18px; opacity: .8; }
.fg-lb-nav:hover { opacity: 1; }
.fg-lb-nav.prev { left: 2vw; } .fg-lb-nav.next { right: 2vw; }
.fg-lb-count { position: fixed; bottom: 20px; left: 0; right: 0; text-align: center; color: #fff; font-size: 13px; opacity: .85; }

/* ---- interests as categories ---- */
.chip-link { cursor: pointer; transition: background .12s, color .12s, border-color .12s; }
.chip-link:hover { background: var(--blue-soft); color: var(--blue); border-color: var(--blue); text-decoration: none; }
.fg-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.fg-cat {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--navy); font-weight: 600; font-size: 14px;
  transition: background .12s, border-color .12s;
}
.fg-cat:hover { background: var(--blue-soft); border-color: var(--blue); text-decoration: none; }
.fg-cat-n { font-size: 12px; font-weight: 700; color: #fff; background: var(--blue); border-radius: 9px; padding: 1px 8px; }

/* ---- homepage: free gay chat block ---- */
.fg-chat-promo {
  display: grid; grid-template-columns: 1.35fr .65fr; gap: 26px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 26px 28px; box-shadow: var(--shadow);
}
@media (max-width: 820px) { .fg-chat-promo { grid-template-columns: 1fr; gap: 20px; padding: 22px 20px; } }
.fg-chat-promo h2 { font-size: clamp(21px, 2.6vw, 27px); }
.fg-chat-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.fg-chat-points li {
  position: relative; padding-left: 26px; font-size: 14.5px; color: var(--muted); line-height: 1.5;
}
.fg-chat-points li b { color: var(--navy); font-weight: 620; }
.fg-chat-points li::before {
  content: '✓'; position: absolute; left: 0; top: 0;
  width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  background: var(--green); color: #fff; font-size: 11px; font-weight: 800;
}
.fg-price-card {
  background: var(--blue-soft); border-radius: 12px; padding: 20px 18px; text-align: center;
}
.fg-price { font-size: 44px; font-weight: 800; color: var(--blue); line-height: 1; letter-spacing: -.03em; }
.fg-price-sub { font-size: 13px; color: var(--muted); margin-top: 4px; font-weight: 600; }
.fg-price-table { width: 100%; margin-top: 16px; border-collapse: collapse; font-size: 13.5px; }
.fg-price-table td { padding: 7px 0; border-bottom: 1px solid color-mix(in srgb, var(--blue) 18%, transparent); text-align: left; color: var(--muted); }
.fg-price-table tr:last-child td { border-bottom: 0; }
.fg-price-table td:last-child { text-align: right; font-weight: 700; color: var(--navy); }

/* ---- guides ---- */
.fg-guide h1 { font-size: clamp(27px, 4vw, 38px); margin-bottom: 10px; }
.fg-byline { font-size: 13.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.fg-guide-hero { margin: 0 0 24px; }
.fg-guide-hero img { width: 100%; height: auto; border-radius: 14px; display: block; }
.fg-guide-body { font-size: 16.5px; line-height: 1.72; color: var(--ink); }
.fg-guide-body h2 { font-size: clamp(20px, 2.6vw, 26px); margin: 34px 0 12px; }
.fg-guide-body h3 { font-size: 17.5px; margin: 24px 0 8px; }
.fg-guide-body p, .fg-guide-body li { color: var(--ink); }
.fg-guide-body ul, .fg-guide-body ol { padding-left: 22px; margin: 0 0 18px; }
.fg-guide-body li { margin-bottom: 8px; }
.fg-guide-body .fg-answer {
  font-size: 17.5px; line-height: 1.62; background: var(--blue-soft);
  border-left: 4px solid var(--blue); border-radius: 0 10px 10px 0;
  padding: 16px 20px; margin: 0 0 22px;
}
.fg-guide-body table { width: 100%; border-collapse: collapse; margin: 0 0 22px; font-size: 14.5px; display: block; overflow-x: auto; }
.fg-guide-body thead th { text-align: left; background: var(--surface-2); color: var(--navy); font-weight: 650; padding: 10px 12px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.fg-guide-body td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.fg-figure-wrap { margin: 26px 0; }
.fg-figure-wrap img, .fg-figure { width: 100%; height: auto; border-radius: 12px; display: block; }
.fg-stats-block { margin: 24px 0; padding: 18px 20px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.fg-stats-block figcaption { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.fg-stat-sentence { font-size: 16px; color: var(--navy); margin: 0 0 6px; }
.fg-authorbox { margin-top: 30px; }
.fg-related { list-style: none; padding: 0; display: grid; gap: 8px; }
.fg-related a { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-weight: 550; }
.fg-related a:hover { background: var(--blue-soft); border-color: var(--blue); text-decoration: none; }

/* ---- add-to-home-screen banner ---- */
.fg-a2hs {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 500;
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 8px 32px rgba(24,32,52,.18);
  animation: rise .22s ease;
}
@media (min-width: 620px) { .fg-a2hs { left: auto; right: 20px; bottom: 20px; max-width: 400px; } }
.fg-a2hs-txt { flex: 1; min-width: 0; }
.fg-a2hs-txt b { display: block; font-size: 14px; color: var(--navy); font-weight: 640; }
.fg-a2hs-txt span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.fg-a2hs .btn { flex: none; }
.fg-a2hs-x {
  flex: none; border: 0; background: transparent; color: var(--faint);
  font-size: 22px; line-height: 1; cursor: pointer; padding: 0 2px; align-self: flex-start;
}

/* ---- /app/ install page ---- */
.fg-install { max-width: 760px; }
.fg-install .fg-answer { font-size: 17px; line-height: 1.6; background: var(--blue-soft);
  border-left: 4px solid var(--blue); border-radius: 0 10px 10px 0; padding: 16px 20px; margin: 0 0 26px; }
.fg-install-block { margin: 0 0 26px; padding: 20px 22px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface); }
.fg-install-block.is-primary { border-color: var(--blue); box-shadow: 0 2px 14px rgba(34,88,168,.10); order: -1; }
.fg-install-block.is-secondary { opacity: .74; }
.fg-install-block h2 { margin-top: 0; font-size: 19px; }
.fg-steps { counter-reset: s; list-style: none; padding: 0; margin: 14px 0 0; }
.fg-steps li { counter-increment: s; position: relative; padding: 0 0 0 38px; margin-bottom: 13px;
  font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.fg-steps li b { color: var(--navy); font-weight: 600; }
.fg-steps li::before { content: counter(s); position: absolute; left: 0; top: -1px;
  width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: #fff;
  display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.fg-install-url { font-size: 20px; font-weight: 700; color: var(--navy); letter-spacing: -.01em;
  background: var(--surface-2); padding: 12px 16px; border-radius: 10px; display: inline-block; }
.fg-install-qr { margin: 18px 0 0; }
.fg-install-qr img { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 8px; }
.fg-install table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 0 0 22px; }
.fg-install th { text-align: left; background: var(--surface-2); color: var(--navy); font-weight: 650;
  padding: 10px 12px; border-bottom: 2px solid var(--line); }
.fg-install td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
