:root {
  --paper: #fafafa;
  --surface: #ffffff;
  --ink: #141414;
  --ink-2: #3a3a3a;
  --ink-soft: #626262;
  --faint: #c9c9c9;
  --line: #e3e3e3;
  --line-strong: #c4c4c4;
  --fill: #f0f0f0;
  --fill-strong: #e5e5e5;
  --accent: #0f3d2e;
  --on-accent: #ffffff;
  --error: #b3261e;
  --shade: rgba(0, 0, 0, 0.12);
  --f-sans:
    system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  --f-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f0f0f;
    --surface: #181818;
    --ink: #f1f1f1;
    --ink-2: #d2d2d2;
    --ink-soft: #a3a3a3;
    --faint: #3d3d3d;
    --line: #2c2c2c;
    --line-strong: #4a4a4a;
    --fill: #222222;
    --fill-strong: #2e2e2e;
    --accent: #cfe7c7;
    --on-accent: #0f3d2e;
    --error: #f2b8b5;
    --shade: rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f0f0f;
  --surface: #181818;
  --ink: #f1f1f1;
  --ink-2: #d2d2d2;
  --ink-soft: #a3a3a3;
  --faint: #3d3d3d;
  --line: #2c2c2c;
  --line-strong: #4a4a4a;
  --fill: #222222;
  --fill-strong: #2e2e2e;
  --accent: #cfe7c7;
  --on-accent: #0f3d2e;
  --error: #f2b8b5;
  --shade: rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--surface);
}
a {
  color: inherit;
}
button {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2.5px solid var(--ink);
  outline-offset: 2px;
  border-radius: 4px;
}
h1,
h2,
h3 {
  text-wrap: balance;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 900px) {
  .wrap {
    padding-left: max(24px, env(safe-area-inset-left, 0px));
    padding-right: max(24px, env(safe-area-inset-right, 0px));
  }
}
.measure {
  max-width: 1320px;
  margin-inline: auto;
}
.measure-narrow {
  max-width: 960px;
  margin-inline: auto;
}

/* Top bar */
.top {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.top .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding-block: 10px;
}
.brand {
  order: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex: none;
}
.mark {
  width: 28px;
  height: 28px;
  flex: none;
  clip-path: inset(0 round 24%);
  display: block;
}
.brand-name {
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
}
.top-actions {
  order: 2;
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
}
.search {
  order: 3;
  flex: 1 1 100%;
  display: flex;
  min-width: 0;
}
.search input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 999px 0 0 999px;
  padding: 8px 16px;
  height: 42px;
}
.search input::placeholder {
  color: var(--ink-soft);
}
.search input:focus {
  outline: none;
  border-color: var(--ink-soft);
}
.search button {
  flex: none;
  width: 56px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 0 999px 999px 0;
  background: var(--fill);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.search button:hover {
  background: var(--fill-strong);
}
@media (min-width: 900px) {
  .search {
    order: 2;
    flex: 0 1 640px;
    margin-inline: auto;
  }
  .top-actions {
    order: 3;
    margin-left: 0;
  }
}

/* Menus: the avatar menu and each tile's three-dot menu */
.me {
  position: relative;
  flex: none;
}
.me-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--fill-strong);
  color: var(--ink-soft);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.me-btn:hover,
.me-btn[aria-expanded="true"] {
  color: var(--ink);
  border-color: var(--ink-soft);
}
.me-btn.is-in,
.av.av-me,
.menu-head .av.av-me {
  background: var(--ink-soft);
  border-color: var(--ink-soft);
  color: var(--surface);
  font-weight: 700;
  font-size: 16px;
}
.me-btn.is-in:hover,
.me-btn.is-in[aria-expanded="true"] {
  color: var(--surface);
  filter: brightness(1.1);
}
.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  width: min(300px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px 0;
  box-shadow: 0 16px 40px -16px var(--shade);
}
.menu.pop {
  position: fixed;
  right: auto;
  top: 0;
  left: 0;
  z-index: 40;
  width: auto;
  min-width: 220px;
  max-width: min(320px, calc(100vw - 16px));
}
.menu-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 16px 12px;
}
.menu-head .av {
  width: 40px;
  height: 40px;
  color: var(--ink-soft);
}
.menu-head > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.menu-head b {
  display: block;
  font-size: 15.5px;
}
.menu-head small {
  display: block;
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.35;
  margin-top: 2px;
}
.menu hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 6px 0;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 9px 16px;
  border: 0;
  background: none;
  text-align: left;
  font-size: 15px;
  text-decoration: none;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}
