:root {
  --bg: #f7f0e4;
  --paper: rgba(255, 251, 246, 0.78);
  --ink: #2f241f;
  --muted: #6d574d;
  --accent: #b44d3d;
  --accent-2: #266780;
  --border: rgba(47, 36, 31, 0.12);
  --shadow: 0 22px 50px rgba(80, 42, 20, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 195, 130, 0.65), transparent 28%),
    radial-gradient(circle at top right, rgba(77, 138, 161, 0.35), transparent 25%),
    linear-gradient(180deg, #fbf6ef 0%, var(--bg) 100%);
}

body[data-page="upload"],
body[data-page="detail"],
body[data-page="signup"] {
  overflow: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  width: 100%;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.site-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 4rem;
}

.eyebrow,
.section-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--accent-2);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-weight: 700;
  line-height: 1.05;
}

h1 {
  font-size: clamp(3rem, 8vw, 6rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.hero-copy,
.supporting-copy,
.detail-meta,
.locator-message {
  color: var(--muted);
}

.detail-quilt-id {
  margin: -0.15rem 0 0.35rem;
  color: rgba(38, 103, 128, 0.76);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.detail-shared {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-style: normal;
  text-align: left;
}

.detail-facts { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; }
.detail-facts .detail-quilt-id { margin: 0; }

.hero-copy {
  width: min(680px, 100%);
  margin: 1rem auto 0;
  font-size: 1.1rem;
}

.hero.compact {
  padding-top: 1.2rem;
  text-align: center;
}

.top-nav {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin: 1.25rem 0 2rem;
  color: var(--muted);
}

.top-nav a[aria-current="page"] {
  color: var(--accent-2);
  font-weight: 700;
}

.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 30px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.single-page-app {
  position: relative;
  min-height: 100vh;
}

.floating-halo {
  position: fixed;
  z-index: 60;
}

.floating-halo {
  top: 9.5rem;
  left: clamp(2rem, 18vw, 16rem);
  transform: none;
  width: min(560px, calc(100vw - 2.5rem));
  max-height: calc(100vh - 11rem);
  padding: 1.3rem 1.35rem;
  display: grid;
  gap: 1rem;
  text-align: center;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  isolation: isolate;
  pointer-events: auto;
  background: #fdf8f1;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.92),
    0 12px 28px rgba(53, 35, 25, 0.1),
    0 28px 70px rgba(53, 35, 25, 0.16),
    0 0 36px rgba(53, 35, 25, 0.08);
}

.floating-halo * {
  pointer-events: auto;
}

.floating-halo::after {
  content: "";
  display: block;
  height: 0.6rem;
}

.floating-halo h1 {
  font-size: clamp(2.8rem, 6vw, 4.6rem);
}

.floating-halo .hero-copy {
  width: auto;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.panel-section {
  display: grid;
  gap: 0.75rem;
}

.halo-locator {
  max-width: 360px;
  margin: 0 auto;
  width: 100%;
}

.floating-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
}

.locator-form,
.upload-form {
  display: grid;
  gap: 1rem;
}

.locator-form.stacked {
  grid-template-columns: 1fr;
}

.compact-form label,
.upload-form label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  width: 100%;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid rgba(47, 36, 31, 0.15);
  background: rgba(255, 255, 255, 0.92);
}

input[type="range"] {
  padding: 0;
}

button,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.35rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #b44d3d, #d27e41);
  color: white;
  cursor: pointer;
  box-shadow: 0 16px 32px rgba(180, 77, 61, 0.22);
}

.secondary-link {
  background: linear-gradient(135deg, #266780, #3b8fa6);
}

.panel-toggle {
  flex-shrink: 0;
}

.account-links {
  margin: -0.15rem 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.account-links span {
  display: block;
}

.field-note {
  margin: -0.35rem 0 0.15rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.account-links a {
  color: var(--accent-2);
  font-weight: 600;
}

.inline-path {
  color: var(--accent-2);
  font-weight: 700;
}

.account-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 1.5rem;
  padding: 1.5rem;
}

.account-intro,
.account-form-wrap {
  display: grid;
  align-content: start;
  gap: 1rem;
}

.account-claim,
.account-preview-card {
  padding: 1.1rem 1.15rem;
  border-radius: 24px;
  background: rgba(38, 103, 128, 0.08);
}

.account-claim-label,
.account-preview-label {
  margin: 0 0 0.35rem;
  color: var(--accent-2);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.account-claim-id,
.account-preview-path {
  margin: 0;
  color: var(--ink);
  font-family: "Fraunces", serif;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.1;
}

.upload-success {
  padding: 1rem 1.1rem;
  border-radius: 20px;
  background: rgba(38, 103, 128, 0.12);
  color: var(--ink);
}

.crop-editor {
  display: grid;
  gap: 0.75rem;
  padding: 0.95rem;
  border-radius: 24px;
  background: rgba(38, 103, 128, 0.08);
}

.crop-editor-copy {
  display: grid;
  gap: 0.35rem;
}

.crop-editor-copy .supporting-copy {
  margin: 0;
}

.crop-preview {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 18px;
  background:
    linear-gradient(45deg, rgba(47, 36, 31, 0.08) 25%, transparent 25%, transparent 75%, rgba(47, 36, 31, 0.08) 75%),
    linear-gradient(45deg, rgba(47, 36, 31, 0.08) 25%, transparent 25%, transparent 75%, rgba(47, 36, 31, 0.08) 75%);
  background-position: 0 0, 12px 12px;
  background-size: 24px 24px;
  border: 1px solid rgba(47, 36, 31, 0.12);
  touch-action: none;
  cursor: grab;
}

.crop-preview.dragging {
  cursor: grabbing;
}

.crop-preview-image {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
}

.crop-preview-empty {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 1rem;
  text-align: center;
  color: var(--muted);
}

.quilt-image-frame {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.quilt-image-frame .quilt-image {
  height: 100%;
  transform-origin: center;
}

.hidden {
  display: none;
}

.wall-stage {
  position: relative;
  height: 100vh;
}

.wall-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.wall-viewport.dragging {
  cursor: grabbing;
}

.quilt-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.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;
}


.quilt-image {
  aspect-ratio: var(--ratio, 1 / 1);
  object-fit: cover;
}

.quilt-id {
  margin: 0 0 0.45rem;
  color: rgba(255, 244, 230, 0.84);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.modal-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.wall-hint {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  z-index: 18;
  transform: translateX(-50%);
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: rgba(35, 27, 23, 0.9);
  color: rgba(255, 247, 239, 0.98);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.inline-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-2);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
}

.quilt-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 25, 21, 0.45);
  backdrop-filter: blur(12px) saturate(0.8);
}

body.locator-active .modal-backdrop {
  background: rgba(31, 25, 21, 0.08);
  backdrop-filter: blur(2px) saturate(0.96);
}

.modal-card {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(980px, calc(100vw - 2rem));
  padding: 1rem;
  background: #fffaf5;
  border: 1px solid rgba(47, 36, 31, 0.12);
  border-radius: 30px;
  box-shadow: 0 28px 70px rgba(53, 35, 25, 0.24);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: hidden;
}

.modal-card.locator-modal {
  inset: auto auto auto 0;
  transform: none;
}

body.locator-active .wall-stage {
  filter: saturate(0.9) brightness(0.98);
}

.modal-close {
  display: inline-flex;
  margin-left: auto;
  margin-bottom: 0.5rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  box-shadow: none;
}

.modal-card.success-modal .modal-close {
  display: none;
}

.modal-content {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 1rem;
  background: #fffaf5;
}

.modal-content.success-content {
  grid-template-columns: 1fr;
  gap: 1.2rem;
  padding: 0.5rem 0.2rem 0.2rem;
}

.success-copy {
  display: grid;
  gap: 1rem;
  text-align: center;
}

.success-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.success-kicker {
  margin: 0;
  color: var(--accent-2);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.success-title {
  margin: 0;
  font-weight: 700;
}

.success-quilt-id {
  margin: 0;
  color: rgba(38, 103, 128, 0.76);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.success-body {
  margin: 0;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.6;
}

.success-subhead {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
}

.success-panel {
  display: grid;
  gap: 0.45rem;
  padding: 1rem 1.1rem;
  border-radius: 22px;
  background: rgba(38, 103, 128, 0.07);
  text-align: left;
  max-width: 58rem;
  margin: 0 auto;
}

.success-account-copy {
  display: grid;
  gap: 0.75rem;
  text-align: center;
  justify-items: center;
  max-width: 34rem;
  margin: 0 auto;
}

.success-account-title {
  margin: 0;
  color: var(--ink);
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.3;
}

.success-account-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 30rem;
}

.success-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.success-secondary {
  background: rgba(38, 103, 128, 0.1);
  color: var(--accent-2);
  box-shadow: none;
}

.success-toplink {
  background: transparent;
  color: var(--accent-2);
  box-shadow: none;
  padding: 0.35rem 0;
}

.modal-image {
  border-radius: 22px;
  overflow: hidden;
  background: #efe4d6;
}

.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-copy {
  display: grid;
  align-content: start;
  gap: 0.85rem;
  padding: 0.75rem 0.35rem 0.35rem;
  background: #fffaf5;
}

body.detail-modal-open .floating-halo,
body.detail-modal-open .wall-hint {
  filter: blur(8px);
  opacity: 0.35;
}

body.detail-modal-open .wall-stage {
  filter: saturate(0.65);
}

.upload-layout,
.detail-card {
  padding: 1.5rem;
}

.detail-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.detail-image {
  border-radius: 24px;
  overflow: hidden;
}

.detail-copy {
  display: grid;
  gap: 0.9rem;
  align-content: start;
}

.detail-description {
  margin: 0;
  line-height: 1.7;
}

.not-found {
  padding: 4rem 1.5rem;
  text-align: center;
}

@media (max-width: 820px) {
  body {
    overflow: auto;
  }

  .single-page-app {
    padding: 1rem;
  }

  .account-layout {
    grid-template-columns: 1fr;
  }

  .floating-halo,
  .wall-hint {
    position: static;
    width: auto;
    transform: none;
  }

  .floating-halo {
    margin-bottom: 1rem;
  }

  .wall-stage {
    height: 70vh;
  }

  .floating-panel-head,
  .modal-content,
  .detail-card {
    grid-template-columns: 1fr;
  }

  .floating-panel-head {
    display: grid;
  }

  .modal-card {
    inset: 1rem;
    transform: none;
    width: auto;
  }
}
/* Quilt Wall controls: a centered invitation surrounded by the community Wall. */
body[data-page="home"] .floating-halo {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 370px;
  max-height: calc(100dvh - 112px);
  padding: 26px;
  gap: 20px;
  border-radius: 24px;
  text-align: left;
  scrollbar-gutter: auto;
}
body[data-page="home"] .floating-halo::after { display: none; }
body[data-page="home"] .floating-halo h1 { font-size: 44px; letter-spacing: -0.045em; }
body[data-page="home"] .floating-halo .eyebrow { font-size: 10px; line-height: 1.7; letter-spacing: 0.13em; }
body[data-page="home"] .floating-halo .hero-copy { font-size: 14px; line-height: 1.6; margin: 0; }
body[data-page="home"] .panel-section { gap: 12px; }
body[data-page="home"] .halo-locator { padding-top: 18px; border-top: 1px solid var(--border); }
body[data-page="home"] .locator-form.stacked { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
body[data-page="home"] .locator-form input { min-width: 0; padding: 12px; font-size: 13px; }
body[data-page="home"] .locator-form button { padding: 12px 15px; font-size: 13px; }
body[data-page="home"] .floating-panel-head { display: grid; gap: 12px; }
body[data-page="home"] .floating-panel-head .supporting-copy { margin: 6px 0 0; font-size: 13px; line-height: 1.6; }
body[data-page="home"] .panel-toggle { width: 100%; justify-content: center; text-align: center; }
.wall-count { color: var(--accent-2); font-size: 11px; font-weight: 700; margin: 0; letter-spacing: 0.04em; }
.wall-tools {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 65;
  display: flex;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fdf8f1;
  box-shadow: 0 6px 24px rgba(53, 35, 25, 0.12);
}
.wall-tools button { background: transparent; box-shadow: none; color: var(--ink); font-size: 12px; padding: 12px; border-radius: 12px; min-height: 44px; }
.wall-tools button:hover { background: #eee3d3; }
.wall-tools #discover-quilt { background: var(--accent-2); color: #fffaf5; }
.wall-tools #discover-quilt:hover { background: #1c5065; }
.wall-hint { left: auto; right: 24px; bottom: 30px; transform: none; font-size: 12px; padding: 12px 18px; }
body.detail-modal-open .wall-tools { visibility: hidden; }
button:focus-visible, a:focus-visible, input:focus-visible, .quilt-canvas:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 4px; }
@media (max-width: 820px) {
  body[data-page="home"] .single-page-app { padding: 12px 12px 88px; }
  body[data-page="home"] .floating-halo { position: relative; top: auto; left: auto; transform: none; width: 100%; max-height: none; padding: 22px; gap: 16px; }
  body[data-page="home"] .floating-halo h1 { font-size: 40px; }
  body[data-page="home"] .wall-stage { height: 65dvh; min-height: 340px; border-radius: 20px; overflow: hidden; }
  .wall-tools { left: 50%; bottom: 14px; transform: translateX(-50%); white-space: nowrap; max-width: calc(100vw - 20px); }
  .wall-tools button { padding: 10px; font-size: 11px; }
  .wall-hint { position: static; width: fit-content; margin: 12px auto 0; text-align: center; }
}
/* Shared navigation and newest-quilt feed. */
body[data-page="feed"], body[data-page="account"], body[data-page="quilter"], body[data-page="moderation"] { overflow: auto; background: #f7f2e9; }
.browse-shell { max-width: 1240px; margin: auto; padding: 0 32px 64px; }
.browse-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--border); }
.browse-brand { font-family: "Fraunces", serif; font-size: 25px; letter-spacing: -0.04em; }
.browse-nav { display: flex; align-items: center; gap: 6px; padding: 6px; border: 1px solid var(--border); border-radius: 999px; background: #fdf8f1; }
.browse-nav a { padding: 10px 16px; font-size: 13px; border-radius: 999px; }
.browse-nav a[aria-current="page"] { color: white; background: var(--accent-2); }
.browse-nav a:hover { background: #e8dfd1; color: var(--ink); }
.wall-navigation { position: fixed; z-index: 65; top: 24px; right: 24px; box-shadow: var(--shadow); }
.feed-intro { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: 56px 0 32px; }
.feed-intro h1, .profile-intro h1 { font-size: clamp(36px, 5vw, 62px); letter-spacing: -0.04em; margin: 12px 0; }
.feed-intro .hero-copy { margin: 0; font-size: 16px; line-height: 1.7; }
.feed-intro > a { flex-shrink: 0; }
.feed-tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--border); }
.feed-tabs a { padding: 14px 0; color: var(--muted); }
.feed-tabs a[aria-current="page"] { border-bottom: 3px solid var(--accent-2); color: var(--accent-2); font-weight: 700; }
.feed-status { color: var(--muted); font-size: 12px; padding: 12px 0; }
.quilt-feed { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.feed-card { border-radius: 20px; border: 1px solid var(--border); background: #fffcf7; overflow: hidden; }
.feed-image { display: block; aspect-ratio: 1; overflow: hidden; background: #eee3d3; }
.feed-image img { width: 100%; height: 100%; object-fit: cover; }
.feed-card-copy { padding: 22px; }
.feed-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; }
.feed-meta span:first-child { font-weight: 700; letter-spacing: 0.08em; color: var(--accent-2); }
.feed-card h2 { font-size: 25px; line-height: 1.15; margin: 14px 0 8px; }
.feed-maker { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.feed-author { color: var(--accent-2); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.feed-story { line-height: 1.7; color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.feed-read { display: inline-block; font-size: 13px; font-weight: 700; color: var(--accent-2); margin-top: 8px; }
.feed-more { display: flex; justify-content: center; margin: 36px 0; }
button[hidden] { display: none; }
.profile-intro { margin: 36px 0; padding: 36px; }
.profile-intro h1 { max-width: 900px; }
.profile-intro .secondary-link { margin-top: 12px; }
.account-preview-note { margin: 14px 0; font-size: 12px; }
.collection-empty { grid-column: 1 / -1; text-align: center; padding: 48px 24px; background: #fffcf7; border: 1px dashed var(--border); border-radius: 20px; }
.collection-empty h2 { font-size: 30px; }
@media (max-width: 900px) { .quilt-feed { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 820px) {
 .wall-navigation { position: relative; top: auto; right: auto; width: fit-content; margin: 0 auto 12px; }
 .browse-shell { padding: 0 16px 40px; }
 .browse-header { flex-wrap: wrap; gap: 16px; }
 .browse-nav a { padding: 9px 12px; font-size: 12px; }
 .feed-intro { align-items: flex-start; flex-direction: column; margin: 32px 0; }
 .profile-intro { padding: 24px; }
}
@media (max-width: 560px) { .quilt-feed { grid-template-columns: 1fr; } .feed-card-copy { padding: 20px; } }
body[data-page="report"] { overflow: auto; background: #f7f2e9; }
.report-page { max-width: 640px; padding: 32px; margin: 36px auto; }
.report-page h1 { font-size: 40px; margin: 12px 0; }
.report-page .supporting-copy { line-height: 1.7; }
select { width: 100%; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: white; color: var(--ink); font: inherit; }
.report-link, .review-link { display: inline-block; color: var(--muted); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; margin: 12px 0; }
.review-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.review-actions button { font-size: 12px; padding: 12px 16px; box-shadow: none; }
.review-image { aspect-ratio: 1; object-fit: cover; }
.upload-form[hidden] { display: none; }

.collection-more { grid-column: 1 / -1; justify-self: center; margin: 12px 0; }

/* A reading feed: one quilt and its story at a time on every screen. */
body[data-page="feed"] #quilt-feed {
  grid-template-columns: minmax(0, 1fr);
  max-width: 560px;
  margin-inline: auto;
}

/* Feed floats over a static, pre-blurred Quilt Wall; no live blur or second renderer. */
body[data-page="feed"] {
  background: #eee3d3;
  isolation: isolate;
}
body[data-page="feed"]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(rgba(247,240,228,0.25), rgba(247,240,228,0.25)), url("assets/feed-background.webp") center / cover no-repeat;
}
body[data-page="feed"] .browse-shell {
  width: min(560px, calc(100% - 24px));
  max-width: 560px;
  margin: 28px auto;
  padding: 0 0 20px;
  background: #fdf8f1;
  border: 1px solid rgba(255,255,255,0.85);
  border-radius: 26px;
  box-shadow: 0 20px 70px rgba(47,36,31,0.28);
  overflow: hidden;
}
body[data-page="feed"] .browse-header {
  margin: 0 24px;
  padding: 22px 0;
  flex-direction: column;
  gap: 16px;
}
body[data-page="feed"] .feed-intro {
  display: block;
  margin: 28px 24px 22px;
}
body[data-page="feed"] .feed-intro h1 { font-size: 38px; }
body[data-page="feed"] .feed-intro .hero-copy { font-size: 14px; }
body[data-page="feed"] .feed-intro > .secondary-link { margin-top: 18px; padding: 12px 20px; font-size: 13px; }
body[data-page="feed"] .feed-tabs { margin-inline: 24px; font-size: 14px; }
body[data-page="feed"] .feed-status { margin-inline: 24px; }
body[data-page="feed"] #quilt-feed { margin: 0 16px; gap: 20px; }
body[data-page="feed"] .feed-card { box-shadow: 0 4px 16px rgba(47,36,31,0.04); }
@media (max-width: 560px) {
  body[data-page="feed"] .browse-shell { margin-block: 12px; border-radius: 22px; }
  body[data-page="feed"] .browse-header { margin-inline: 18px; }
  body[data-page="feed"] .feed-intro { margin: 24px 18px 20px; }
  body[data-page="feed"] .feed-intro h1 { font-size: 32px; }
  body[data-page="feed"] .feed-tabs, body[data-page="feed"] .feed-status { margin-inline: 18px; }
  body[data-page="feed"] #quilt-feed { margin-inline: 10px; }
}
.feed-author-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.inline-follow { padding: 3px 2px; min-height: 24px; border: 0; border-radius: 3px; background: transparent; color: var(--accent-2); box-shadow: none; font: inherit; font-size: 11px; font-weight: 700; line-height: 1.4; }
.inline-follow:hover { background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.inline-follow[aria-pressed="true"] { background: transparent; color: var(--muted); }
.inline-follow-status:not(.sr-only) { color: var(--accent); font-size: 12px; flex-basis: 100%; }
/* Address lookup: dock the invitation and attach the story to the found block. */
body[data-page="home"] .floating-halo { transition: left 260ms ease, transform 260ms ease; }
body.locator-exploring.detail-modal-open .floating-halo { filter: none; opacity: 1; }
body.locator-active .wall-stage { filter: none; }
body.locator-active .quilt-modal { pointer-events: none; }
body.locator-active .modal-backdrop { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; pointer-events: none; }
body.locator-active .modal-card { pointer-events: auto; }
.modal-card.locator-modal { padding: 26px; border-radius: 24px; overflow: auto; overscroll-behavior: contain; }
.locator-modal .modal-content { display: block; }
.locator-modal .modal-copy { padding: 0; gap: 12px; display: flex; flex-direction: column; min-height: var(--locator-copy-height, 0px); }
.locator-modal h2 { font-size: 30px; }
.locator-modal .detail-description { font-size: 14px; }
.locator-modal .detail-meta { font-size: 13px; margin: 8px 0; }
.locator-modal .report-link { margin: auto 0 0; padding-top: 12px; align-self: flex-start; }
.locator-modal .modal-close { display: flex; width: fit-content; margin-left: auto; font-size: 12px; padding: 2px 0; }
body.locator-exploring .wall-hint { opacity: 0; }
.located-quilt-display { position: fixed; z-index: 121; pointer-events: none; outline: 5px solid #fffaf0; border-radius: 4px; background: #fffaf0; box-shadow: 0 14px 36px rgba(32,38,39,0.3); transform: translateY(-4px) scale(1.02); }
.located-quilt-display img { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }
body.locator-exploring .locator-message { color: var(--accent-2); font-size: 11px; letter-spacing: 0.01em; }
@media (max-width: 820px) {
  .modal-card.locator-modal { padding: 16px; border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-page="home"] .floating-halo { transition: none; }
}
.newest-quilts-link { gap: 10px; font-size: 13px; padding: 12px 18px; }
body[data-page="home"] .panel-toggle { background: transparent; color: var(--accent-2); border: 1px solid rgba(38,103,128,0.3); box-shadow: none; }
/* Full-photo presentation. Stack whole cards instead of pushing the hero off-screen. */
.locator-presentation { position: fixed; inset: 16px; z-index: 130; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable both-edges; display: flex; justify-content: center; align-items: flex-start; }
.locator-presentation-grid { display: grid; gap: 24px; align-items: center; justify-items: center; margin-block: auto; max-width: 100%; box-sizing: border-box; }
body[data-page="home"].locator-presenting .locator-presentation .floating-halo {
  position: relative; grid-area: hero; top: auto; left: auto; right: auto; bottom: auto; transform: none; transition: none;
  width: var(--presentation-card-width); max-height: calc(100dvh - 48px); overflow-y: auto; margin: 0;
}
.locator-presentation .modal-card.locator-modal { position: relative; grid-area: info; inset: auto; transform: none; width: var(--presentation-card-width); max-height: calc(100dvh - 48px); margin: 0; }
.locator-presentation .located-quilt-display { position: relative; grid-area: photo; top: auto; left: auto; transform: none; z-index: auto; pointer-events: auto; max-width: 100%; display: flex; align-items: center; justify-content: center; color: var(--muted); padding: 0; }
.locator-presentation .located-quilt-display img { width: 100%; height: 100%; object-fit: contain; }
.locator-presentation-grid[data-layout="stack"] .modal-card { height: auto; max-height: none; }
.locator-presentation-grid[data-layout="stack"] .floating-halo { max-height: none; }
.locator-presentation-grid[data-layout="stack"] .modal-copy { min-height: 0; }
body[data-page="home"].locator-presenting .wall-stage { position: fixed; inset: 0; width: 100%; height: 100dvh; border-radius: 0; }
.modal-image .detail-full-photo { width: 100%; height: auto; max-height: min(70dvh, 760px); object-fit: contain; }
/* Apply the focus treatment only after the camera arrives. */
body.locator-revealed .locator-presentation::before { content: ""; position: fixed; inset: 0; z-index: -1; background: rgba(31,25,21,0.32); backdrop-filter: blur(6px) saturate(0.9); -webkit-backdrop-filter: blur(6px) saturate(0.9); pointer-events: none; animation: locator-focus-in 180ms ease-out; }
@keyframes locator-focus-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { body.locator-revealed .locator-presentation::before { animation: none; } }
/* Hero hierarchy: a quiet browsing link and a clear invitation to contribute. */
body[data-page="home"] .newest-quilts-link { display: inline-flex; align-items: center; justify-self: start; width: fit-content; gap: 7px; padding: 0; background: transparent; color: var(--accent-2); border: 0; border-radius: 0; box-shadow: none; font-size: 13px; font-weight: 500; text-decoration: underline; text-decoration-color: rgba(38,103,128,0.35); text-underline-offset: 4px; }
body[data-page="home"] .newest-quilts-link:hover { text-decoration-color: currentColor; }
.wall-count-row { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
body[data-page="home"] .wall-count-row .newest-quilts-link { font-size: 11px; white-space: nowrap; min-height: 32px; }
body[data-page="home"] #upload-toggle { display: flex; width: 100%; max-width: none; min-height: 56px; justify-self: stretch; align-self: stretch; padding: 16px 20px; background: linear-gradient(135deg, #b44d3d, #c56b45); border: 0; color: #fffaf5; box-shadow: 0 8px 18px rgba(180,77,61,0.18); font-size: 16px; font-weight: 700; letter-spacing: 0.01em; }
body[data-page="home"] #upload-toggle:hover { background: linear-gradient(135deg, #a44133, #b85b37); }
body[data-page="home"] .floating-panel-head { grid-template-columns: minmax(0, 1fr); justify-content: stretch; }
.quilt-photo-close { position: absolute; top: 10px; right: 10px; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 1px solid rgba(47,36,31,0.1); border-radius: 50%; background: rgba(255,250,245,0.96); color: #2f241f; box-shadow: 0 2px 10px rgba(0,0,0,0.16); font: 25px/1 "Manrope",sans-serif; cursor: pointer; }
.quilt-photo-close:hover { background: #fff; }
@media (pointer: coarse) { .quilt-photo-close { width: 44px; height: 44px; } }
.quilt-actions { display:flex; align-items:center; flex-wrap:wrap; gap:18px; margin:14px 0; }
.quilt-actions .quilt-action { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:44px; padding:4px 2px; border:0; border-radius:4px; background:transparent; box-shadow:none; color:var(--accent-2); font:500 13px "Manrope",sans-serif; cursor:pointer; }
.quilt-action svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linejoin:round; }
.quilt-action[aria-pressed="true"] svg { fill:currentColor; }
.quilt-action[data-quilt-preference="liked"][aria-pressed="true"] { color:#af4d51; }
.quilt-actions .quilt-action:hover { background:rgba(42,112,132,.07); }
.quilt-action:focus-visible { outline:2px solid var(--accent-2); outline-offset:3px; }
.account-collections { display:flex; flex-wrap:wrap; gap:20px; margin:24px 0 8px; font-size:14px; color:var(--accent-2); text-decoration:underline; text-underline-offset:4px; }
.account-owner-tools { display:flex; align-items:center; gap:20px; flex-wrap:wrap; margin:22px 0 0; }
.account-owner-tools .secondary-link { font-size:14px; }
