/* Numismatik UI 2026-09-16 */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border-radius: 999px;
  line-height: 1;
}

.theme-toggle .theme-icon {
  display: none;
}

html[data-theme="light"] .theme-toggle .theme-icon-moon,
html:not([data-theme]) .theme-toggle .theme-icon-moon {
  display: block;
}

html[data-theme="dark"] .theme-toggle .theme-icon-sun {
  display: block;
}

.site-header--home {
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 1rem;
}

.header-search {
  flex: 1 1 12rem;
  min-width: 10rem;
  max-width: 22rem;
}

.header-search input {
  width: 100%;
  min-height: 2.35rem;
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--line, rgba(22, 58, 107, 0.16));
  background: var(--card, #fff);
  color: var(--ink, #163a6b);
  font: inherit;
  font-size: 0.92rem;
}

.app-header .header-search {
  margin: 0 auto 0 0.25rem;
}

.page-home .hero,
.page-home .hero-with-gallery {
  min-height: 0;
}

.page-home .hero-with-gallery {
  padding-top: 5.25rem;
  padding-bottom: 1.5rem;
}

.page-home .hero-logo.hero-logo--single {
  width: min(100%, 18rem);
  margin-bottom: 0.85rem;
}

.page-home .gallery-card {
  border-radius: 50%;
}

.hero-gallery--mosaic {
  display: block;
  max-width: 28rem;
  margin: 0 auto;
}

.hero-mosaic {
  display: block;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow, 0 18px 48px rgba(22, 58, 107, 0.1));
  background: #0b1220;
  text-decoration: none;
}

.hero-mosaic img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 900 / 714;
  object-fit: cover;
}

.home-cta-band {
  padding-top: 0;
  padding-bottom: 3rem;
  text-align: center;
}

.home-cta-band .section-text {
  margin-left: auto;
  margin-right: auto;
}