.menu-item:hover,
.menu-item:focus-visible {
  background: var(--fill);
  outline: none;
}
.menu-item svg {
  color: var(--ink-soft);
  flex: none;
}
.menu-item .bm-ic path {
  fill: none;
}
.menu-item[aria-checked="true"] .bm-ic path {
  fill: currentColor;
}
.menu-item[aria-checked="true"] .bm-ic {
  color: var(--ink);
}
.switch {
  margin-left: auto;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: var(--fill-strong);
  position: relative;
  flex: none;
  border: 1px solid var(--line);
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ink-soft);
  transition: transform 0.15s;
}
[aria-checked="true"] .switch {
  background: var(--accent);
  border-color: var(--accent);
}
[aria-checked="true"] .switch::after {
  transform: translateX(14px);
  background: var(--on-accent);
}
.menu-fine {
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
  padding: 2px 8px 4px;
}
.menu-fine .menu-item {
  width: auto;
  padding: 6px 8px;
  font-size: 13px;
  color: var(--ink-soft);
  border-radius: 6px;
}

main {
  outline: none;
  min-height: 60vh;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15.5px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
.btn:hover {
  background: var(--fill);
}
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent);
  filter: brightness(1.15);
}
.btn.btn-submit {
  min-height: 40px;
  padding: 7px 16px;
  font-size: 15px;
}
@media (max-width: 639px) {
  .btn.btn-submit .plus {
    display: none;
  }
  .btn.btn-submit {
    padding: 6px 14px;
    font-size: 14.5px;
    min-height: 38px;
  }
}
.btn .bm-ic path {
  fill: none;
}
.btn[aria-pressed="true"] {
  background: var(--fill);
}
.btn[aria-pressed="true"] .bm-ic path {
  fill: currentColor;
}
.linkbtn {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  font-size: 14.5px;
}
.linkbtn:hover {
  color: var(--ink);
}

/* Filter chips */
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-left: calc(-1 * max(16px, env(safe-area-inset-left, 0px)));
  margin-right: calc(-1 * max(16px, env(safe-area-inset-right, 0px)));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 10px;
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + var(--top-h, 62px));
  z-index: 9;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 900px) {
  .chips {
    margin-left: calc(-1 * max(24px, env(safe-area-inset-left, 0px)));
    margin-right: calc(-1 * max(24px, env(safe-area-inset-right, 0px)));
    padding-left: max(24px, env(safe-area-inset-left, 0px));
    padding-right: max(24px, env(safe-area-inset-right, 0px));
  }
}
.chips::-webkit-scrollbar {
  display: none;
}
.chip {
  flex: none;
  white-space: nowrap;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 9px;
  border: 0;
  background: var(--fill);
  color: var(--ink);
}
.chip:hover {
  background: var(--fill-strong);
}
.chip[aria-pressed="true"] {
  background: var(--accent);
  color: var(--on-accent);
}
.chip-note {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 14.5px;
}
.end-line {
  margin: 0;
  padding-block: 4px 48px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
}

/* Ranked grid of tiles */
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  padding-block: 18px 32px;
}
@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 20px;
  }
}
@media (min-width: 1200px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px 24px;
  }
}
@media (min-width: 1700px) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 34px 26px;
  }
}
.empty {
  padding: 56px 20px 64px;
  color: var(--ink-soft);
  text-align: center;
  margin-block: 8px 24px;
  font-size: 16px;
}

