:root {
  --fmo-max: 1240px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
}
button,
input,
textarea,
select {
  font: inherit;
}
.find-object-app {
  min-height: 100vh;
}
.find-object-app > main {
  min-height: calc(100vh - 240px);
}
.app-header {
  position: sticky;
  top: 0;
  z-index: 70;
  height: 74px;
  padding: 0 clamp(18px, 4vw, 56px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(22px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}
.brand-link {
  text-decoration: none;
  color: inherit;
}
.brand-link .brand {
  padding: 0;
}
.main-nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 5px;
}
.main-nav a {
  padding: 10px 12px;
  border-radius: 11px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.main-nav a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-button {
  position: relative;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  display: grid;
  place-items: center;
  color: var(--text);
  cursor: pointer;
}
.notification-trigger [data-notification-count] {
  position: absolute;
  right: -4px;
  top: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 2px solid var(--surface);
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
}
.account-trigger.is-authenticated {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
  background: var(--accent-soft);
  color: var(--accent);
}
.browse-hero {
  width: min(var(--fmo-max), calc(100% - 36px));
  min-height: 620px;
  margin: 32px auto 0;
  padding: clamp(28px, 5vw, 70px);
  border-radius: 34px;
  background: radial-gradient(circle at 80% 20%, rgb(67 67 67 / 24%), transparent 34%), linear-gradient(145deg, #ffffff, #d5d5d5 52%, #f7f7fb);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.78fr);
  align-items: center;
  gap: clamp(34px, 6vw, 92px);
  overflow: hidden;
}
.browse-copy h1 {
  max-width: 760px;
  margin: 12px 0 22px;
  font-size: clamp(48px, 6.5vw, 84px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}
.browse-copy p {
  max-width: 620px;
  margin: 0 0 28px;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.65;
}
.listing-filters {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 24px 70px rgba(45, 48, 92, 0.12);
  backdrop-filter: blur(22px);
  display: grid;
  gap: 16px;
}
.filter-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.filter-heading h2 {
  margin: 5px 0 0;
  font-size: 24px;
}
.filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.listing-filters .button.primary {
  width: 100%;
}
.listing-section,
.page-shell {
  width: min(var(--fmo-max), calc(100% - 36px));
  margin: auto;
}
.listing-section {
  padding: 54px 0 100px;
}
.listing-status {
  min-height: 22px;
  color: var(--text-soft);
}
.listing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}
.listing-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.listing-card.has-unread {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.listing-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.category-chip {
  display: inline-flex;
  width: max-content;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  text-transform: capitalize;
}
.unread-copy {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}
.message-copy {
  color: var(--text-soft);
  font-size: 11px;
}
.listing-card h3 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.025em;
}
.listing-card > p {
  display: -webkit-box;
  min-height: 66px;
  margin: 0;
  color: var(--text-soft);
  line-height: 1.55;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.listing-card dl,
.detail-meta dl {
  margin: 0;
  display: grid;
  gap: 8px;
}
.listing-card dl {
  grid-template-columns: 1fr 1fr;
}
.listing-card dl div,
.detail-meta dl div {
  display: grid;
  gap: 3px;
}
.listing-card dt,
.detail-meta dt {
  font-size: 11px;
  color: var(--text-soft);
  font-weight: 700;
}
.listing-card dd,
.detail-meta dd {
  margin: 0;
  font-weight: 750;
}
.listing-card footer {
  margin-top: auto;
  padding-top: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.listing-card footer small {
  color: var(--text-soft);
}
.page-shell {
  padding: 64px 0 110px;
}
.page-shell.narrow {
  width: min(760px, calc(100% - 36px));
}
.page-title h1,
.page-shell > h1 {
  margin: 8px 0 28px;
  font-size: clamp(44px, 7vw, 74px);
  letter-spacing: -0.055em;
}
.back-link {
  display: inline-flex;
  margin-bottom: 26px;
  color: var(--accent);
  font-weight: 750;
  text-decoration: none;
}
.listing-detail {
  padding: clamp(26px, 5vw, 58px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--surface);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.35fr);
  gap: 50px;
}
.detail-main h1 {
  margin: 14px 0 20px;
  font-size: clamp(40px, 6vw, 70px);
  line-height: 1;
  letter-spacing: -0.055em;
}
.detail-main p {
  margin: 0;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.7;
  white-space: pre-wrap;
}
.detail-meta {
  padding: 20px;
  border-radius: 20px;
  background: var(--surface-soft);
}
.detail-meta dl {
  gap: 18px;
}
.detail-actions {
  margin: 18px 0 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.offer-card,
.listing-conversations,
.version-history {
  margin-top: 28px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}
.offer-card h2,
.listing-conversations h2,
.version-history h2 {
  margin: 0 0 18px;
}
.offer-card form {
  display: grid;
  gap: 14px;
}
.offer-card textarea {
  min-height: 150px;
}
.listing-conversations [data-listing-conversation-list] {
  display: grid;
  gap: 10px;
}
.post-form {
  margin-top: 28px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  display: grid;
  gap: 18px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 14px;
}
.classification-preview {
  padding: 13px;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 750;
}
.version-history [data-version-list] {
  display: grid;
  gap: 9px;
}
.version-row {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.version-row summary {
  cursor: pointer;
  font-weight: 750;
}
.version-row p {
  white-space: pre-wrap;
  color: var(--text-soft);
}
.dashboard-mode,
.dashboard-status-tabs {
  display: flex;
  width: max-content;
  margin: 0 0 16px;
  padding: 5px;
  border-radius: 14px;
  background: var(--surface-soft);
}
.dashboard-mode button,
.dashboard-status-tabs button {
  min-height: 40px;
  padding: 0 15px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-soft);
  font-weight: 750;
  cursor: pointer;
}
.dashboard-mode button.active,
.dashboard-status-tabs button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.dashboard-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.auth-dialog {
  width: min(540px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  overflow: auto;
}
.auth-dialog::backdrop {
  background: rgba(12, 14, 28, 0.46);
  backdrop-filter: blur(7px);
}
.auth-dialog-close {
  position: absolute;
  right: 16px;
  top: 16px;
}
.auth-dialog-copy {
  padding-right: 52px;
}
.auth-dialog-copy h2 {
  margin: 0;
  font-size: 30px;
}
.auth-dialog-copy p {
  color: var(--text-soft);
}
.auth-dialog .form-tabs {
  margin-top: 22px;
}
.auth-dialog .shared-form {
  display: grid;
  gap: 15px;
}
.legal-check {
  display: flex;
  gap: 9px;
  color: var(--text-soft);
  font-size: 12px;
}
.toast.error {
  background: var(--danger);
}
.app-footer {
  min-height: 190px;
  padding: 42px clamp(20px, 5vw, 70px);
  border-top: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  justify-content: space-between;
  gap: 30px;
}
.app-footer .brand {
  padding: 0;
}
.app-footer p {
  color: var(--text-soft);
}
.app-footer nav {
  display: grid;
  align-content: start;
  gap: 10px;
  text-align: right;
}
.app-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}
.legal-page {
  width: min(780px, calc(100% - 36px));
  margin: auto;
  padding: 68px 0 110px;
}
.legal-page h1 {
  font-size: clamp(44px, 7vw, 72px);
  letter-spacing: -0.05em;
}
.legal-page p,
.legal-page li {
  color: var(--text-soft);
  line-height: 1.75;
}
.legal-page img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
}
.legal-page figcaption {
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 12px;
}
@media (max-width: 1020px) {
  .app-header {
    grid-template-columns: auto 1fr;
  }
  .main-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 80;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(20px);
    justify-content: space-around;
  }
  .main-nav a {
    font-size: 12px;
    padding: 9px 7px;
  }
  .header-actions {
    justify-self: end;
  }
  .browse-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .browse-copy h1 {
    max-width: 800px;
  }
  .listing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .listing-detail {
    grid-template-columns: 1fr;
  }
  .dashboard-list {
    grid-template-columns: 1fr;
  }
  .app-footer {
    padding-bottom: 100px;
  }
}
@media (max-width: 680px) {
  .app-header {
    height: 66px;
    padding: 0 12px;
    gap: 8px;
  }
  .brand-link .brand span {
    font-size: 13px;
  }
  .account-trigger .label {
    display: none;
  }
  .language-menu summary {
    min-width: 48px;
  }
  .browse-hero {
    width: calc(100% - 20px);
    margin-top: 10px;
    padding: 25px 18px;
    border-radius: 24px;
    gap: 28px;
  }
  .browse-copy h1 {
    font-size: 42px;
  }
  .browse-copy p {
    font-size: 16px;
  }
  .listing-filters {
    padding: 17px;
    border-radius: 19px;
  }
  .filter-row {
    grid-template-columns: 1fr;
  }
  .listing-section,
  .page-shell {
    width: calc(100% - 20px);
  }
  .listing-grid {
    grid-template-columns: 1fr;
  }
  .listing-detail {
    padding: 22px;
    border-radius: 22px;
  }
  .detail-main h1 {
    font-size: 39px;
  }
  .detail-main p {
    font-size: 16px;
  }
  .page-shell {
    padding-top: 35px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .app-footer {
    flex-direction: column;
  }
  .app-footer nav {
    text-align: left;
  }
  .main-nav a:nth-child(4) {
    display: none;
  }
}
.ai-admin-panel {
  display: grid;
  gap: 22px;
}
.ai-admin-toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.ai-settings-form {
  display: grid;
  gap: 20px;
}
.ai-settings-form fieldset {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  padding: 22px;
  display: grid;
  gap: 16px;
}
.ai-settings-form legend {
  font-weight: 850;
  padding: 0 8px;
}
.toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-weight: 750;
}
.toggle-row input {
  width: 22px;
  height: 22px;
  accent-color: var(--accent);
  margin-top: 2px;
}
.toggle-row small {
  display: block;
  color: var(--text-soft);
  font-weight: 650;
}
.provider-settings-list {
  display: grid;
  gap: 14px;
}
.provider-settings-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 18px;
  display: grid;
  gap: 14px;
}
.provider-state {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  background: var(--surface);
}
.provider-state-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.provider-state-row:first-child {
  border-top: 0;
}
.provider-state-row small,
.provider-state-row p {
  color: var(--text-soft);
  margin: 0;
}
.provider-state-row p {
  grid-column: 1/-1;
}
.form-message.error {
  color: #b91c1c;
}

.auth-dialog .form-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  margin: 22px 0 18px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.auth-dialog .form-tabs button {
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}
.auth-dialog .form-tabs button:hover {
  color: var(--text);
  transform: translateY(-1px);
}
.auth-dialog .form-tabs button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.auth-dialog .form-tabs button:focus-visible {
  outline: 3px solid rgba(31, 111, 235, 0.28);
  outline-offset: 2px;
}