.coin-media {
  background:
    radial-gradient(circle at 50% 38%, #4a5d78 0%, #2a3a52 58%, #1c2838 100%);
  min-height: 0;
  aspect-ratio: 5 / 4;
  padding: 0.85rem;
  place-items: center;
}

html[data-theme="dark"] .coin-media {
  background:
    radial-gradient(circle at 50% 38%, #31445e 0%, #152033 60%, #0b1220 100%);
}

.coin-tray {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

.coin-tray-side {
  display: grid;
  place-items: center;
  flex: 1 1 0;
  min-width: 0;
}

.coin-card .coin-zoom,
.coin-card .coin-thumb,
.coin-card .coin-thumb-empty,
.coin-tray .coin-zoom,
.coin-tray .coin-thumb,
.coin-tray .coin-thumb-empty {
  width: min(100%, 168px);
  height: min(100%, 168px);
  max-width: 100%;
  max-height: 100%;
}

.coin-tray.is-pair .coin-zoom,
.coin-tray.is-pair .coin-thumb,
.coin-tray.is-pair .coin-thumb-empty {
  width: min(100%, 124px);
  height: min(100%, 124px);
}

.coin-card .coin-thumb,
.coin-tray .coin-thumb,
.coin-flip-face .coin-thumb {
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  aspect-ratio: 1;
  background: #1c2838;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.coin-card .coin-thumb-empty,
.coin-tray .coin-thumb-empty {
  border-radius: 50%;
  aspect-ratio: 1;
}

.coin-card .coin-zoom:hover .coin-thumb,
.coin-card .coin-zoom:focus-within .coin-thumb {
  position: static;
  left: auto;
  top: auto;
  transform: none;
  width: min(100%, 168px);
  height: min(100%, 168px);
  max-width: 100%;
  max-height: 100%;
  z-index: auto;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.coin-tray.is-pair .coin-zoom:hover .coin-thumb,
.coin-tray.is-pair .coin-zoom:focus-within .coin-thumb {
  width: min(100%, 124px);
  height: min(100%, 124px);
}

.coin-card {
  overflow: hidden;
  background: var(--card, #fff);
  color: var(--ink, #163a6b);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.coin-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(22, 58, 107, 0.12);
}

.coin-card-link {
  display: grid;
  color: inherit;
  text-decoration: none;
}

.coin-card .coin-body {
  padding: 0.75rem 0.85rem 0.95rem;
}

.coin-card-price strong {
  font-size: 1.05rem;
}

.badge-grade-fdc { background: #fef3c7; color: #92400e; }
.badge-grade-soberba { background: #e0e7ff; color: #3730a3; }
.badge-grade-mbcplus { background: #dbeafe; color: #1e40af; }
.badge-grade-mbc { background: #e0f2fe; color: #075985; }
.badge-grade-bc { background: #ecfeff; color: #155e75; }
.badge-grade-regular { background: #f1f5f9; color: #475569; }
.badge-grade-fraca { background: #ffe4e6; color: #9f1239; }
.badge-metal { background: #f4f6f9; color: #334155; }

html[data-theme="dark"] .coin-card .coin-body h3,
html[data-theme="dark"] .coin-card strong {
  color: var(--ink);
}

html[data-theme="dark"] .coin-card .meta {
  color: var(--muted);
}

html[data-theme="dark"] .badge-grade-fdc { background: #78350f; color: #fde68a; }
html[data-theme="dark"] .badge-grade-soberba { background: #312e81; color: #c7d2fe; }
html[data-theme="dark"] .badge-grade-mbcplus,
html[data-theme="dark"] .badge-grade-mbc { background: #1e3a5f; color: #93c5fd; }
html[data-theme="dark"] .badge-metal { background: #1e293b; color: #cbd5e1; }

.explore-search {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.explore-search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
}

.explore-search-row input[type="search"],
.explore-search-row input[type="text"] {
  width: 100%;
  min-height: 2.7rem;
  border-radius: 999px;
  padding: 0.65rem 1rem;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg, #fff);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.chip:hover {
  border-color: var(--blue);
  text-decoration: none;
}

.chip.is-on {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.more-filters {
  border-top: 1px solid var(--line);
  padding-top: 0.65rem;
}

.more-filters summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--blue);
  list-style: none;
}

.more-filters summary::-webkit-details-marker {
  display: none;
}

.more-filters-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.empty-state h2 {
  font-size: 1.2rem;
  margin: 0 0 0.35rem;
}

.empty-icon {
  font-size: 2rem;
  margin: 0 0 0.35rem;
  color: var(--blue);
}

.home-live {
  padding-top: 0.5rem;
}

.home-live .coin-grid {
  margin-top: 1.25rem;
}

.home-live-cta {
  margin-top: 1.25rem;
  text-align: center;
}

.coin-flip {
  display: grid;
  justify-items: center;
  gap: 0.85rem;
}

.coin-flip-scene {
  perspective: 900px;
  width: min(100%, 280px);
}

.coin-flip-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  transform-style: preserve-3d;
  transition: transform 0.55s ease;
}

.coin-flip.is-flipped .coin-flip-card {
  transform: rotateY(180deg);
}

.coin-flip-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  backface-visibility: hidden;
  background:
    radial-gradient(circle at 50% 38%, #4a5d78 0%, #2a3a52 58%, #1c2838 100%);
  border-radius: 18px;
  padding: 1rem;
}

.coin-flip-face.is-back {
  transform: rotateY(180deg);
}

.coin-flip-face .coin-zoom,
.coin-flip-face .coin-thumb,
.coin-flip-face .coin-thumb-empty {
  width: min(100%, 220px);
  height: min(100%, 220px);
}

.coin-flip-face .coin-thumb {
  object-fit: cover;
  border-radius: 50%;
  background: #1c2838;
}

.coin-flip-label {
  position: absolute;
  top: 0.65rem;
  left: 0.75rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #dbe7f6;
}

.coin-owner-card {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
  margin-top: 0.35rem;
}

.profile-public-wrap {
  margin-bottom: 0.25rem;
}

.profile-cover {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.25rem;
  height: 7.5rem;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  background: #1c2838;
}

.profile-cover img {
  width: 100%;
  height: 7.5rem;
  object-fit: cover;
  display: block;
}

.profile-cover + .profile-public-hero {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.profile-public-hero {
  background:
    linear-gradient(180deg, rgba(30, 77, 140, 0.08), transparent 42%),
    var(--card, #fff);
  padding: 1.25rem;
}

.profile-focus {
  margin-top: 0.55rem;
}

.trust-block {
  display: grid;
  gap: 0.35rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: rgba(30, 77, 140, 0.07);
  border: 1px solid var(--line);
}

.trust-block p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.trust-block .trust-p2p {
  color: var(--ink);
  font-weight: 600;
}

.trust-block a {
  color: var(--blue);
  font-weight: 700;
}

.info-grid dd {
  color: var(--ink);
}

.share-net {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card, #fff);
  color: var(--ink);
  text-decoration: none;
}

.share-net svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}

.share-net:hover {
  text-decoration: none;
  border-color: var(--blue);
  transform: translateY(-1px);
}

@media (min-width: 721px) {
  .share-native {
    display: none !important;
  }
}

html[data-theme="dark"] .trust-block {
  background: rgba(126, 182, 255, 0.12);
  border-color: rgba(232, 238, 248, 0.18);
}

html[data-theme="dark"] .trust-block p,
html[data-theme="dark"] .trust-account {
  color: #d7e3f4;
}

html[data-theme="dark"] .trust-block .trust-p2p {
  color: #f8fbff;
}

html[data-theme="dark"] .trust-block a {
  color: #93c5fd;
}

html[data-theme="dark"] .info-grid dt,
html[data-theme="dark"] .coin-specs dt,
html[data-theme="dark"] .meta {
  color: #c5d4e8;
}

html[data-theme="dark"] .info-grid dd,
html[data-theme="dark"] .coin-specs dd {
  color: #f1f5f9;
}

html[data-theme="dark"] .share-net {
  background: #1b2a40;
  border-color: rgba(232, 238, 248, 0.18);
  color: #f8fbff;
}

html[data-theme="dark"] .share-bar-label {
  color: #d7e3f4;
}

.site-footer {
  background: var(--header, var(--bg, #fff));
  color: var(--muted);
  border-top-color: var(--line);
}

.site-footer a,
.site-footer strong {
  color: var(--blue);
}

html[data-theme="dark"] .site-footer,
html[data-theme="dark"] .app-footer {
  background: var(--header, #111827);
  color: #c5d4e8;
  border-top-color: rgba(232, 238, 248, 0.12);
}

html[data-theme="dark"] .site-footer a,
html[data-theme="dark"] .site-footer strong,
html[data-theme="dark"] .app-footer a,
html[data-theme="dark"] .app-footer .developed-by a,
html[data-theme="dark"] .site-footer .developed-by a {
  color: #93c5fd;
}

html[data-theme="dark"] body,
html[data-theme="dark"] .page-home {
  background: var(--bg, #0b1220);
}

html[data-theme="dark"] .resource-card {
  background: var(--bg-elevated, #152033);
  color: var(--ink, #e8eef8);
  border-color: var(--line);
}

.onboard-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 720px) {
  .header-search {
    flex-basis: 100%;
    max-width: none;
    order: 3;
  }

  .profile-cover {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    height: 6.5rem;
  }

  .profile-cover img {
    height: 6.5rem;
  }

  .onboard-steps {
    grid-template-columns: 1fr;
  }
}

.profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 0.75rem 0 0;
}

.profile-stat strong {
  display: block;
  font-size: 1.15rem;
}

.collector-card {
  box-shadow: var(--shadow, 0 14px 36px rgba(22, 58, 107, 0.08));
}

.mobile-dock {
  display: none;
}

@media (max-width: 720px) {
  .explore-search-row,
  .more-filters-grid {
    grid-template-columns: 1fr;
  }

  .app-main {
    padding-bottom: 4.75rem;
  }

  .page-home {
    padding-bottom: 4.2rem;
  }

  .mobile-dock {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    background: var(--header, #fff);
    border-top: 1px solid var(--line);
    padding: 0.35rem 0.4rem calc(0.35rem + env(safe-area-inset-bottom));
  }

  .mobile-dock a {
    display: grid;
    justify-items: center;
    gap: 0.15rem;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.35rem 0.2rem;
  }

  .mobile-dock a.is-on,
  .mobile-dock a:hover {
    color: var(--blue);
    text-decoration: none;
  }

  .mobile-dock svg {
    width: 20px;
    height: 20px;
  }
}

@media (min-width: 1100px) {
  .app-main {
    width: min(1080px, calc(100% - 2rem));
  }
}