/* Tile: everything about one creation lives inside this one block; nothing sits on the picture */
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  transition: box-shadow 0.15s;
}
.tile:hover {
  box-shadow: 0 10px 28px -18px var(--shade);
}
.pv {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  max-width: 100%;
  overflow: hidden;
  text-decoration: none;
  background: var(--fill);
}
.tile .pv {
  border-bottom: 1px solid var(--line);
}
.pv-mono {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 84px;
  font-weight: 600;
  color: var(--faint);
  line-height: 1;
}
.pv-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.auto-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 12px;
  line-height: 1.3;
  background: var(--surface);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 6px;
}
.tile-body {
  display: grid;
  gap: 4px;
  padding: 13px 8px 16px 16px;
  min-width: 0;
}
.tile-head {
  display: flex;
  align-items: flex-start;
  gap: 4px;
}
.tile-title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.tile-link {
  text-decoration: none;
}
.tile-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--r);
}
.tile-link:focus-visible {
  outline: none;
}
.tile-link:focus-visible::after {
  outline: 2.5px solid var(--ink);
  outline-offset: -3px;
}
.kebab {
  position: relative;
  z-index: 2;
  flex: none;
  width: 36px;
  height: 36px;
  margin-top: -6px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.kebab:hover,
.kebab[aria-expanded="true"] {
  background: var(--fill);
}
.tile-line {
  margin: 0;
  padding-right: 8px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.meta {
  margin: 2px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
}
.title-ic {
  display: inline-flex;
  vertical-align: -1px;
  position: relative;
  z-index: 2;
  color: var(--ink-soft);
}
.meta-ic {
  display: inline-flex;
  vertical-align: -2px;
  margin-left: 8px;
  position: relative;
  z-index: 2;
  color: var(--ink-soft);
  cursor: help;
}

/* Avatars (detail, hunter and menu only) */
.av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  color: var(--ink);
  background: var(--fill-strong);
}
.av-none {
  background: transparent;
  border: 1px dashed var(--ink-soft);
  color: var(--ink-soft);
}

/* Detail */
.detail {
  padding-block: 14px 48px;
}
.back {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  text-decoration: none;
  font-weight: 500;
  padding: 6px 0;
  margin-bottom: 10px;
  color: var(--ink-soft);
}
.back:hover {
  color: var(--ink);
}
.spread {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 900px) {
  .spread {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 44px;
    align-items: start;
  }
}
.pv.big {
  border-radius: 14px;
  border: 1px solid var(--line);
}
.pv.big .pv-mono {
  font-size: 140px;
}
.d-title {
  font-weight: 700;
  font-size: clamp(30px, 4.6vw, 44px);
  line-height: 1.1;
  margin: 4px 0 8px;
  letter-spacing: -0.02em;
}
.d-line {
  font-size: 18px;
  color: var(--ink-2);
  margin: 0;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.block {
  margin-top: 24px;
  border-top: 1px solid var(--line);
}
.label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 16px 0 10px;
}
.expect {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 9px;
}
.expect li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.expect svg {
  margin-top: 3px;
  color: var(--ink-soft);
}
.credit-grid {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 12px 18px;
  margin: 0;
  align-items: center;
}
.credit-grid dt {
  color: var(--ink-soft);
}
.credit-grid dd {
  margin: 0;
  min-width: 0;
}
.who {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
}
a.who:hover .who-name {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.who-sub {
  display: block;
  font-weight: 400;
  font-size: 14px;
  color: var(--ink-soft);
}
.why {
  margin: 16px 0 0;
  padding: 10px 16px;
  border-left: 3px solid var(--line);
  font-size: 17px;
  line-height: 1.4;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.why-by {
  display: block;
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-top: 4px;
}
.rewrite {
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 14.5px;
  max-width: 54ch;
}
.fine {
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  font-size: 14.5px;
  color: var(--ink-soft);
}
.lede {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 16px;
  max-width: 48ch;
}

/* Submit dialog: link, details, thank you */
html.modal-open {
  overflow: hidden;
}
dialog.dlg {
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  width: min(560px, calc(100vw - 48px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  overflow: hidden;
  box-shadow: 0 28px 70px -24px rgba(0, 0, 0, 0.45);
}
dialog.dlg-submit[data-step="details"] {
  width: min(1000px, calc(100vw - 48px));
}
dialog.dlg-submit[data-step="sent"] {
  width: min(900px, calc(100vw - 48px));
}
dialog.dlg::backdrop {
  background: rgba(0, 0, 0, 0.55);
}
.dlg-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 48px);
}
.dlg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px 12px 24px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.dlg-head h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
}
.dlg-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: none;
}
.dlg-close:hover {
  background: var(--fill);
}
.dlg-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 24px 26px;
}
@media (max-width: 640px) {
  dialog.dlg-submit,
  dialog.dlg-submit[data-step] {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }
  .dlg-submit .dlg-panel {
    height: 100%;
    max-height: 100dvh;
  }
  .dlg-submit .dlg-head {
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(8px, env(safe-area-inset-right, 0px));
  }
  .dlg-submit .dlg-body {
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    padding-bottom: calc(26px + env(safe-area-inset-bottom, 0px));
  }
}
.confetti {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

form.submit-form {
  display: grid;
  gap: 8px;
}
.ofield {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 8px 14px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
}
.ofield:focus-within {
  border-color: var(--ink-soft);
  box-shadow: 0 0 0 3px var(--fill-strong);
}
.ofield label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
}
.req {
  font-weight: 400;
  color: var(--ink-soft);
}
.ofield input,
.ofield textarea {
  width: 100%;
  border: 0;
  padding: 2px 0;
  margin: 0;
  font: inherit;
  font-size: 16.5px;
  color: var(--ink);
  background: transparent;
  outline: none;
  resize: none;
}
.ofield input::placeholder,
.ofield textarea::placeholder {
  color: var(--ink-soft);
}
.ofield input[type="url"] {
  font-family: var(--f-mono);
  font-size: 15px;
}
.ofield textarea {
  min-height: 9.2em;
  line-height: 1.45;
}
.ofield.has-count {
  padding-bottom: 26px;
}
.ofield .counter {
  position: absolute;
  right: 12px;
  bottom: 7px;
  font-size: 12.5px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.ofield[aria-invalid="true"],
[aria-invalid="true"] {
  border-color: var(--error) !important;
}
.ofield.mine {
  gap: 8px;
  padding-bottom: 12px;
}
.mine-h {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
}
.mine-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}
.mine-opt {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 15.5px;
  cursor: pointer;
}
.ofield .mine-opt input {
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.field-note {
  margin: 0 0 6px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.err {
  margin: 0;
  color: var(--error);
  font-size: 14.5px;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  margin-top: 12px;
}
.agree {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.agree .linkbtn {
  font-size: inherit;
}
.link-sum {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin: 0 0 6px;
  font-size: 14.5px;
  color: var(--ink-soft);
}
.link-sum code {
  font-family: var(--f-mono);
  font-size: 14px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.details-grid {
  display: grid;
  gap: 22px;
}
@media (min-width: 860px) {
  .details-grid {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 32px;
    align-items: start;
  }
  .details-side {
    order: 2;
    position: sticky;
    top: 0;
  }
}
.sec-h {
  margin: 16px 0 2px;
  font-size: 16px;
  font-weight: 700;
}
.sec-help {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--ink-soft);
}
.pic-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.opt-tile {
  position: relative;
  flex: none;
  width: 160px;
  height: 100px;
  overflow: hidden;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 8px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  line-height: 1.25;
}
.opt-tile:hover {
  border-color: var(--ink-soft);
}
.opt-tile.is-on {
  background: var(--fill-strong);
  border-color: var(--ink-soft);
}
.opt-tile:focus-within,
.opt-tile:focus-visible {
  outline: 2.5px solid var(--ink);
  outline-offset: 2px;
}
.opt-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.opt-tile.has-img .opt-ic {
  display: none;
}
.opt-tile.has-img .opt-cap {
  position: relative;
  z-index: 1;
  background: var(--surface);
  padding: 2px 8px;
  border-radius: 6px;
}
.opt-tile.is-over {
  border-color: var(--ink);
  background: var(--fill);
}
.page-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.ppick {
  position: relative;
  width: 96px;
  height: 54px;
  flex: none;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: var(--fill);
}
.ppick[aria-pressed="true"] {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px var(--ink);
}

.thanks {
  margin: 0 0 16px;
  font-size: clamp(26px, 4vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.thanks:focus {
  outline: none;
}
.sent-grid {
  display: grid;
  gap: 22px;
}
@media (min-width: 760px) {
  .sent-grid {
    grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
    gap: 30px;
    align-items: start;
  }
}
.sent-left {
  display: grid;
  gap: 12px;
}
.sent-right {
  display: grid;
  gap: 18px;
  align-content: start;
}
.status {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0;
  font-size: 14.5px;
  font-weight: 500;
}
.ring {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink);
  flex: none;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}
.link-row {
  display: grid;
  gap: 6px;
}
.link-row > label {
  font-weight: 600;
  font-size: 15px;
}
.link-box {
  display: flex;
  gap: 8px;
}
.link-box input {
  flex: 1;
  min-width: 0;
  font-family: var(--f-mono);
  font-size: 14.5px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
.help {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}
.account {
  display: grid;
  gap: 10px;
  justify-items: start;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.account p {
  margin: 0;
  font-size: 15px;
}
.sent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

/* Account dialog: email, check your email, then name and handle on the first sign-in */
dialog.dlg-auth {
  width: min(460px, calc(100vw - 32px));
}
.auth-addr {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.auth-addr:focus {
  outline: none;
}
.auth-line {
  margin: 4px 0 18px;
  color: var(--ink-2);
}
.auth-alt {
  margin: 0;
}
.handle-url {
  font-family: var(--f-mono);
  font-size: 13px;
  overflow-wrap: anywhere;
}

/* Hunter */
.page-h {
  font-weight: 700;
  font-size: clamp(28px, 4.4vw, 40px);
  line-height: 1.1;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.hunter {
  padding-block: 26px 48px;
}
.hunter-head {
  display: flex;
  gap: 16px;
  align-items: center;
}
.hunter-head .av {
  width: 64px;
  height: 64px;
  font-size: 28px;
}
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 2px;
}
.hunter-head .page-h {
  margin: 0;
}
.hunter-head > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.since {
  margin: 2px 0 0;
  color: var(--ink-soft);
}
.credit-line {
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 600;
  line-height: 1.25;
  margin: 22px 0 6px;
}
.credit-aside {
  margin: 0 0 22px;
  color: var(--ink-soft);
}
.finds {
  list-style: none;
  margin: 0;
  padding: 0;
}
.find {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 6px 16px;
  padding-block: 16px;
  border-top: 1px solid var(--line);
  align-items: center;
}
.find:last-child {
  border-bottom: 1px solid var(--line);
}
.find .pv {
  border-radius: 8px;
  border: 1px solid var(--line);
}
.find .pv .pv-mono {
  font-size: 30px;
}
.find-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.find-title {
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
  line-height: 1.25;
}
.find-title:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.find-line {
  font-size: 15.5px;
  color: var(--ink-2);
}
.find-sub {
  font-size: 14px;
  color: var(--ink-soft);
}
@media (min-width: 640px) {
  .find {
    grid-template-columns: 176px minmax(0, 1fr);
    gap: 0 20px;
  }
  .find .pv .pv-mono {
    font-size: 48px;
  }
}
.badges {
  margin-top: 22px;
}
.badge-row {
  display: flex;
  gap: 10px;
}
.badge-slot {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px dashed var(--line-strong);
  background: var(--surface);
}
.ptabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0 14px;
}
.ptab {
  display: grid;
  gap: 2px;
  justify-items: center;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  text-decoration: none;
}
.ptab b {
  font-size: 22px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.ptab span {
  font-size: 13.5px;
  color: var(--ink-soft);
}
.ptab:hover {
  background: var(--fill);
}
.ptab[aria-current="true"] {
  border-color: var(--ink);
  background: var(--fill);
}

/* Player: the creation fills the screen; a small helper bar floats over it */
html.mode-player {
  overflow: hidden;
}
html.mode-player .top {
  display: none;
}
.player {
  background: var(--paper);
}
.player-frame {
  display: block;
  width: 100%;
  border: 0;
  background: var(--paper);
  height: calc(
    100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)
  );
}
.helper {
  position: fixed;
  z-index: 15;
  right: calc(12px + env(safe-area-inset-right, 0px));
  top: 50%;
  transform: translateY(-50%);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
@media (max-width: 640px) {
  .helper {
    top: auto;
    transform: none;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
}
.helper.is-placed {
  right: auto;
  bottom: auto;
  transform: none;
  transition:
    left 0.18s ease-out,
    top 0.18s ease-out;
}
.helper.is-dragging {
  transition: none;
}
.helper.is-dragging .hb-panel,
.helper.is-dragging .hb-fab,
.helper.is-dragging .hb-fab:hover {
  cursor: grabbing;
  opacity: 0.9;
}
html.helper-dragging .player-frame {
  pointer-events: none;
}
.helper[data-state="open"] .hb-fab {
  display: none;
}
.helper[data-state="folded"] .hb-panel {
  display: none;
}
.hb-panel {
  width: 64px;
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 5px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow:
    0 14px 34px -14px var(--shade),
    0 2px 8px -3px var(--shade);
  animation: hb-in 0.16s ease-out;
}
.hb-panel::-webkit-scrollbar {
  display: none;
}
@keyframes hb-in {
  from {
    opacity: 0;
    transform: translateX(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.hb-mark {
  width: 30px;
  height: 30px;
  clip-path: inset(0 round 24%);
  display: block;
}
.hb-home {
  width: 46px;
  height: 46px;
  flex: none;
  border: 0;
  border-radius: 14px;
  background: transparent;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
}
.hb-home:hover {
  background: var(--fill);
}
.hb-div {
  width: 34px;
  height: 1px;
  flex: none;
  margin: 5px 0;
  background: var(--line);
}
.hb-btn {
  width: 54px;
  flex: none;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 6px 0 5px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
}
.hb-btn:hover,
.hb-btn[aria-expanded="true"] {
  background: var(--fill);
}
.hb-btn {
  text-decoration: none;
}
.hb-btn .bm-ic path {
  fill: none;
}
.hb-btn[aria-pressed="true"] .bm-ic path {
  fill: currentColor;
}
.hb-fold {
  width: 46px;
  height: 26px;
  flex: none;
  margin-top: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--fill);
  color: var(--ink-soft);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.hb-fold:hover {
  background: var(--fill-strong);
  color: var(--ink);
}
.hb-fab {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  display: grid;
  place-items: center;
  cursor: grab;
  opacity: 0.5;
  box-shadow: 0 6px 18px -8px var(--shade);
}
.hb-fab .hb-mark {
  width: 28px;
  height: 28px;
}
.hb-fab:hover,
.hb-fab:focus-visible {
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .hb-panel {
    animation: none;
  }
  .helper.is-placed {
    transition: none;
  }
}

/* About popover */
.pop-card {
  position: fixed;
  z-index: 45;
  left: 0;
  top: 0;
  width: min(340px, calc(100vw - 32px));
  max-height: calc(100dvh - 16px);
  overflow-y: auto;
  display: grid;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 40px -16px var(--shade);
  font-size: 14.5px;
}
.pop-card:focus {
  outline: none;
}
.about-title {
  margin: 0;
  font-weight: 700;
  font-size: 16px;
}
.about-line {
  margin: -6px 0 0;
  color: var(--ink-2);
}
.about-sec {
  display: grid;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.about-k {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.about-found {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  color: var(--ink-soft);
}
.about-found .who {
  color: var(--ink);
}
.pop-card .who .av {
  width: 28px;
  height: 28px;
  font-size: 13px;
}
.about-why {
  margin: 0;
  padding-left: 10px;
  border-left: 3px solid var(--line);
  color: var(--ink-2);
}
.about-muted {
  color: var(--ink-soft);
}
.about-muted .linkbtn {
  font-size: inherit;
  color: var(--ink);
}
.pop-card .expect {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  gap: 6px;
  font-size: 14px;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 12px);
  max-width: min(92vw, 460px);
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--ink);
  color: var(--surface);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 15px;
  box-shadow: 0 12px 30px -14px var(--shade);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.18s,
    transform 0.18s;
  z-index: 50;
  overflow-wrap: anywhere;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.toast.show.has-action {
  pointer-events: auto;
}
.toast-btn {
  background: none;
  border: 0;
  padding: 4px 2px;
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  flex: none;
}

@media (prefers-reduced-motion: reduce) {
  .ring {
    animation: none;
  }
  .toast,
  .tile,
  .switch::after {
    transition: none;
  }
}

/* Short link card */
.card-status {
  margin: 14px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
}
.detail.card .pv.big {
  margin-bottom: 18px;
}

/* Picture choices from the page */
.upload-face {
  display: contents;
}
.ppick img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ts-box:empty {
  display: none;
}

/* All badges on the owner's profile */
.all-badges {
  margin-top: 32px;
}
.badge-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.badge-item {
  display: flex;
  gap: 14px;
  align-items: center;
}
.badge-item .badge-slot {
  flex: none;
  border-style: solid;
  border-color: var(--ink-soft);
}
.badge-item.is-locked {
  opacity: 0.45;
}
.badge-item.is-locked .badge-slot {
  border-style: dashed;
  border-color: var(--line-strong);
}
.badge-text {
  display: grid;
  gap: 2px;
}
.badge-text span {
  font-size: 14px;
  color: var(--ink-soft);
}

/* "Not loading? Open" beside the helper bar */
.nl-chip {
  position: absolute;
  top: 50%;
  right: calc(100% + 10px);
  transform: translateY(-50%);
  white-space: nowrap;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 22px -12px var(--shade);
}
.nl-chip:hover {
  background: var(--fill);
}
.helper.on-left .nl-chip {
  right: auto;
  left: calc(100% + 10px);
}

/* Edit and review pages */
.edit-page {
  padding-block: 26px 48px;
}
.edit-page .page-h {
  margin-bottom: 12px;
}
.edit-page .status {
  margin: 0 0 10px;
}
.review-row {
  align-items: start;
}
.review-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.review-form .form-actions {
  margin-top: 0;
}
