:root {
  color-scheme: dark;
  --bg: #0b1016;
  --panel: #111923;
  --panel-soft: #151f2b;
  --line: #243242;
  --text: #f4f8fc;
  --muted: #8fa1b4;
  --blue: #2c91ff;
  --cyan: #54dbff;
  --green: #72e2a7;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--text); background: radial-gradient(circle at 75% -10%, rgba(44,145,255,.16), transparent 32rem), var(--bg); }
body.dialog-open { overflow: hidden; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }

.development-banner { min-height: 34px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 7px 20px; background: #12273a; border-bottom: 1px solid rgba(84,219,255,.24); color: #a8bbce; font-size: 11px; letter-spacing: .02em; text-align: center; }
.development-banner strong { color: var(--cyan); text-transform: uppercase; letter-spacing: .1em; font-size: 10px; }
.site-header { min-height: 76px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: 0 max(24px, calc((100vw - 1260px) / 2)); border-bottom: 1px solid rgba(143,161,180,.14); background: rgba(11,16,22,.84); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 11px; font-size: 20px; font-weight: 760; letter-spacing: -.03em; white-space: nowrap; }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.brand b { color: var(--cyan); }
.nav-tabs { display: flex; align-items: stretch; align-self: stretch; justify-content: center; gap: 6px; }
.tab { border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 0 12px; color: var(--muted); cursor: pointer; }
.tab:hover, .tab.active { color: var(--text); }
.tab.active { border-bottom-color: var(--blue); }
.back-link { color: var(--muted); justify-self: center; }
.connection-actions { display: flex; align-items: center; gap: 8px; }
body.auth-pending .connection-actions { visibility: hidden; }
.header-action { min-height: 40px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; color: #c4d1de; background: var(--panel); cursor: pointer; white-space: nowrap; font-size: 12px; font-weight: 750; }
.header-action.primary { border-color: rgba(44,145,255,.45); background: linear-gradient(135deg, #227ee7, #195be4); color: white; }
.ton-mark { display: inline-grid; place-items: center; margin-right: 5px; color: #cce8ff; }

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.hero { padding: 88px 0 68px; max-width: 850px; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: var(--cyan); font-size: 12px; font-weight: 800; letter-spacing: .15em; margin: 0 0 18px; }
.eyebrow span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(114,226,167,.11); }
h1 { font-size: clamp(44px, 6.6vw, 76px); line-height: 1.02; letter-spacing: -.055em; margin: 0; }
h1 em { font-style: normal; color: var(--muted); }
.hero-copy { color: var(--muted); font-size: 18px; line-height: 1.7; max-width: 700px; margin: 26px 0 30px; }
.search-form { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 12px; max-width: 720px; border: 1px solid var(--line); padding: 8px 9px 8px 18px; border-radius: 16px; background: var(--panel); box-shadow: 0 18px 60px rgba(0,0,0,.22); }
.search-form svg { width: 22px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
.search-form input { min-width: 0; height: 50px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 16px; }
.search-form button, .primary-link, .primary-button { border: 0; border-radius: 11px; padding: 15px 22px; background: linear-gradient(135deg, var(--blue), #1768ff); color: white; font-weight: 760; cursor: pointer; box-shadow: 0 8px 24px rgba(44,145,255,.25); }
.secondary-button { border: 1px solid var(--line); border-radius: 11px; padding: 14px 21px; background: var(--panel-soft); color: var(--text); font-weight: 760; cursor: pointer; }
.trust-note { margin-top: 18px; color: #718499; font-size: 12px; line-height: 1.5; }
.trust-note strong { color: #9fb0c1; }

.market-section { padding: 10px 0 92px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-heading .eyebrow { margin-bottom: 8px; }
h2 { font-size: 34px; letter-spacing: -.04em; margin: 0; }
.market-meta { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; }
.ghost-button { border: 1px solid var(--line); border-radius: 9px; background: var(--panel); padding: 9px 13px; cursor: pointer; }
.table-shell { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--panel); box-shadow: 0 22px 80px rgba(0,0,0,.22); }
.table-head, .listing-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(140px, .55fr) minmax(130px, .45fr); gap: 20px; align-items: center; }
.table-head { padding: 15px 22px; color: #718499; font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; background: rgba(255,255,255,.018); }
.listing-row { min-height: 82px; padding: 14px 22px; border-top: 1px solid var(--line); transition: background .18s ease, transform .18s ease; }
.listing-row:hover { background: var(--panel-soft); }
.collectible-cell { display: flex; align-items: center; gap: 14px; min-width: 0; }
.collectible-avatar { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; flex: 0 0 auto; background: linear-gradient(145deg, rgba(44,145,255,.24), rgba(84,219,255,.08)); border: 1px solid rgba(84,219,255,.2); color: var(--cyan); font-weight: 850; }
.collectible-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.collectible-cell span:last-child { min-width: 0; }
.collectible-cell strong, .collectible-cell small, .price-cell strong, .price-cell small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.collectible-cell strong { font-size: 16px; }
.collectible-cell small, .price-cell small { color: var(--muted); margin-top: 5px; font-size: 12px; }
.price-cell strong { font-size: 15px; }
.price-cell i { color: var(--cyan); font-size: 10px; font-style: normal; letter-spacing: .08em; }
.closing-cell { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13px; }
.closing-cell b { color: var(--blue); font-size: 27px; font-weight: 300; }
.listing-list.loading { opacity: .55; }
.empty-state { padding: 56px 22px; border-top: 1px solid var(--line); text-align: center; color: var(--muted); }
.error-state { color: #ff9b9b; }
.status { color: #64778b; font-size: 12px; margin: 14px 4px 0; }

.service-section { padding: 4px 0 96px; }
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.service-card { position: relative; min-height: 300px; display: flex; flex-direction: column; align-items: flex-start; padding: 34px; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: linear-gradient(145deg, rgba(44,145,255,.09), transparent 60%), var(--panel); }
.service-card::after { content: ""; position: absolute; width: 210px; height: 210px; right: -90px; top: -90px; border: 1px solid rgba(84,219,255,.11); border-radius: 50%; box-shadow: 0 0 0 30px rgba(84,219,255,.025), 0 0 0 60px rgba(84,219,255,.018); }
.service-number { color: var(--cyan); font-size: 12px; font-weight: 850; letter-spacing: .15em; }
.service-card h2 { margin: 56px 0 12px; font-size: 28px; }
.service-card p { min-height: 48px; margin: 0 0 28px; color: var(--muted); line-height: 1.6; }
.service-card .primary-button { margin-top: auto; position: relative; z-index: 1; }
.service-card .primary-button b { margin-left: 12px; }
.service-how { margin-top: 16px; padding: 34px; border: 1px solid var(--line); border-radius: 22px; background: rgba(17,25,35,.72); }
.service-how h2 { margin-bottom: 10px; }
.service-how p:last-child { max-width: 780px; color: var(--muted); line-height: 1.7; }

.item-main { padding: 64px 0 100px; }
.item-card { display: grid; grid-template-columns: minmax(300px, .9fr) minmax(360px, 1.1fr); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: var(--panel); min-height: 590px; }
.item-image-wrap { display: grid; place-items: center; min-height: 520px; padding: 36px; background: radial-gradient(circle, rgba(44,145,255,.16), transparent 58%), #0e151d; }
.item-image-wrap img { width: 100%; max-width: 440px; max-height: 500px; object-fit: contain; border-radius: 18px; }
.item-content { display: flex; flex-direction: column; justify-content: center; padding: clamp(34px, 6vw, 78px); }
.item-content h1 { font-size: clamp(38px, 5vw, 64px); }
.item-description { color: var(--muted); line-height: 1.7; }
.item-price { margin: 28px 0; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.item-price span, .item-price strong { display: block; }
.item-price span { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.item-price strong { font-size: 28px; }
.item-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.primary-link { display: inline-block; align-self: flex-start; margin-top: 16px; }
.skeleton-card { opacity: .68; }

.stub-dialog { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.stub-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(2,6,10,.78); backdrop-filter: blur(10px); cursor: default; }
.stub-card { position: relative; width: min(460px, 100%); padding: 36px; border: 1px solid #2f4154; border-radius: 22px; background: linear-gradient(145deg, #172433, #0f1720); box-shadow: 0 30px 120px rgba(0,0,0,.55); }
.stub-icon { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 26px; border-radius: 17px; background: rgba(44,145,255,.14); color: var(--cyan); font-size: 30px; }
.stub-card h2 { margin-bottom: 12px; }
.stub-card > p:not(.eyebrow) { color: var(--muted); line-height: 1.65; margin-bottom: 26px; }

footer { width: min(1180px, calc(100% - 40px)); min-height: 88px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid rgba(143,161,180,.14); color: #64778b; font-size: 12px; }
footer div { display: flex; gap: 22px; }
footer a:hover { color: var(--text); }
footer { box-sizing: border-box; width: 100%; min-height: 44px; height: 44px; padding: 0 max(24px,calc((100vw - 1260px)/2)); border-top: 0; color: #82909e; font-size: 12px; }
footer div { gap: 22px; }
.legal { max-width: 760px; padding: 70px 0 120px; }
.legal h1 { font-size: 50px; }
.legal h2 { font-size: 24px; margin-top: 38px; }
.legal p, .legal li { color: var(--muted); line-height: 1.75; }

@media (max-width: 760px) {
  footer { height: auto; min-height: 44px; padding: 12px 16px; }
  footer div { flex-wrap: wrap; }
  .development-banner { align-items: flex-start; flex-direction: column; gap: 2px; }
  .site-header { height: auto; min-height: 70px; grid-template-columns: 1fr auto; gap: 10px; padding: 14px 20px; top: 0; }
  .nav-tabs { grid-column: 1 / -1; grid-row: 2; overflow-x: auto; justify-content: flex-start; margin: 0 -20px -14px; padding: 0 20px; }
  .tab { min-height: 46px; }
  .connection-actions .header-action:first-child { display: none; }
  .header-action { padding: 0 11px; }
  main { width: min(100% - 28px, 1180px); }
  .hero { padding: 58px 0 48px; }
  h1 { font-size: 45px; }
  .hero-copy { font-size: 16px; }
  .search-form { grid-template-columns: 22px 1fr; }
  .search-form button { grid-column: 1 / -1; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .table-head { display: none; }
  .listing-row { grid-template-columns: 1fr auto; gap: 10px; padding: 15px; }
  .price-cell { text-align: right; }
  .closing-cell { grid-column: 1 / -1; padding-left: 60px; }
  .item-card { grid-template-columns: 1fr; }
  .item-image-wrap { min-height: 360px; }
  .service-grid { grid-template-columns: 1fr; }
  .service-card { min-height: 260px; }
  footer { align-items: flex-start; flex-direction: column; padding: 24px 0; }
}

/* Crisp Fragment menu symbols: CSS borders and clip-paths blurred or clipped on
   iOS compositing, so the final shapes use single vector assets. */
.mobile-menu-icon-terms,
.mobile-menu-icon-privacy {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 0;
  clip-path: none;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 24px 24px;
}
.mobile-menu-icon-terms {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20x%3D%224.25%22%20y%3D%222.75%22%20width%3D%2215.5%22%20height%3D%2218.5%22%20rx%3D%222.25%22%20stroke%3D%22white%22%20stroke-width%3D%221.5%22%2F%3E%3Cpath%20d%3D%22M7.5%208.4L9.15%2010.05L12.4%206.8M7.5%2014.25H16.5M7.5%2017.4H14.5%22%20stroke%3D%22white%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
}
.mobile-menu-icon-privacy {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12%202.75L19.25%205.75V11.1C19.25%2016.15%2016.3%2019.55%2012%2021.25C7.7%2019.55%204.75%2016.15%204.75%2011.1V5.75L12%202.75Z%22%20stroke%3D%22white%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M8.25%2011.8L10.65%2014.2L15.9%208.95%22%20stroke%3D%22white%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
}
.mobile-menu-icon-terms::before,
.mobile-menu-icon-terms::after,
.mobile-menu-icon-privacy::before,
.mobile-menu-icon-privacy::after { content: none; }

/* My Assets mirrors Fragment's username view. Username collectibles are text
   rows; media thumbnails remain exclusive to gifts and number collectibles. */
.account-username-upgrade {
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
  padding: 12px 20px 13px 23px;
  border-radius: 7px;
  background: #222c36;
}
.account-username-upgrade::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #2da5ef;
}
.account-username-upgrade h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  color: #f5f7f9;
  font-size: 16px;
  line-height: 20px;
}
.account-username-upgrade h3 b {
  padding: 2px 7px;
  border-radius: 5px;
  background: #289fe9;
  color: #fff;
  font-size: 12px;
  line-height: 16px;
}
.account-username-upgrade p {
  margin: 0;
  color: #8996a3;
  font-size: 14px;
  line-height: 19px;
}
.account-username-upgrade a { color: #2aa4ef; }
.account-username-upgrade .ton-gem { width: 13px; height: 15px; margin: 0 2px; vertical-align: -3px; }
.account-asset-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: #2b3642;
}
.account-asset-more span { width: 3px; height: 3px; border-radius: 50%; background: #fff; }
.account-asset-row-username { grid-template-columns: minmax(0,1fr) 132px 34px 14px; }
.account-table-head-usernames { grid-template-columns: minmax(0,1fr) 132px 34px 14px; }
.account-table-head-usernames > span:nth-child(2) { grid-column: 2 / 4; }

@media (max-width: 760px) {
  .account-username-upgrade {
    padding: 10px 15px 11px 19px;
    border-radius: 6px;
  }
  .account-username-upgrade h3 {
    gap: 7px;
    margin-bottom: 4px;
    font-size: 14px;
    line-height: 18px;
  }
  .account-username-upgrade h3 b {
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
    line-height: 16px;
  }
  .account-username-upgrade p { font-size: 13px; line-height: 17px; }

  .account-table-head-usernames,
  .account-asset-row-username {
    grid-template-columns: minmax(0, 1fr) 116px 32px 11px;
    gap: 6px;
    padding-right: 8px;
    padding-left: 14px;
  }
  .account-table-head-usernames { min-height: 30px; }
  .account-asset-row-username { min-height: 45px; padding-top: 4px; padding-bottom: 4px; }
  .account-asset-row-username strong { font-size: 14px; }
  .account-asset-row-username small { margin-top: 0; font-size: 11px; }
  .account-asset-row-username .account-blue-button {
    box-sizing: border-box;
    width: 116px;
    max-width: 116px;
    min-height: 32px;
    padding: 0 8px;
    overflow: visible;
    font-size: 11.5px;
    line-height: 16px;
    text-overflow: clip;
    white-space: nowrap;
  }
  .account-asset-row-username .account-asset-more { width: 32px; height: 32px; }
  .account-asset-row-username .account-row-link { width: 11px; font-size: 22px; }
}

@media (max-width: 380px) {
  .account-table-head-usernames,
  .account-asset-row-username {
    grid-template-columns: minmax(0, 1fr) 106px 30px 10px;
    gap: 5px;
    padding-right: 7px;
    padding-left: 10px;
  }
  .account-asset-row-username .account-blue-button {
    width: 106px;
    max-width: 106px;
    padding: 0 5px;
    font-size: 10.5px;
  }
  .account-asset-row-username .account-asset-more { width: 30px; height: 30px; }
}

@media (min-width: 761px) and (max-width: 1100px) {
  .connection-actions .header-action:first-child { display: none; }
  .tab { padding: 0 7px; font-size: 12px; }
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Marketplace layout follows the public Fragment browsing screens. */
:root { --bg: #1b2026; --panel: #242e39; --panel-soft: #283441; --line: #303b47; --text: #f5f6f8; --muted: #8995a3; --blue: #3199df; --cyan: #47a8e7; }
body { background: var(--bg); }
.development-banner { min-height: 28px; padding: 5px 14px; background: #172b38; font-size: 11px; }
.site-header { min-height: 56px; padding: 0 24px; gap: 22px; background: #202b35; border-bottom: 0; backdrop-filter: none; }
.brand { gap: 7px; font-size: 16px; font-weight: 900; letter-spacing: -.055em; }
.brand img { width: 25px; height: 25px; border-radius: 0; }
.brand b { color: var(--cyan); font-size: 9px; letter-spacing: 0; align-self: flex-end; }
.nav-tabs { justify-content: flex-start; gap: 0; }
.tab { padding: 0 13px; border-bottom-width: 3px; font-size: 13px; font-weight: 700; }
.header-action { min-height: 36px; padding: 0 13px; border: 0; border-radius: 7px; background: #2a3643; font-size: 13px; }
.header-action.primary { border: 0; background: #2e9adf; }
.market-main { width: min(712px, calc(100% - 32px)); }
.market-main .hero { max-width: none; padding: 36px 0 0; text-align: center; }
.market-main .hero-eyebrow { display: none; }
.market-main h1 { font-size: 28px; line-height: 1.25; letter-spacing: -.035em; }
.market-main .hero-copy { max-width: 620px; margin: 12px auto 35px; color: #8995a3; font-size: 14px; line-height: 1.55; }
.market-main .hero-copy a { color: var(--blue); }
.market-main .hero-copy strong, .market-main .hero-note strong { color: inherit; font-weight: 700; }
.market-main .search-form { grid-template-columns: 25px minmax(0, 1fr); max-width: none; min-height: 54px; gap: 14px; padding: 0 19px; border: 0; border-radius: 7px; background: #26323e; box-shadow: none; text-align: left; }
.market-main .search-form input { height: 54px; font-size: 14px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.market-main .market-section { padding: 34px 0 80px; }
.market-main .section-heading { align-items: center; margin: 0 13px 14px; }
.market-main h2 { font-size: 20px; letter-spacing: -.025em; }
.market-main .market-meta { gap: 10px; }
.market-main .ghost-button { min-height: 38px; padding: 0 13px; border: 0; border-radius: 7px; color: #f4f6f8; background: #26323e; font-size: 13px; font-weight: 700; }
.market-main select.ghost-button { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%238995a3' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; cursor: pointer; }
.market-main .ghost-button span { margin-left: 8px; color: var(--muted); }
.market-main .table-shell { border: 0; border-radius: 7px; background: #222c36; box-shadow: none; }
.market-main .table-head, .market-main .listing-row { grid-template-columns: minmax(0,1.3fr) minmax(110px,.8fr) minmax(150px,1fr) 18px; gap: 12px; }
.market-main .table-head { min-height: 38px; padding: 9px 20px; color: #99a4b0; background: #2b3642; font-size: 12px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.market-main .listing-row { min-height: 58px; padding: 8px 20px; border-top: 1px solid #303a46; }
.market-main .listing-row:hover { background: #2a3541; }
.market-main .collectible-cell { gap: 9px; }
.market-main .collectible-avatar { width: 36px; height: 36px; border: 0; border-radius: 5px; background: transparent; }
.market-main .collectible-avatar img { border-radius: 5px; }
.market-main .collectible-cell strong, .market-main .price-cell strong, .market-main .closing-cell strong { display: block; color: #f0f3f6; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.market-main .collectible-cell small { margin-top: 1px; color: var(--blue); font-size: 13px; }
.market-main .price-cell small, .market-main .closing-cell small { display: block; margin-top: 3px; color: #8995a3; font-size: 13px; white-space: nowrap; }
.market-main .price-cell i { color: #49b8ef; font-size: 13px; font-style: normal; letter-spacing: 0; }
.market-main .closing-cell { display: block; color: inherit; font-size: inherit; }
.market-main .row-chevron { color: #667380; font-size: 28px; font-weight: 300; line-height: 1; }
.resale-badge { margin-left: 6px; padding: 2px 4px; border-radius: 3px; background: #344251; color: #aab4c0; font-size: 10px; font-style: normal; }
.market-main .status { display: flex; align-items: center; gap: 12px; margin: 12px 2px 0; color: #778696; font-size: 11px; }
.market-main .status #ton-rate { margin-left: auto; }
.market-main .status button { padding: 2px 6px; border: 0; background: none; color: var(--blue); cursor: pointer; }
.market-main .service-section { padding-top: 30px; }

@media (max-width: 760px) {
  .site-header { min-height: 56px; grid-template-columns: auto 1fr; gap: 0; padding: 0 14px; }
  .brand { font-size: 14px; }
  .brand img { width: 23px; height: 23px; }
  .nav-tabs { grid-column: 1 / -1; grid-row: 2; min-height: 46px; margin: 0 -14px; padding: 0 10px; }
  .tab { flex: 0 0 auto; min-height: 46px; padding: 0 12px; }
  .connection-actions { justify-self: end; }
  .header-action { padding: 0 9px; font-size: 11px; }
  .market-main { width: calc(100% - 24px); }
  .market-main .hero { padding-top: 34px; }
  .market-main h1 { font-size: 25px; }
  .market-main .hero-copy { margin-bottom: 26px; }
  .market-main .section-heading { align-items: flex-start; gap: 13px; margin: 0 2px 12px; }
  .market-main .market-meta { width: 100%; }
  .market-main .ghost-button { flex: 1; }
  .market-main .table-head { display: grid; grid-template-columns: minmax(0,1fr) 102px 18px; padding: 9px 12px; }
  .market-main .table-head span:nth-child(3) { display: none; }
  .market-main .listing-row { grid-template-columns: minmax(0,1fr) 102px 18px; gap: 7px; padding: 9px 12px; }
  .market-main .price-cell { text-align: left; }
  .market-main .closing-cell { grid-column: 1 / 3; padding: 2px 0 0; }
  .market-main .closing-cell strong, .market-main .closing-cell small { display: inline; font-size: 11px; font-weight: 400; }
  .market-main .closing-cell small { margin-left: 7px; }
  .market-main .row-chevron { grid-column: 3; grid-row: 1 / 3; align-self: center; }
}

/* Responsive public catalogue presentation. The independent preview marker stays visible. */
.mobile-menu-toggle, .mobile-menu { display: none; }
.hero-note { max-width: 690px; margin: 0 auto 34px; color: var(--muted); font-size: 14px; line-height: 1.55; text-align: center; }
.market-main .hero:has(.hero-note:not([hidden])) .hero-copy { margin-bottom: 24px; }
.market-main .hero:has(.hero-note:not([hidden])) { padding-top: 36px; }
.market-main .hero.without-intro { padding-top: 0; display: flex; align-items: center; gap: 12px; }
.market-main .hero.without-intro #hero-title, .market-main .hero.without-intro .hero-copy { display: none; }
.market-main .hero.without-intro .search-form { flex: 1 1 auto; }
.gift-collections { flex: 0 0 210px; min-width: 0; height: 54px; padding: 0 15px; border: 0; border-radius: 7px; outline: none; color: #f4f6f8; background: #26323e; font: inherit; font-size: 14px; font-weight: 700; }
.search-form:has(#number-prefix:not([hidden])) { grid-template-columns: 25px auto minmax(0,1fr); }
#number-prefix { white-space: nowrap; font-size: 14px; font-weight: 700; }
.market-main .gift-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; background: transparent; }
.market-main .table-shell:has(.gift-grid) { overflow: visible; background: transparent; }
.gift-card { min-width: 0; overflow: hidden; border-radius: 8px; background: #222c36; }
.gift-art { display: block; position: relative; aspect-ratio: 1; background: #303742; }
.gift-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gift-number { position: absolute; bottom: 6px; left: 7px; padding: 2px 5px; border-radius: 5px; background: rgba(24,29,36,.64); color: white; font-size: 11px; font-weight: 700; }
.gift-info { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 5px; font-weight: 750; white-space: nowrap; }
.gift-info strong::before { content: '◆'; margin-right: 4px; color: #47bafa; font-size: .86em; }
.gift-status { padding: 2px 5px; border-radius: 4px; background: #37353e; color: #e86372; font-size: 11px; }
.mobile-closing { display: none !important; }
.ton-gem { display: inline-block; width: 14px; height: 17px; margin-right: 3px; background: url('/assets/ton-gem.svg') center/contain no-repeat; vertical-align: -4px; }
.market-main .service-section { padding: 42px 0 90px; }
.service-grid { display: flex; justify-content: center; gap: 30px; }
.service-card { align-items: center; width: 300px; min-height: 360px; padding: 32px 30px 36px; border: 0; border-radius: 14px; background: #242e39; text-align: center; }
.service-card::after { display: none; }
.service-illustration { display: block; width: 200px; height: 125px; margin: 0 auto 16px; background-position: center; background-repeat: no-repeat; background-size: contain; }
.service-card h2 { margin: 0 0 12px; font-size: 22px; letter-spacing: -.025em; }
.service-card p { min-height: 72px; margin: 0 0 24px; color: #96a0ac; font-size: 14px; line-height: 1.5; }
.service-card .primary-button { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 46px; padding: 0 10px; border-radius: 6px; background: #298ed3; box-shadow: none; font-size: 14px; }
.service-card .primary-button:hover { background: #319de4; }
.market-main .hero.without-intro:has(+ .service-section:not([hidden])) { display: none; }
.market-main .market-section:has(.gift-grid) { padding-top: 28px; }

@media (max-width: 760px) {
  .site-header { min-height: 61px; grid-template-columns: 1fr auto; }
  .brand { font-size: 16px; }
  .brand img { width: 26px; height: 26px; }
  .connection-actions { display: none; }
  .mobile-menu-toggle { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; padding: 8px; border: 0; background: transparent; }
  .mobile-menu-toggle span { display: block; height: 2px; border-radius: 2px; background: #eef3f7; }
  .mobile-menu { display: flex; position: fixed; z-index: 30; top: 90px; right: 0; flex-direction: column; gap: 10px; width: min(280px,85vw); min-height: 330px; padding: 25px; background: #20242a; box-shadow: -20px 20px 50px #0007; }
  .mobile-menu p { margin: 0 0 12px; color: #8e9ba7; }
  .mobile-menu button { min-height: 40px; border: 0; border-radius: 6px; background: #2b96d9; color: white; }
  .mobile-menu a { padding: 8px 0; }
  .nav-tabs { min-height: 50px; }
  .nav-tabs { scrollbar-width: none; }
  .nav-tabs::-webkit-scrollbar { display: none; }
  .tab { min-height: 50px; font-size: 14px; }
  .market-main .hero { padding-top: 22px; }
  .market-main h1 { font-size: 25px; }
  .market-main .hero-copy, .hero-note { font-size: 13px; }
  .market-main .hero-copy { margin: 10px auto 23px; }
  .hero-note { margin-bottom: 24px; }
  .market-main .search-form { min-height: 45px; }
  .market-main .search-form input { height: 45px; font-size: 14px; }
  .market-main .hero.without-intro { padding-top: 20px; }
  .gift-collections { flex-basis: 34%; height: 45px; font-size: 13px; }
  .market-main .section-heading { flex-direction: row; align-items: center; gap: 4px; margin: 0 5px 12px; }
  .market-main h2 { font-size: 19px; white-space: nowrap; }
  .market-main .market-meta { width: auto; margin-left: auto; gap: 5px; }
  .market-main .ghost-button { flex: 0 0 auto; min-height: 34px; max-width: 95px; padding: 0 7px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
  .market-main select.ghost-button { padding-right: 15px; background-position: right 4px center; }
  .market-main .gift-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; }
  .gift-info { min-height: 34px; gap: 4px; font-size: 12px; }
  .gift-status { font-size: 10px; }
  .market-main .table-head { grid-template-columns: minmax(0,1fr) 37.5% 12px; }
  .market-main .listing-row { grid-template-columns: minmax(0,1fr) 37.5% 12px; min-height: 58px; }
  .market-main .closing-cell { display: none; }
  .market-main .row-chevron { grid-row: 1; }
  .mobile-closing { display: block !important; }
  .market-main .price-cell small:not(.mobile-closing) { display: none; }
  .market-main .service-section { padding-top: 42px; }
  .service-grid { align-items: center; flex-direction: column; gap: 18px; }
  .service-card { width: min(300px,84vw); min-height: 350px; }
  .service-card p { min-height: 70px; }
}

@media (min-width: 761px) {
  .site-header .nav-tabs { position: relative; left: 5px; }
  .site-header .tab { font-size: 14px; }
  .market-main:has(.service-section:not([hidden])) .service-section { padding: 42px 0; }
  .market-main:has(.service-section:not([hidden])) .service-grid { padding-bottom: 15px; }
  .market-main:has(.service-section:not([hidden])) .service-card { min-height: 360px; border-radius: 16px; }
  .market-main:has(.service-section:not([hidden])) .service-card h2 { font-size: 23.2px; }
  .market-main:has(.service-section:not([hidden])) .service-card p { font-size: 15px; }
  .market-main:has(.service-section:not([hidden])) .service-card .primary-button { min-height: 46px; font-size: 15px; }
  .detail-main { box-sizing: border-box; min-height: calc(100vh - 100px); }
  .market-main.gifts-mode { width: min(1220px,calc(100% - 60px)); display: grid; grid-template-columns: 292px minmax(0,1fr); column-gap: 28px; align-items: start; }
  .market-main.gifts-mode .hero { grid-column: 1; grid-row: 1; margin-top: 46px; }
  .market-main.gifts-mode .hero .gift-collections { display: none; }
  .market-main.gifts-mode .gift-sidebar { grid-column: 1; grid-row: 1; max-height: 690px; overflow-y: auto; margin-top: 105px; border-radius: 6px; background: #222c36; scrollbar-width: thin; }
  .market-main.gifts-mode .market-section { grid-column: 2; grid-row: 1; padding-top: 28px; }
  .market-main.gifts-mode .section-heading { margin: 0 0 10px; }
  .market-main.gifts-mode .gift-grid { grid-template-columns: repeat(4,minmax(150px,167px)); justify-content: space-between; gap: 12px; }
  .market-main.gifts-mode .gift-sidebar h3 { margin: 0; padding: 13px 15px; background: #2a3642; font-size: 14px; }
  .gift-collection-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 35px; padding: 4px 15px; border: 0; background: transparent; color: #dce4ec; text-align: left; cursor: pointer; font-size: 13px; }
  .gift-collection-row:hover, .gift-collection-row.selected { background: #288dd0; color: white; }
  .gift-collection-row img { width: 23px; height: 23px; object-fit: contain; }
  .gift-collection-row small { margin-left: auto; color: #a7b0ba; }
  .gift-collection-row.selected small { color: white; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .market-main.gifts-mode .gift-grid { grid-template-columns: repeat(3,minmax(140px,1fr)); }
}
@media (max-width: 760px) {
  .gift-sidebar { display: none !important; }
}

/* Shared Fragment presentation; the persistent demo label is part of the wordmark. */
@font-face { font-family: ProductSans; src: url('/assets/ProductSansRegular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: ProductSans; src: url('/assets/ProductSansBold.ttf') format('truetype'); font-weight: 700 900; font-display: swap; }
:root { font-family: ProductSans, -apple-system, system-ui, sans-serif; --bg: #1a2026; --panel: #212a33; --muted: #8794a1; --blue: #288fd2; }
body { font-family: ProductSans, -apple-system, system-ui, sans-serif; }
.development-banner { display: none !important; }
.site-header { position: sticky; top: 0; z-index: 20; height: 56px; min-height: 56px; display: flex; align-items: stretch; gap: 0; padding: 0 20px; background: rgba(33,42,51,.9); }
.brand { display: inline-flex; align-self: center; align-items: center; flex: 0 0 auto; gap: 3px; height: 48px; font-size: inherit; letter-spacing: 0; }
.brand-symbol { display: block; width: 34px !important; height: 34px !important; border: 0 !important; border-radius: 0 !important; }
.brand-wordmark { display: block; width: 101px !important; height: 24px !important; border: 0 !important; border-radius: 0 !important; }
.demo-badge { align-self: center; margin-left: 5px; color: #fff; font-size: 13px; line-height: 1; font-weight: 700; letter-spacing: 0; text-transform: lowercase; }
.demo-badge { display: none; }
.site-header .nav-tabs { flex: 0 1 auto; justify-content: flex-start; align-items: stretch; align-self: stretch; margin: 0 auto; overflow: visible; }
.site-header .tab { display: inline-flex; align-items: center; flex: 0 0 auto; min-height: 56px; padding: 0 13px; color: #8994a0; font-size: 13px; line-height: 20px; font-weight: 700; border-bottom: 3px solid transparent; }
.site-header .tab.active { color: #fff; border-bottom-color: #2596df; }
.connection-actions { flex: 0 0 auto; align-self: center; margin-left: auto; }
.header-action { min-height: 36px; padding: 0 13px; border-radius: 6px; background: #293542; color: #fff; font-size: 13px; }
.header-action.primary { background: #2f98dc; }
.header-action .ton-mark, .mobile-menu .ton-mark { display: inline-block; width: 18px; height: 18px; margin-right: 6px; vertical-align: -4px; }
.telegram-mark { display: inline-block; width: 16px; height: 16px; margin-right: 6px; color: currentColor; vertical-align: -3px; }
.mobile-menu-toggle { display: none; }
.mobile-menu { top: 0; right: 0; height: 100dvh; width: min(288px,75vw); gap: 0; padding: 26px 18px 0; background: #1b1f24; box-shadow: -100vw 0 0 100vw rgba(3,8,12,.76); }
.mobile-menu h4 { position: relative; top: 3px; margin: 0 0 5px; color: #8794a1; font-size: 12px; line-height: 14px; font-weight: 700; text-transform: uppercase; }
.mobile-menu > a { display: grid; grid-template-columns: 24px 1fr; align-items: center; gap: 16px; width: auto; min-height: 42px; margin: 0 -18px; padding: 0 18px; color: white; font-size: 16px; }
.mobile-menu .mobile-menu-close { position: absolute; top: 14px; right: 14px; width: 34px; min-height: 34px; height: 34px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.mobile-menu-close::before, .mobile-menu-close::after { content: ''; position: absolute; top: 16px; left: 4px; width: 27px; height: 2px; border-radius: 2px; background: #fff; transform: rotate(45deg); }
.mobile-menu-close::after { transform: rotate(-45deg); }
.mobile-menu-icon { position: relative; box-sizing: border-box; display: inline-block; width: 22px; height: 22px; color: #fff; }
.mobile-menu-icon-about { display: grid; place-items: center; border: 1.5px solid currentColor; border-radius: 50%; }
.mobile-menu-icon-about::after { content: 'i'; font-size: 14px; line-height: 1; font-weight: 700; }
.mobile-menu-icon-terms { border: 1.5px solid currentColor; border-radius: 4px; }
.mobile-menu-icon-terms::before { content: ''; position: absolute; left: 5px; top: 5px; width: 8px; height: 4px; border-left: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(-45deg); }
.mobile-menu-icon-terms::after { content: ''; position: absolute; left: 5px; right: 4px; bottom: 4px; height: 1.5px; background: currentColor; box-shadow: 0 -4px currentColor; }
.mobile-menu-icon-privacy { border: 1.5px solid currentColor; border-radius: 50% 50% 45% 45%; clip-path: polygon(50% 0,100% 19%,92% 72%,72% 94%,50% 100%,28% 94%,8% 72%,0 19%); }
.mobile-menu-icon-privacy::after { content: ''; position: absolute; left: 5px; top: 6px; width: 9px; height: 5px; border-left: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(-45deg); }
.mobile-menu-footer { box-sizing: border-box; flex: 0 0 205px; width: calc(100% + 36px); height: 205px; margin: auto -18px 0; padding: 40px 12px 0; text-align: center; }
.mobile-menu-footer p { margin: 0; color: #f5f6f8; font-size: 15px; line-height: 20px; }
.mobile-menu-footer button { width: 100%; min-height: 38px; height: 38px; margin-top: 20px; }
.mobile-menu-footer button + button { margin-top: 18px; }
.mobile-menu-footer button:nth-of-type(2) { background: #242e39; }
.market-main .hero-copy, .market-main .hero-note { color: #8794a1; }
.market-main .hero-copy strong, .market-main .hero-note strong { font-weight: 700; }
.market-main .table-shell { background: #212a33; }
.market-main .table-head { color: #8c9aa9; background: #293440; }
.market-main .listing-row,
.market-main .listing-row:nth-child(even) { background: #212a33; border-top-color: #1a2026; }
.market-main .listing-row:hover { background: #293440; }
.market-main .price-cell small { color: #8794a1; }
.service-card { background: #242e39; }
.service-card { width: 300px; min-height: 356px; padding: 15px 30px 36px; }
.service-illustration { margin-bottom: 4px; }
.service-illustration-ads-1 { position: relative; }
.service-illustration-ads-1::after { display: none; }
.service-card h2 { margin-bottom: 8px; font-size: 20px; line-height: 30px; }
.service-card p { min-height: 66px; margin-bottom: 30px; line-height: 22px; }
.service-card .primary-button { min-height: 42px; }
.market-main:has(.service-section:not([hidden])) .hero { display: none !important; }
.market-main:has(.service-section:not([hidden])) .service-section { padding-top: 42px; }

/* Read-only purchase forms mirror the production layout without enabling identity or payment flows. */
.service-form-section { width: 100%; padding: 34px 0 90px; }
.service-purchase-form { width: 100%; }
.service-form-header { margin: 0 0 30px; text-align: center; }
.service-form-header h1 { margin: 0; color: #f5f6f8; font-size: 28px; line-height: 38px; letter-spacing: -.025em; }
.service-form-header p { margin: 5px auto 0; color: #8d98a5; font-size: 14px; line-height: 21px; }
.service-title-accent { display: inline-block; width: 26px; height: 32px; margin-left: 4px; background: center/contain no-repeat; vertical-align: -8px; }
.service-title-icon-star { background-image: url('/assets/star.svg'); }
.service-title-icon-premium-star { background-image: url('/assets/premium-star.svg'); }
.service-field { margin-top: 29px; }
.service-field > label { display: flex; align-items: center; gap: 10px; margin: 0 0 13px 24px; color: #f4f6f8; font-size: 20px; line-height: 26px; font-weight: 700; }
.service-input { box-sizing: border-box; display: flex; align-items: center; width: 100%; height: 54px; gap: 14px; padding: 0 22px; border-radius: 7px; background: #26323e; color: #8d99a7; }
.service-input svg { flex: 0 0 24px; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.service-input > i { flex: 0 0 auto; }
.service-inline-icon { display: inline-block; width: 20px; height: 20px; background: center/contain no-repeat; }
.service-inline-icon-star { background-image: url('/assets/star.svg'); }
.counter-badge { display: inline-flex; flex: 0 0 auto; align-items: center; min-width: 46px; height: 32px; justify-content: center; padding: 0 8px; border-radius: 7px; background: #9b45ec; color: white; font-size: 15px; line-height: 1; font-style: normal; font-weight: 700; }
.service-input input { min-width: 0; width: 100%; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: white; font: inherit; font-size: 17px; }
.service-input input::placeholder { color: #8794a2; opacity: 1; }
.buy-for-myself { display: block; margin: 18px auto -20px; padding: 0; border: 0; background: transparent; color: #3aa9ef; font: inherit; font-size: 14px; line-height: 19px; cursor: pointer; }
.service-recipient-input { position: relative; }
.recipient-loading { box-sizing: border-box; flex: 0 0 auto; width: 18px; height: 18px; border: 2px solid rgba(138,153,168,.35); border-top-color: #3aa9ef; border-radius: 50%; animation: recipient-spin .7s linear infinite; }
.recipient-loading[hidden], .recipient-resolved[hidden] { display: none; }
@keyframes recipient-spin { to { transform: rotate(360deg); } }
.recipient-resolved { position: absolute; inset: 0; display: grid; grid-template-columns: 28px minmax(0,1fr) 24px; align-items: center; gap: 10px; padding: 0 12px 0 10px; border-radius: inherit; background: #26323e; }
.recipient-resolved img,
.recipient-avatar-fallback { grid-column: 1; grid-row: 1; width: 28px; height: 28px; border-radius: 50%; }
.recipient-avatar-fallback { display: grid; place-items: center; background: #3a9ddd; color: #fff; font-size: 9px; font-weight: 700; }
.recipient-resolved img { position: relative; z-index: 1; object-fit: cover; }
.recipient-resolved strong { min-width: 0; overflow: hidden; color: #f4f6f8; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.recipient-resolved button { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #8492a0; font: inherit; font-size: 22px; line-height: 1; cursor: pointer; }
.service-calculated-price { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 5px; color: #f4f6f8; font-size: 14px; font-weight: 600; white-space: nowrap; }
.service-calculated-price .ton-gem { margin: 0; }
.service-calculated-price[hidden] { display: none; }
.boost-mark { position: relative; display: inline-block; width: 13px; height: 13px; }
.boost-mark::before,
.boost-mark::after { content: ''; position: absolute; left: 5px; width: 7px; height: 3px; border-radius: 2px; background: currentColor; transform: rotate(32deg); }
.boost-mark::before { top: 2px; }
.boost-mark::after { top: 7px; left: 1px; }
.package-list { display: grid; gap: 10px; }
.package-option { position: relative; box-sizing: border-box; display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; min-height: 76px; padding: 0 28px; border: 2px solid transparent; border-radius: 8px; background: #25313d; cursor: pointer; }
.package-option.selected { border-color: #3ba8ed; }
.package-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.radio-ring { position: relative; box-sizing: border-box; width: 26px; height: 26px; border: 3px solid #8998a7; border-radius: 50%; }
.package-option.selected .radio-ring { border-color: #3ba8ed; }
.package-option.selected .radio-ring::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #3ba8ed; }
.package-name { display: flex; min-width: 0; align-items: center; gap: 8px; color: #f4f6f8; }
.package-name b { overflow: hidden; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
.package-name em { padding: 4px 7px; border-radius: 5px; background: #2f98dc; color: white; font-size: 12px; font-style: normal; font-weight: 700; }
.package-icon { width: 30px; height: 30px; background: center/contain no-repeat; }
.package-icon-star { background-image: url('/assets/star.svg'); }
.package-icon-multi-star { background-image: url('/assets/multi-star.svg'); }
.package-price { display: flex; align-items: baseline; gap: 12px; color: #f4f6f8; }
.package-price strong { display: flex; align-items: center; gap: 7px; font-size: 18px; white-space: nowrap; }
.package-price small { color: #98a3ae; font-size: 16px; text-decoration: line-through; white-space: nowrap; }
.package-price .ton-gem { margin: 0; }
.sale-pill { padding: 5px 9px; border-radius: 5px; background: #1e4137; color: #50dc8d; font-size: 13px; font-style: normal; }
.show-more-options { width: 100%; min-height: 64px; margin-top: 10px; border: 0; border-radius: 8px; background: #25313d; color: #3aa9ef; font: inherit; font-size: 18px; font-weight: 700; cursor: pointer; }
.show-more-options span { margin-left: 5px; }
.payment-methods { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.payment-method { display: flex; align-items: center; justify-content: center; min-width: 0; height: 70px; gap: 7px; border: 2px solid transparent; border-radius: 8px; background: #25313d; color: #f4f6f8; font: inherit; cursor: pointer; }
.payment-method.active { border-color: #3ba8ed; }
.payment-method b { font-size: 17px; }
.payment-method span { color: #9aa6b2; font-size: 15px; }
.token-usdt, .token-usdc { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: white; font-size: 14px; font-style: normal; font-weight: 700; }
.token-usdt { background: #27a99b; }
.token-usdc { background: #2c8bd3; }
.service-submit { width: 100%; height: 54px; margin-top: 28px; border: 0; border-radius: 7px; background: #2f98dc; color: rgba(255,255,255,.58); font: inherit; font-size: 17px; font-weight: 700; }
.transactions-link { display: block; margin-top: 24px; color: #3aa9ef; font-size: 16px; text-align: center; }

.service-input.valid { box-shadow: inset 0 0 0 1px #3ba8ed; }
.service-input.invalid { box-shadow: inset 0 0 0 1px #d35b64; }
.service-field-error { margin: 7px 16px 0; color: #e4757d; font-size: 12px; }
.payment-field { position: relative; }
.payment-network-menu { position: absolute; z-index: 8; top: calc(100% + 7px); right: 0; width: min(220px, 70vw); overflow: hidden; border: 1px solid #394957; border-radius: 8px; background: #25313d; box-shadow: 0 18px 45px rgba(0,0,0,.42); }
.payment-network-menu[hidden] { display: none; }
.payment-network-menu button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 42px; padding: 0 15px; border: 0; border-bottom: 1px solid rgba(143,161,180,.12); background: transparent; color: #edf2f6; font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.payment-network-menu button:last-child { border-bottom: 0; }
.payment-network-menu button:hover, .payment-network-menu button.selected { background: #2d3a47; }
.payment-network-menu button span { color: #3ba8ed; }
.payment-network-menu button b { margin-left: 7px; font-size: 13px; }
.payment-network-menu button > span { margin-left: auto; color: #8f9caa; font-size: 12px; }
.payment-network-menu button .token-usdt,
.payment-network-menu button .token-usdc { flex: 0 0 auto; }
.network-fee-hint { margin: 8px 19px 0; color: #8d98a5; font-size: 13px; line-height: 18px; }
.network-fee-hint[hidden] { display: none; }
.service-preview-submit { width: 100%; height: 54px; margin-top: 28px; border: 0; border-radius: 7px; background: #2f98dc; color: #fff; font: inherit; font-size: 17px; font-weight: 700; cursor: pointer; transition: opacity .16s ease, transform .16s ease, background .16s ease; }
.service-preview-submit:not(:disabled):active { transform: scale(.992); }
.service-preview-submit:disabled { background: #2a7fb5; color: rgba(255,255,255,.52); cursor: not-allowed; }

@media (min-width: 761px) {
  .connection-actions .header-action:first-child { width: 178px; }
  .connection-actions .header-action.primary { width: 145px; }
  .filter-wrap > .ghost-button { width: 123px; min-height: 36px; height: 36px; }
  .sort-wrap { position: relative; flex: 0 0 161px; width: 161px; height: 36px; border-radius: 6px; background: #26323e; }
  .sort-wrap .sort-button { min-height: 36px; height: 36px; }
  .market-main .market-meta { gap: 12px; }
  .market-main .market-section { padding-top: 33px; }
  .market-main .section-heading { margin-bottom: 12px; }
  .market-main.gifts-mode .market-section { padding-top: 34px; }
  .market-main.gifts-mode .section-heading { margin-bottom: 14px; }
  .market-main.gifts-mode .filter-wrap > .ghost-button { width: 100px; }
  .gift-layout-buttons { box-sizing: border-box; flex: 0 0 72px; width: 72px; }
  .brand-symbol { width: 25px !important; height: 25px !important; }
}

@media (max-width: 760px) {
  .package-fiat { display: block; color: #f4f6f8; font-size: 14px; font-weight: 600; white-space: nowrap; }
  .site-header { box-sizing: border-box; width: 100%; max-width: 100%; height: 90px; min-height: 90px; display: grid; grid-template-columns: minmax(0,1fr) 123px 52px; grid-template-rows: 48px 42px; column-gap: 0; padding: 0; overflow: hidden; }
  .brand { grid-column: 1; grid-row: 1; margin-left: 5px; justify-self: start; }
  .brand-symbol { width: 27px !important; height: 27px !important; transform: scale(1.3); }
  .brand-wordmark { width: 77px !important; height: 18px !important; }
  .demo-badge { margin-left: 2px; font-size: 11px; }
  .connection-actions { display: flex; grid-column: 2; grid-row: 1; min-width: 0; margin: 0; }
  .connection-actions .header-action:first-child { display: none; }
  .connection-actions .header-action.primary { min-width: 123px; min-height: 28px; padding: 0 7px; border-radius: 5px; font-size: 12px; }
  .connection-actions .ton-mark { width: 14px; height: 14px; margin-right: 4px; vertical-align: -3px; }
  .mobile-menu-toggle { display: flex; grid-column: 3; grid-row: 1; align-self: center; justify-self: center; width: 36px; height: 36px; padding: 8px 5px; }
  .mobile-menu-toggle span { height: 2px; }
  .site-header .nav-tabs { box-sizing: border-box; grid-column: 1 / -1; grid-row: 2; align-self: stretch; width: 100%; min-width: 0; min-height: 42px; margin: 0; padding: 0 15px 0 17px; overflow-x: auto; overflow-y: hidden; gap: 16px; scrollbar-width: none; }
  .site-header .tab { min-height: 42px; padding: 0; font-size: 14px; }
  .market-main { width: calc(100% - 20px); }
  .market-main .hero { padding: 21px 0 5px; }
  .market-main h1 { font-size: 22px; line-height: 30px; letter-spacing: -.02em; }
  .market-main .hero-copy { max-width: 355px; margin: 4px auto 21px; font-size: 13px; line-height: 17px; }
  .market-main .hero-note { max-width: 355px; margin: -2px auto 21px; font-size: 13px; line-height: 17px; }
  .market-main .hero:has(.hero-note:not([hidden])) .hero-copy { margin-bottom: 18px; }
  .market-main.numbers-mode .hero:has(.hero-note:not([hidden])) { padding-top: 21px; padding-bottom: 7px; }
  .market-main.numbers-mode .hero-note { margin-bottom: 22px; }
  .market-main .search-form { min-height: 42px; gap: 10px; padding: 0 15px; border-radius: 6px; }
  .market-main .search-form input { height: 42px; font-size: 14px; }
  .market-main .search-form svg { width: 18px; }
  .market-main .market-section { padding: 0 0 45px; }
  .market-main .section-heading { height: 55px; min-height: 55px; align-items: flex-end; margin: 0; padding: 12px 0 9px; gap: 5px; }
  .market-main h2 { font-size: 18px; line-height: 28px; letter-spacing: 0; }
  .market-main .section-heading h2 { margin-left: 6px; }
  .market-main .ghost-button { min-height: 28px; height: 28px; max-width: none; padding: 0 8px; font-size: 12px; }
  #auction-filter { width: auto; }
  #auction-filter .mobile-only { margin: 0; color: #f4f6f8; }
  .sort-wrap { min-width: 85px; width: 85px; height: 28px; }
  .market-main .table-head { min-height: 30px; padding: 7px 14px; font-size: 12px; }
  .market-main .listing-row { min-height: 44px; padding: 6px 14px; gap: 5px; }
  .market-main .listing-row:not(:last-child) { margin-bottom: 1px; }
  .market-main .collectible-cell strong, .market-main .price-cell strong { font-size: 14px; }
  .market-main .collectible-cell small, .market-main .price-cell small { font-size: 11px; }
  .market-main .collectible-cell small { margin-top: 0; }
  .market-main .price-cell small { margin-top: 0; }
  .market-main .row-chevron { font-size: 22px; }
  .market-main .service-section { padding: 42px 0 70px; }
  .service-card { width: min(300px,88vw); min-height: 356px; }
  .market-main .hero.without-intro { padding-top: 18px; padding-bottom: 0; gap: 9px; }
  .market-main .hero.without-intro .search-form { min-height: 36px; }
  .market-main .hero.without-intro .search-form input { height: 36px; }
  .market-main .market-section:has(.gift-grid) { padding-top: 5px; }
  .market-main.gifts-mode .market-section { padding-bottom: 92px; }
  .market-main .market-section:has(.gift-grid) h2 { font-size: 20px; line-height: 28px; }
  .gift-collections { flex: 0 0 134px; height: 36px; }
  .market-main .gift-grid { gap: 5px; }
  .service-form-section { padding: 21px 0 77px; }
  .service-form-header { margin-bottom: 0; }
  .service-form-header h1 { font-size: 22px; line-height: 30px; }
  .service-form-header p { max-width: 360px; margin-top: 4px; font-size: 13px; line-height: 17px; }
  .service-field { margin-top: 10px; }
  .service-field:first-of-type { margin-top: 19px; }
  .service-field:not(.package-field):not(.payment-field) { padding-bottom: 22px; }
  .service-field > label { margin: 0 0 12px 19px; font-size: 15px; line-height: 23px; }
  .package-field > label { margin-bottom: 8px; }
  .service-input { height: 42px; gap: 10px; padding: 0 15px; border-radius: 6px; }
  .service-input svg { flex-basis: 18px; width: 18px; height: 18px; }
  .service-inline-icon { width: 16px; height: 16px; }
  .counter-badge { min-width: 32px; height: 24px; padding: 0 6px; border-radius: 5px; font-size: 12px; }
  .service-input input { font-size: 14px; }
  .package-list { display: flex; flex-direction: column; gap: 0; }
  .package-option { grid-template-columns: 34px minmax(0,1fr) auto; min-height: 57px; height: 57px; padding: 0 15px; border-radius: 7px; }
  .package-option + .package-option { margin-top: -1px; }
  .market-main.premium-mode .package-field > label { height: 23px; }
  .market-main.premium-mode .sale-pill { box-sizing: border-box; height: 23px; padding: 0 7px; line-height: 23px; }
  .market-main.premium-mode .package-option + .package-option { margin-top: 0; }
  .radio-ring { width: 22px; height: 22px; border-width: 2px; }
  .package-option.selected .radio-ring::after { inset: 4px; }
  .package-option.selected, .payment-method.active { border-color: transparent; box-shadow: 0 0 0 2px #3ba8ed; }
  .package-option.selected { z-index: 1; }
  .package-name { gap: 5px; }
  .package-name b { font-size: 14px; }
  .package-name em { padding: 3px 5px; font-size: 10px; }
  .package-icon { width: 24px; height: 24px; }
  .package-price { gap: 7px; }
  .package-price strong { gap: 4px; font-size: 14px; }
  .package-price small { font-size: 12px; }
  .sale-pill { padding: 4px 7px; font-size: 11px; }
  .show-more-options { min-height: 56px; height: 56px; margin-top: -1px; font-size: 15px; }
  .payment-field { margin-top: 16px; }
  .payment-methods { gap: 5px; }
  .payment-method { height: 48px; gap: 4px; border-radius: 7px; }
  .payment-method b { font-size: 13px; }
  .payment-method span { font-size: 12px; }
  .token-usdt, .token-usdc { width: 18px; height: 18px; font-size: 11px; }
  .service-submit { height: 42px; margin-top: 25px; font-size: 14px; }
  .transactions-link { margin-top: 20px; font-size: 14px; }
  .service-preview-submit { height: 42px; margin-top: 25px; font-size: 14px; }
  .market-main.service-form-mode:not(.premium-mode) [data-service-form]:not(.stable-currency) .package-fiat { display: none; }
  .market-main.service-form-mode:not(.premium-mode) [data-service-form]:not(.stable-currency) .package-price { display: flex; }
  .market-main.service-form-mode:not(.premium-mode) [data-service-form].stable-currency .package-fiat { display: block; }
  .market-main.service-form-mode:not(.premium-mode) [data-service-form].stable-currency .package-price { display: none; }
  .market-main.service-form-mode:not(.premium-mode) .package-option { grid-template-columns: 34px minmax(0,1fr) auto; }
  .buy-for-myself { margin-top: 16px; margin-bottom: -13px; font-size: 13px; }
  .recipient-resolved { grid-template-columns: 28px minmax(0,1fr) 22px; padding-right: 10px; }
  .recipient-resolved strong { font-size: 14px; }
}

/* Listing pages share the same market header, with read-only public data. */
.detail-site-header .detail-nav { display: none; }
.detail-header-search { display: flex; align-self: center; align-items: center; gap: 8px; width: 270px; height: 36px; margin: 0 auto; padding: 0 12px; border-radius: 6px; background: #26323e; color: #8a98a7; }
.detail-header-search span { font-size: 23px; line-height: 1; }
.detail-header-search input { min-width: 0; width: 100%; height: 100%; border: 0; outline: 0; background: transparent; color: #fff; font: inherit; font-size: 13px; }
.detail-header-search input::placeholder { color: #8a98a7; }
.detail-gift .detail-header-search { display: none; }
.detail-gift .detail-site-header .detail-nav { display: flex; }
.detail-main { width: min(720px, calc(100% - 20px)); margin: 0 auto; padding: 30px 0 60px; }
.detail-intro { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); column-gap: 24px; align-items: start; position: relative; }
.detail-intro h1 { grid-column: 1/-1; display: flex; align-items: center; gap: 8px; margin: 0 12px 20px; color: #fff; font-size: 28px; line-height: 36px; letter-spacing: normal; }
.detail-state { padding: 3px 6px; border-radius: 5px; background: #1d3933; color: #58d88b; font-size: 11px; line-height: 16px; font-weight: 700; white-space: nowrap; }
.detail-state.sold { background: #3d3036; color: #e66c75; }
.detail-state.taken { background: #3b3028; color: #f09a55; }
#detail-back { display: inline-block; color: #fff; font-size: 30px; line-height: 24px; }
#detail-back[hidden] { display: none; }
.detail-taken .detail-intro { display: flex; flex-direction: column; }
.detail-taken-info { width: 100%; padding: 17px 20px 18px; border-radius: 7px; background: #283441; }
.detail-taken-info h2 { margin: 0 0 13px; color: #a0aab5; font-size: 15px; line-height: 20px; }
.detail-taken-info p { margin: 0; color: #a0aab5; font-size: 15px; line-height: 1.48; }
.detail-taken-info a { color: #42aae9; }
.detail-taken .detail-fields { width: 100%; margin-top: 18px; }
.detail-taken .detail-actions { width: 100%; margin-top: 17px; }
.detail-taken .detail-actions button { flex: 1; }
.detail-stats, .detail-fields, .detail-history-table { overflow: hidden; border-radius: 6px; background: #222c36; }
.detail-stats { grid-column: 1; grid-row: 2; }
.detail-stats-head, .detail-stats-values { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
.detail-stats-head { min-height: 38px; align-items: center; padding: 0 20px; background: #2b3642; color: #98a4b0; font-size: 14px; font-weight: 700; }
.detail-stats-values { min-height: 54px; align-items: center; padding: 6px 20px; }
.detail-stats-values strong, .detail-stats-values small { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-stats-values small { color: #8c9ba9; font-size: 13px; }
.detail-stats-values a, .detail-field a, .detail-history-row a { color: #42aae9; }
.detail-stats-values .wallet-link { font-weight: 400; }
.detail-how, .detail-purchase { display: block; padding: 8px 20px 12px; color: #42aae9; font-size: 12px; }
.detail-purchase { color: #8d99a6; }
.detail-fields { grid-column: 2; grid-row: 2; }
.detail-field { display: grid; grid-template-columns: minmax(100px,1fr) minmax(0,1fr); min-height: 43px; align-items: center; gap: 10px; padding: 8px 20px; border-bottom: 1px solid #303a46; font-size: 15px; }
.detail-field:last-child { border-bottom: 0; }
.detail-field b { font-size: 15px; }
.detail-field span { overflow: hidden; text-align: right; text-overflow: ellipsis; white-space: nowrap; color: #42aae9; }
.detail-field-note { margin: 0; padding: 6px 20px 12px; color: #8d99a6; font-size: 12px; }
.detail-timer { grid-column: 2; grid-row: 3; align-self: center; justify-self: center; display: flex; align-items: center; gap: 12px; min-height: 48px; color: #9aa6b2; font-size: 13px; }
.detail-timer strong { display: flex; align-items: center; gap: 6px; padding: 0; background: transparent; color: white; font-size: 15px; line-height: 30px; white-space: nowrap; }
.detail-timer strong .clock-reel { display: inline-flex; gap: 1px; }
.detail-timer strong .clock-reel + .clock-reel::before { content: ':'; width: 5px; margin-right: 6px; color: #687684; text-align: center; }
.detail-timer strong .clock-digit { display: inline-block; height: 30px; min-width: 22px; padding: 0 7px; overflow: hidden; border-radius: 5px; background: #212a33; text-align: center; font-weight: 700; }
.detail-timer strong .clock-days .clock-digit { min-width: 58px; }
.detail-timer strong .clock-digit::before { display: block; content: attr(data-val); white-space: pre; }
.detail-timer strong .clock-digit.is-rolling::before { content: attr(data-prev-val) '\A' attr(data-val); animation: clock-roll .42s cubic-bezier(.2,.65,.3,1) both; }
@keyframes clock-roll { from { transform: translateY(0); } to { transform: translateY(-50%); } }
.detail-actions { grid-column: 1; grid-row: 3; display: flex; gap: 12px; margin-top: 24px; }
.detail-actions button { flex: 1; min-height: 46px; border: 0; border-radius: 6px; background: #2e9adc; color: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.detail-actions button:nth-child(2) { flex: 1.5; }
.detail-subscribe { position: absolute; top: 12px; right: 12px; margin: 0; border: 0; background: none; color: #43a9e9; font: inherit; font-size: 13px; cursor: pointer; }
.detail-history { margin-top: 35px; }
.detail-history h2 { margin: 0 12px 16px; font-size: 22px; }
.detail-history-table { margin-bottom: 35px; }
.detail-history-head, .detail-history-row { display: grid; grid-template-columns: 27% 32% 41%; align-items: center; }
.detail-history-head { min-height: 38px; padding: 0 20px; background: #2b3642; color: #8d99a6; font-size: 14px; font-weight: 700; }
.detail-history-row { min-height: 40px; padding: 5px 20px; border-top: 1px solid #303a46; font-size: 14px; }
.detail-history-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-history-row > span:first-child { font-size: 15px; font-weight: 700; }
.detail-history-row > span:nth-child(2) { color: #8d99a6; }
.wallet-link { display: flex; align-items: center; width: 100%; min-width: 0; overflow: hidden; white-space: nowrap; }
.wallet-head, .wallet-tail { min-width: 0; flex: 1 1 50%; overflow: hidden; text-overflow: clip !important; white-space: nowrap; }
.wallet-head { text-align: left; }
.wallet-tail { direction: rtl; text-align: right; }
.wallet-ellipsis { flex: 0 0 auto; color: inherit; font-style: normal; }
.wallet-short { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-status { min-height: 20px; color: #8d99a6; font-size: 12px; }
.detail-status:empty { display: none; }
.detail-image { display: block; grid-column: 2; grid-row: 2/4; width: 270px; height: 270px; justify-self: end; border-radius: 7px; object-fit: cover; }
.detail-image[hidden] { display: none; }
.detail-gift .detail-intro { grid-template-columns: 424px 1fr; }
.detail-gift .detail-fields { grid-column: 1; grid-row: 2; }
.detail-gift .detail-stats { grid-column: 1; grid-row: 3; margin-top: 20px; }
.detail-gift .detail-stats-head, .detail-gift .detail-stats-values { grid-template-columns: 35% 65%; }
.detail-gift .detail-subscribe { grid-column: 1/-1; }
.detail-gift .detail-field { grid-template-columns: 30% 70%; min-height: 40px; }
.detail-gift .detail-field b { color: #8d99a6; font-weight: 400; }
.detail-gift .detail-field > span { color: #f4f6f8; text-align: left; }
.detail-gift .detail-field-owner > span, .detail-gift .detail-field-owner a { color: #42aae9; }
.detail-gift .detail-field-issued > span { font-weight: 700; }
.gift-attribute-value { display: flex; align-items: center; gap: 7px; }
.gift-attribute-value strong { color: #f4f6f8; font-size: 13px; }
.gift-attribute-value em { padding: 2px 5px; border-radius: 10px; background: #173d5c; color: #3da9ef; font-size: 11px; font-style: normal; }
.detail-gift .detail-stats { margin-top: 22px; }
.detail-gift .detail-stats-values { min-height: 44px; padding-top: 4px; padding-bottom: 4px; }
.detail-gift .detail-purchase { padding: 5px 20px 6px; }
.detail-gift .detail-history { margin-top: 40px; }
.detail-history-more { display: block; width: 100%; min-height: 40px; border: 0; border-top: 1px solid #303a46; background: transparent; color: #42aae9; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.detail-offers { margin-top: 35px; }
.detail-offers > h2 { margin: 0 12px 16px; color: #f4f6f8; font-size: 22px; line-height: 28px; }
.detail-offer-list, .detail-offer-auction { overflow: hidden; border-radius: 6px; background: #222c36; }
.detail-offer-auction { margin-bottom: 14px; }
.detail-offer-head, .detail-offer-row, .detail-offer-auction-values { display: grid; align-items: center; }
.detail-offer-head, .detail-offer-row { grid-template-columns: 25% 30% 45%; }
.detail-offer-table.has-actions .detail-offer-head, .detail-offer-table.has-actions .detail-offer-row { grid-template-columns: 25% 30% 45%; }
.detail-offer-head { min-height: 38px; padding: 0 20px; background: #2b3642; color: #8d99a6; font-size: 14px; font-weight: 700; }
.detail-offer-row { min-height: 48px; padding: 6px 20px; border-top: 1px solid #303a46; color: #f4f6f8; font-size: 14px; line-height: 19px; }
.detail-offer-row:first-of-type { border-top: 0; }
.detail-offer-row > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-offer-row strong { font-size: 15px; }
.detail-offer-row a { color: #42aae9; }
.detail-offer-date { color: #8d99a6; }
.detail-offer-address { width: min(300px,100%); }
.detail-offer-address .wallet-head, .detail-offer-address .wallet-tail { display: inline-flex; flex: 1 1 50%; overflow: hidden; }
.detail-offer-address .wallet-head { justify-content: flex-start; }
.detail-offer-address .wallet-tail { direction: ltr; justify-content: flex-end; }
.detail-offer-address .wallet-ellipsis { padding: 0 .2em; margin: 0 -.1em; }
.detail-offer-expiry { color: #f4f6f8; font-weight: 600; }
.detail-offer-table.has-actions .detail-offer-row { row-gap: 9px; }
.detail-offer-row button.detail-offer-accept { grid-column: 1 / -1; justify-self: stretch; width: 100%; }
.detail-offer-row button { justify-self: end; min-width: 104px; min-height: 34px; padding: 0 13px; border: 0; border-radius: 6px; background: #2e9adc; color: #fff; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.detail-offer-auction .detail-offer-head, .detail-offer-auction-values { grid-template-columns: 50% 50%; }
.detail-offer-auction-values { min-height: 50px; padding: 6px 20px; }
.detail-offer-auction-values strong { font-size: 15px; }
.detail-offer-auction-values > span { color: #f4f6f8; }

.offer-dialog { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; }
.offer-card { position: relative; z-index: 1; box-sizing: border-box; width: min(390px,calc(100vw - 32px)); padding: 23px 24px 18px; border-radius: 7px; background: #1f2933; box-shadow: 0 20px 60px rgba(0,0,0,.55); }
.offer-card h2 { margin: 0 0 14px; color: #f4f6f8; font-size: 20px; line-height: 26px; }
.offer-card p { margin: 0 0 16px; color: #9aa6b2; font-size: 14px; line-height: 20px; }
.offer-card p strong { color: #f4f6f8; white-space: nowrap; }
.offer-card p strong .ton-gem { vertical-align: -2px; }
.offer-error { color: #e66c75 !important; }
.offer-dialog-actions { display: flex; justify-content: flex-end; gap: 18px; margin-top: 21px; }
.offer-dialog-actions button { min-height: 32px; padding: 0; border: 0; background: transparent; color: #42aae9; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.offer-dialog-actions button:disabled { opacity: .55; cursor: default; }

/* Keep the closing navigation identical on catalogue and detail screens. */
footer { justify-content: center; background: #11171d; }
footer > div { display: flex; align-items: center; justify-content: center; gap: 80px; }

.mobile-only { display: none; }
.desktop-only { display: inline; }
.filter-wrap { position: relative; }
.filter-menu { position: absolute; top: calc(100% + 5px); right: 0; z-index: 15; min-width: 130px; padding: 5px 0; border-radius: 6px; background: #26323e; box-shadow: 0 6px 20px #0008; }
.filter-menu[hidden] { display: none; }
.filter-menu button { display: block; width: 100%; padding: 9px 12px; border: 0; background: transparent; color: #f2f5f8; font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.filter-menu button:hover { background: #324252; }
.filter-menu button.selected::after { content: '✓'; float: right; color: #42aae9; font-size: 16px; line-height: 1; }
.sort-wrap .sort-button { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 0 8px; border: 0; background: transparent; }
.sort-wrap .sort-button span { margin: 0; }
.sort-chevron { margin-left: 5px !important; color: #8995a3; }
.mobile-connect-label { display: none; }
.sort-menu { right: 0; left: auto; min-width: 170px; }
.service-card { position: relative; }
.service-new { position: absolute; right: 12px; top: 12px; padding: 3px 7px; border-radius: 4px; background: #258fd4; color: #fff; font-size: 11px; font-weight: 700; }
.legal { width: min(672px,calc(100% - 30px)); max-width: 672px; padding: 36px 0 110px; }
.legal h1 { margin: 0 0 30px; font-size: 30px; line-height: 1.25; letter-spacing: -.02em; }
.legal h2 { margin: 28px 0 12px; font-size: 22px; line-height: 1.35; letter-spacing: 0; }
.legal p, .legal li { color: #8995a3; font-size: 15px; line-height: 1.5; }
.legal p { margin: 0 0 20px; }
.legal strong { color: #f4f6f8; }
.legal-index { margin: 0 0 26px; padding-left: 22px; }
.legal-index a, .legal p a { color: #3da9e9; }
.gift-info { display: flex; flex-direction: column; justify-content: center; min-height: 88px; white-space: normal; }
.gift-caption { display: block; text-align: center; }
.gift-caption strong { display: block; overflow: hidden; color: #f4f6f8; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.gift-caption small { display: block; margin-top: 2px; color: #8995a3; font-size: 11px; }
.gift-values { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 5px; white-space: nowrap; }
.gift-values strong { font-size: 13px; }
.gift-info strong::before { content: none; }
.gift-values strong::before { content: '◆'; margin-right: 4px; color: #47bafa; font-size: .86em; }
@media (min-width: 761px) {
  .detail-intro h1 { margin-bottom: 19px; line-height: 36px; }
  .detail-active .detail-intro h1 { margin-bottom: 39px; }
  .detail-active .detail-actions { transform: translateY(-12px); }
  body.detail-active #detail-histories .detail-history:first-child { margin-top: 20px; }
  .detail-subscribe { top: 9px; right: 20px; width: 129px; height: 23px; padding: 0; line-height: 23px; }
  .detail-history { margin-top: 30px; }
  .detail-history + .detail-history { margin-top: 29px; }
  .detail-history h2 { margin: 0 0 14px; font-size: 22px; line-height: 36px; }
  .detail-history-head + .detail-history-row { min-height: 39px; }
  .detail-history-more { min-height: 37px; }
  .detail-history:not(:last-child) .detail-history-table { margin-bottom: 32px; }
  .detail-history:last-child .detail-history-table { margin-bottom: 20px; }
  .detail-gift .detail-field:first-child { min-height: 39px; }
  .detail-gift .detail-history { margin-top: 32px; }
  .market-main { width: min(720px,calc(100% - 32px)); }
  .market-main:has(.service-section:not([hidden])) { min-height: calc(100vh - 100px); }
  .market-main.ads-mode { width: min(990px,calc(100% - 32px)); }
  .market-main .market-section { padding-top: 30px; }
  .market-main .table-head, .market-main .listing-row { grid-template-columns: minmax(0,1.1fr) minmax(110px,.75fr) minmax(150px,1.15fr) 18px; }
  .market-main .section-heading { margin-left: 13px; margin-right: 0; }
  .market-main.gifts-mode { box-sizing: border-box; width: min(1276px,calc(100% - 40px)); padding-left: 30px; padding-right: 21px; grid-template-columns: 292px minmax(0,900px); column-gap: 33px; }
  .market-main.gifts-mode .gift-grid { grid-template-columns: repeat(5,168px); justify-content: start; gap: 12px; }
  .market-main.gifts-mode .market-section { padding-top: 36px; }
  .market-main.gifts-mode .hero { margin-top: 82px; }
  .market-main.gifts-mode .gift-sidebar { margin-top: 134px; }
  .market-main.gifts-mode .gift-sidebar h3 { display: flex; align-items: center; gap: 6px; }
  .market-main.gifts-mode .gift-sidebar h3 small { margin-left: auto; color: #8794a1; font-weight: 400; }
  .market-main.gifts-mode .gift-sidebar h3 span { color: #8794a1; }
  .gift-sidebar input { display: block; box-sizing: border-box; width: 100%; height: 38px; border: 0; border-bottom: 1px solid #2e3b47; padding: 0 15px; outline: none; background: #222c36; color: white; font: inherit; font-size: 13px; }
  .gift-sidebar input::placeholder { color: #8794a1; }
  .gift-layout-buttons { display: flex; align-items: center; height: 36px; padding: 0 5px; border-radius: 6px; background: #26323e; }
  .gift-layout-buttons[hidden] { display: none; }
  .gift-layout-buttons button { width: 28px; height: 30px; padding: 0; border: 0; background: transparent; color: #9aa6b2; font-size: 18px; cursor: pointer; }
  .gift-layout-buttons button.active { color: white; }
  .market-main.gifts-mode .gift-grid.gift-list-view { display: block; }
  .gift-grid.gift-list-view .gift-card { display: flex; align-items: center; min-height: 80px; margin-bottom: 2px; }
  .gift-grid.gift-list-view .gift-art { width: 72px; flex: 0 0 72px; }
  .gift-grid.gift-list-view .gift-info { flex: 1; justify-content: space-between; padding: 0 20px; }
}

@media (max-width: 760px) {
  .legal { padding-top: 36px; }
  .sort-wrap { position: relative; display: flex; align-items: center; justify-content: center; min-width: 80px; height: 34px; border-radius: 6px; background: #26323e; white-space: nowrap; }
  .sort-wrap .mobile-only { display: block; color: #f4f6f8; font-size: 13px; font-weight: 700; }
  .sort-wrap select { position: absolute; inset: 0; width: 100% !important; height: 100%; opacity: 0; }
  footer { flex-direction: row; align-items: center; justify-content: center; min-height: 44px; padding: 12px 16px; }
  footer > div { width: 100%; flex-wrap: nowrap; justify-content: space-around; gap: 12px; }
  .legal h1 { font-size: 26px; }
  .legal p, .legal li { font-size: 14px; }
  .mobile-only { display: inline; }
  .desktop-only { display: none; }
  .filter-menu { right: auto; left: 0; }
  .market-main select.ghost-button { width: 80px; }
  .gift-info { min-height: 36px; }
  .gift-caption { display: none; }
  .gift-layout-buttons { display: none !important; }
  .gift-values { margin-top: 0; }
  .gift-number { bottom: 4px; left: 4px; height: 12px; padding: 2px 4px 1px; border-radius: 6px; font-size: 7px; line-height: 9px; }
  .gift-values { width: 105px; gap: 5px; }
  .gift-values strong { display: block; height: 17px; font-size: 12px; line-height: 17px; }
  .gift-values strong::before { display: inline-block; width: 12px; height: 13px; margin-right: 2px; background: url('/assets/ton-gem.svg') center/contain no-repeat; content: ''; vertical-align: -3px; }
  .gift-status { border-radius: 5px; }
  .gift-collections { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%238995a3' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
  .detail-site-header { height: 48px; min-height: 48px; grid-template-columns: minmax(145px,45%) minmax(0,1fr) 52px; grid-template-rows: 48px; }
  .detail-site-header .connection-actions { display: none; }
  .detail-header-search { grid-column: 2; grid-row: 1; justify-self: stretch; width: 100%; height: 28px; margin: 0; }
  .detail-header-search input { font-size: 12px; }
  .detail-gift .detail-site-header { height: 90px; min-height: 90px; grid-template-rows: 48px 42px; }
  .detail-gift .detail-site-header .detail-nav { display: flex; }
  .detail-gift .detail-site-header .connection-actions { display: flex; }
  .detail-main { box-sizing: border-box; width: 100%; padding: 18px 10px 75px; }
  .detail-intro { display: flex; flex-direction: column; gap: 0; }
  .detail-intro h1 { align-self: center; justify-content: center; flex-wrap: wrap; margin: 0 0 17px; font-size: 22px; line-height: 28px; text-align: center; }
  .detail-state { padding: 3px 6px; font-size: 11px; }
  .detail-stats, .detail-fields { width: 100%; }
  .detail-stats { order: 1; }
  .detail-stats-head { min-height: 30px; padding: 0 15px; font-size: 12px; }
  .detail-stats-values { min-height: 50px; padding: 5px 15px; }
  .detail-stats-values strong { font-size: 14px; }
  .detail-stats-values small { font-size: 11px; }
  .detail-how { padding: 5px 15px 11px; }
  .detail-fields { order: 2; margin-top: 18px; }
  .detail-field { min-height: 34px; grid-template-columns: minmax(105px,1fr) minmax(0,1fr); padding: 6px 15px; font-size: 14px; }
  .detail-field b { font-size: 13px; }
  .detail-field-note { padding: 5px 15px 10px; }
  .detail-timer { order: 3; min-height: 34px; margin: 18px auto 0; font-size: 12px; }
  .detail-timer strong { gap: 4px; font-size: 14px; line-height: 28px; }
  .detail-timer strong .clock-reel + .clock-reel::before { width: 4px; margin-right: 5px; }
  .detail-timer strong .clock-digit { height: 28px; min-width: 21px; padding: 0 7px; }
  .detail-timer strong .clock-days .clock-digit { min-width: 55px; }
  .detail-actions { order: 4; width: 100%; margin-top: 17px; }
  .detail-actions button { min-height: 43px; font-size: 12px; }
  .detail-subscribe { position: static; order: 5; align-self: center; margin: 15px 0 10px; font-size: 12px; }
  .detail-history { margin-top: 19.5px; }
  .detail-history h2 { margin: 0 0 9px; font-size: 18px; line-height: 28px; }
  .detail-history-head { min-height: 30px; padding: 0 15px; font-size: 12px; }
  .detail-history-row { min-height: 34px; padding: 3px 15px; font-size: 13px; }
  .detail-history-row > span:first-child { font-size: 14px; }
  .detail-active .detail-intro h1 { margin-bottom: 37px; }
  .detail-history-more { min-height: 37px; }
  .detail-history-table { margin-bottom: 23px; }
  .detail-history:last-child .detail-history-table { margin-bottom: 0; }
  .detail-offers { margin-top: 19.5px; }
  .detail-offers > h2 { margin: 0 0 9px; font-size: 18px; line-height: 28px; }
  .detail-offer-auction { margin-bottom: 10px; }
  .detail-offer-head { min-height: 30px; padding: 0 15px; font-size: 12px; }
  .detail-offer-row { grid-template-columns: 25% 30% 45%; min-height: 44px; padding: 7px 15px; font-size: 13px; line-height: 16px; }
  .detail-offer-table.has-actions .detail-offer-head, .detail-offer-table.has-actions .detail-offer-row { grid-template-columns: 25% 30% 45%; }
  .detail-offer-table.has-actions .detail-offer-row { row-gap: 9px; padding-bottom: 11px; }
  .detail-offer-row strong { font-size: 14px; font-weight: 700; }
  .detail-offer-address { font-size: 13px; font-weight: 500; }
  .detail-offer-expiry { font-size: 13px; font-weight: 600; }
  .detail-offer-row button.detail-offer-accept { grid-column: 1 / -1; justify-self: stretch; min-width: 0; width: 100%; min-height: 42px; padding: 0 15px; border-radius: 6px; font-size: 13px; font-weight: 700; }
  .detail-offer-auction-values { min-height: 44px; padding: 5px 15px; font-size: 13px; }
  .offer-dialog { align-items: end; padding: 10px; }
  .offer-card { width: 100%; padding: 22px 20px 16px; border-radius: 8px; }
  .offer-card h2 { font-size: 18px; line-height: 24px; }
  .offer-card p { font-size: 14px; line-height: 20px; }
  body:not(.detail-gift) .detail-history:last-child .detail-history-row { min-height: 33px; }
  body:not(.detail-gift) .detail-history:last-child .detail-history-more { min-height: 33.5px; }
  .detail-gift .detail-main { padding-top: 16px; }
  .detail-gift .detail-intro h1 { margin-bottom: 17px; }
  .detail-gift .detail-image { order: 1; width: 140px; height: 140px; margin: 0 auto 20px; }
  .detail-gift .detail-fields { order: 2; margin: 0; }
  .detail-gift .detail-field { grid-template-columns: 30% 70%; min-height: 33px; }
  .detail-gift .detail-field b { color: #8d99a6; font-weight: 400; }
  .detail-gift .detail-field > span { color: #f4f6f8; text-align: left; }
  .detail-gift .detail-field-owner > span, .detail-gift .detail-field-owner a { color: #42aae9; }
  .detail-gift .detail-field-issued > span { font-weight: 700; }
  .gift-attribute-value { display: flex; align-items: center; gap: 7px; }
  .gift-attribute-value strong { color: #f4f6f8; font-size: 12px; }
  .gift-attribute-value em { padding: 2px 5px; border-radius: 10px; background: #173d5c; color: #3da9ef; font-size: 11px; font-style: normal; }
  .detail-gift .detail-stats { order: 3; margin-top: 15px; }
  .detail-gift .detail-stats-values { min-height: 43px; }
  .detail-gift .detail-purchase { padding: 2px 15px 6px; }
  .detail-gift .detail-subscribe { order: 4; margin: 24px 0 4px; }
  .detail-gift .detail-history { margin-top: 18.5px; }
  .detail-gift .detail-history-row { min-height: 32px; }
}

@media (max-width: 760px) {
  .market-main .section-heading { align-items: flex-end; padding-right: 0; padding-left: 0; }
  .market-main .market-meta, .filter-wrap, .sort-wrap { height: 28px; }
  #auction-filter { width: auto; }
  #auction-filter .mobile-only { margin: 0; color: #f4f6f8; }
  .sort-wrap { min-width: 85px; width: 85px; min-height: 28px; }
  .sort-wrap .filter-menu { top: calc(100% + 6px); right: 0; left: auto; width: 174px; min-width: 174px; height: auto; padding: 0; }
  .filter-menu button { min-height: 42px; padding: 0 12px; font-size: 15px; }
  .filter-wrap > .filter-menu { top: calc(100% + 6px); right: 0; left: auto; width: 160px; min-width: 160px; padding: 0; }
  .filter-wrap > .filter-menu button { min-height: 36px; }
  .sort-wrap .filter-menu button { min-height: 36px; }
  #auction-filter[aria-expanded="true"] { background: #2f98dc; }
  #auction-filter[aria-expanded="true"] span { color: #f4f6f8; }
  #sort-filter .sort-mobile-label { color: #f4f6f8; }
  #sort-filter[aria-expanded="true"] { background: #2f98dc; }
  #sort-filter[aria-expanded="true"] .sort-chevron { color: #f4f6f8; }
}

/* Final desktop geometry is measured against the public catalogue at 1440px. */
@media (min-width: 761px) {
  .market-main .market-section { padding-top: 33px; }
  .market-main .section-heading { margin-bottom: 14px; }

  .market-main.gifts-mode {
    padding-right: 32px;
    padding-left: 32px;
    grid-template-columns: 294px minmax(0, 888px);
    column-gap: 30px;
  }
  .market-main.gifts-mode .hero { margin-top: 84px; }
  .market-main.gifts-mode .search-form,
  .market-main.gifts-mode .search-form input { min-height: 42px; height: 42px; }
  .market-main.gifts-mode .gift-sidebar { margin-top: 136px; }
  .market-main.gifts-mode .market-section { padding-top: 34px; }
  .market-main.gifts-mode .section-heading { margin: 0 0 14px; padding-left: 13px; }

  .brand-symbol { transform: scale(1.65); transform-origin: center; }
  .site-header .nav-tabs { left: 1.44px; }
  .site-header .tab { padding-top: 2px; font-size: 14px; line-height: 15px; }
  .site-header .tab:nth-child(n + 4) { position: relative; left: .97px; }
  footer > div { gap: 32px; }

  .market-main.service-form-mode { width: min(480px, calc(100% - 32px)); }
  .market-main.service-form-mode .service-form-section { padding: 34px 0 84px; }
  .market-main.service-form-mode .service-form-header { margin-bottom: 0; }
  .market-main.service-form-mode .service-field { margin-top: 40px; }
  .market-main.service-form-mode .service-field:first-of-type { margin-top: 41px; }
  .market-main.service-form-mode.premium-mode .service-field:first-of-type { margin-top: 43px; }
  .market-main.service-form-mode .service-field > label { margin: 0 0 12px 19px; font-size: 15px; line-height: 23px; }
  .market-main.service-form-mode .service-input { height: 48px; gap: 10px; padding: 0 19px; border-radius: 6px; background: #242e38; }
  .market-main.service-form-mode .service-input svg { flex-basis: 18px; width: 18px; height: 18px; }
  .market-main.service-form-mode .service-inline-icon { width: 18px; height: 18px; }
  .market-main.service-form-mode .service-input input { font-size: 14px; }
  .market-main.service-form-mode .package-field > label { margin-bottom: 8px; }
  .market-main.service-form-mode .package-list { display: flex; flex-direction: column; gap: 0; }
  .market-main.service-form-mode .package-option { isolation: isolate; grid-template-columns: 40px minmax(0,1fr) auto; min-height: 57px; height: 57px; padding: 0 19px; border-radius: 6px; background: transparent; }
  .market-main.service-form-mode .package-option::before { content: ''; position: absolute; z-index: -1; inset: 2px 0; border-radius: 6px; background: #25313d; }
  .market-main.service-form-mode:not(.premium-mode) .package-option { grid-template-columns: 40px minmax(0,1fr) 110px 80px; }
  .market-main.service-form-mode:not(.premium-mode) .package-option + .package-option { margin-top: -1px; }
  .market-main.service-form-mode .package-option.selected { border-color: transparent; box-shadow: none; }
  .market-main.service-form-mode .package-option.selected::before,
  .market-main.service-form-mode .payment-method.active { box-shadow: 0 0 0 2px #3ba8ed; }
  .market-main.service-form-mode .radio-ring { width: 20px; height: 20px; border-width: 2px; }
  .market-main.service-form-mode .package-option.selected .radio-ring::after { inset: 4px; }
  .market-main.service-form-mode .package-name { gap: 4px; }
  .market-main.service-form-mode .package-name b { font-size: 13px; }
  .market-main.service-form-mode .package-name em { padding: 3px 5px; font-size: 10px; }
  .market-main.service-form-mode .package-icon { width: 20px; height: 20px; }
  .market-main.service-form-mode .package-fiat { color: #91a0af; font-size: 13px; }
  .market-main.service-form-mode .package-price { gap: 12px; }
  .market-main.service-form-mode.premium-mode .package-price { gap: 35px; }
  .market-main.service-form-mode .package-price strong { gap: 5px; font-size: 13px; }
  .market-main.service-form-mode .package-price small { font-size: 13px; }
  .market-main.service-form-mode .sale-pill { height: 23px; padding: 0 7px; font-size: 11px; line-height: 23px; }
  .market-main.service-form-mode .show-more-options { min-height: 56px; height: 56px; margin-top: -1px; font-size: 14px; }
  .market-main.service-form-mode .payment-field { margin-top: 24px; }
  .market-main.service-form-mode .payment-methods { gap: 6px; }
  .market-main.service-form-mode .payment-method { position: relative; height: 48px; gap: 4px; border-radius: 6px; }
  .market-main.service-form-mode .payment-method b { font-size: 13px; }
  .market-main.service-form-mode .payment-method span { font-size: 12px; }
  .market-main.service-form-mode .payment-method:nth-child(n+2)::after { content: ''; position: absolute; right: 14px; width: 7px; height: 7px; border-right: 2px solid #718090; border-bottom: 2px solid #718090; transform: rotate(45deg) translateY(-2px); }
  .market-main.service-form-mode .token-usdt,
  .market-main.service-form-mode .token-usdc { width: 16px; height: 16px; font-size: 10px; }
  .market-main.service-form-mode .service-submit { height: 46px; margin-top: 38px; font-size: 14px; }
  .market-main.service-form-mode .transactions-link { margin-top: 28px; font-size: 14px; line-height: 17px; }

  .market-main.numbers-mode .hero { padding-bottom: 3px; }
  .market-main.numbers-mode .search-form { position: relative; top: 2px; margin: 0; }
}

/* Final mobile service-card typography and spacing measured at 393px. */
@media (max-width: 760px) {
  .market-main:has(.service-section:not([hidden])) { width: 100%; }
  .market-main:has(.service-section:not([hidden])) .service-section { padding: 42px 0; }
  .market-main:has(.service-section:not([hidden])) .service-grid { gap: 15px; padding-bottom: 15px; }
  .market-main:has(.service-section:not([hidden])) .service-card { font-size: 12px; line-height: 17.1429px; }
  .market-main:has(.service-section:not([hidden])) .service-card h2 { width: 100%; font-size: 22px; line-height: 30px; letter-spacing: 0; }
  .market-main:has(.service-section:not([hidden])):not(.ads-mode) .service-card p { width: 210px; }
  .market-main:has(.service-section:not([hidden])) .service-card p { font-size: 15px; }
  .market-main:has(.service-section:not([hidden])) .service-card .primary-button { font-size: 13px; line-height: 18px; font-weight: 700; }
}

/* Final mobile catalogue geometry measured against the live 393px layout. */
@media (max-width: 760px) {
  .site-header .nav-tabs { gap: 17px; }
  .site-header .tab { padding-top: 3px; line-height: 18px; }
  .site-header .tab[data-type="gifts"] { letter-spacing: .0647px; }
  .market-main .hero h1,
  .market-main .hero-copy { width: min(369px, 100%); max-width: 369px; margin-right: auto; margin-left: auto; }

  .sort-mobile-label { display: inline-flex !important; align-items: center; gap: 4px; }
  .sort-order-icon { display: inline-block; flex: 0 0 18px; width: 18px; height: 18px; background: center / 18px 18px no-repeat url("data:image/svg+xml,%3Csvg%20height%3D%2218%22%20viewBox%3D%220%200%2018%2018%22%20width%3D%2218%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20stroke-linecap%3D%22round%22%20stroke-width%3D%221.5%22%3E%3Cpath%20d%3D%22m2%207.02%202.94-2.96c.04-.03.09-.03.13%200l3%202.96m-3.04-2.47v8.76%22%20stroke%3D%22%23838f9c%22%2F%3E%3Cpath%20d%3D%22m9.93%2010.98%202.94%202.96c.04.03.09.03.13%200l3-2.96m-3.04%202.47v-8.76%22%20stroke%3D%22%23fff%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); }
  .sort-chevron,
  .filter-chevron { display: inline-block; flex: 0 0 11px; width: 11px; height: 18px; margin: 0 -1px 0 4px !important; color: transparent !important; font-size: 0; background: center / contain no-repeat url("data:image/svg+xml,%3Csvg%20height%3D%2218%22%20viewBox%3D%220%200%2015%2018%22%20width%3D%2215%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22m2%207.5%205.11%205.15c.2.19.52.19.71%200l5.18-5.15%22%20fill%3D%22none%22%20stroke%3D%22%23677a8c%22%20stroke-linecap%3D%22round%22%20stroke-width%3D%222%22%2F%3E%3C%2Fsvg%3E"); }

  .market-main .table-head,
  .market-main .listing-row { position: relative; grid-template-columns: 55% 45%; gap: 0; padding-right: 0; padding-left: 0; }
  .market-main .table-head { padding-top: 0; padding-bottom: 0; }
  .market-main .table-head > span:nth-child(n + 3) { display: none; }
  .market-main .table-head > span { display: flex; align-items: center; min-width: 0; height: 30px; padding: 0 8px; }
  .market-main .table-head > span:first-child { padding-left: 16px; }
  .market-main .table-head > span:nth-child(2) { padding-right: 16px; }
  .market-main .listing-row { padding-top: 0; padding-bottom: 0; }
  .market-main .listing-row .collectible-cell,
  .market-main .listing-row .price-cell { display: flex; flex-direction: column; justify-content: center; min-width: 0; min-height: 43px; }
  .market-main .listing-row .collectible-cell { flex-direction: row; align-items: center; justify-content: flex-start; gap: 0; padding: 0 8px 0 16px; }
  .market-main .listing-row .price-cell { padding: 0 32px 0 8px; }
  .market-main .listing-row .closing-cell { display: none; }
  .market-main .listing-row .row-chevron { position: absolute; top: 50%; right: 16px; width: 11px; height: 18px; color: transparent; font-size: 0; transform: translateY(-50%); background: center / 18px 18px no-repeat url("data:image/svg+xml,%3Csvg%20height%3D%2218%22%20viewBox%3D%220%200%2018%2018%22%20width%3D%2218%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22m7%203.5%205.43%205.4c.04.04.04.1%200%20.14l-5.43%205.46%22%20fill%3D%22none%22%20stroke%3D%22%23838f9c%22%20stroke-linecap%3D%22round%22%20stroke-width%3D%221.9%22%2F%3E%3C%2Fsvg%3E"); }
}

@media (min-width: 761px) {
  .market-main .listing-row:not(:first-child) { min-height: 59px; }
  .sort-chevron,
  .filter-chevron { display: inline-block; flex: 0 0 11px; width: 11px; height: 18px; margin: 0 -1px 0 4px; background: center / contain no-repeat url("data:image/svg+xml,%3Csvg%20height%3D%2218%22%20viewBox%3D%220%200%2015%2018%22%20width%3D%2215%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22m2%207.5%205.11%205.15c.2.19.52.19.71%200l5.18-5.15%22%20fill%3D%22none%22%20stroke%3D%22%23677a8c%22%20stroke-linecap%3D%22round%22%20stroke-width%3D%222%22%2F%3E%3C%2Fsvg%3E"); }
}

@media (min-width: 1101px) {
  .site-header { padding-right: 16px; }
  .site-header .nav-tabs { position: absolute; top: 0; left: 25vw; gap: 26px; margin: 0; }
  .site-header .tab { padding-right: 0; padding-left: 0; }
  .site-header .connection-actions .header-action.primary { min-width: 151px; }
}

@media (max-width: 760px) {
  .market-main .listing-row:not(:last-child) { margin-bottom: 0; }
  .market-main .listing-row:not(:first-child) { min-height: 45px; }
}

/* Both wallet actions remain available in the compact mobile header. */
@media (max-width: 760px) {
  body:not([data-page="item"]) .site-header { grid-template-columns: 146px 195px 52px; }
  body:not([data-page="item"]) .site-header .brand { gap: 7px; min-width: 0; margin-left: 5px; }
  body:not([data-page="item"]) .site-header .brand-symbol { transform: scale(1.15); }
  body:not([data-page="item"]) .site-header .demo-badge { display: none; }
  body:not([data-page="item"]) .site-header .connection-actions { display: flex; align-items: center; gap: 6px; width: 195px; }
  body:not([data-page="item"]) .site-header .connection-actions .header-action { display: flex; align-items: center; justify-content: center; min-height: 28px; height: 28px; padding: 0 7px; border-radius: 5px; }
  body:not([data-page="item"]) .site-header .connection-actions .header-action:first-child { display: flex; flex: 0 0 82px; width: 82px; min-width: 82px; font-size: 11px; }
  body:not([data-page="item"]) .site-header .connection-actions .header-action.primary { flex: 0 0 107px; width: 107px; min-width: 107px; font-size: 11.5px; }
  body:not([data-page="item"]) .site-header .connection-actions .telegram-mark { width: 13px; height: 13px; margin-right: 3px; }
  body:not([data-page="item"]) .site-header .connection-actions .ton-mark { width: 14px; height: 14px; margin-right: 4px; }
  body:not([data-page="item"]) .site-header .desktop-connect-label { display: none; }
  body:not([data-page="item"]) .site-header .mobile-connect-label { display: inline; }
}

@media (max-width: 380px) {
  body:not([data-page="item"]) .site-header { grid-template-columns: 134px minmax(0, 1fr) 46px; }
  body:not([data-page="item"]) .site-header .demo-badge { display: none; }
  body:not([data-page="item"]) .site-header .connection-actions { gap: 4px; width: 100%; }
  body:not([data-page="item"]) .site-header .connection-actions .header-action:first-child { flex-basis: 72px; width: 72px; min-width: 72px; font-size: 10px; }
  body:not([data-page="item"]) .site-header .connection-actions .header-action.primary { flex: 1 1 auto; width: auto; min-width: 86px; font-size: 10.5px; }
}

/* Fragment mobile price-sort control: measured against fragment.com at 393px. */
@media (max-width: 760px) {
  .sort-wrap {
    min-width: 85px;
    width: 85px;
    height: 28px;
    border-radius: 8px;
    background: transparent;
  }

  .market-main #sort-filter {
    box-sizing: border-box;
    width: 100%;
    min-height: 28px;
    height: 28px;
    padding: 5px 9px;
    border: 0;
    border-radius: 8px;
    background: #242e38;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 18px;
    box-shadow: none;
    opacity: 1;
    -webkit-tap-highlight-color: transparent;
  }

  .market-main #auction-filter {
    box-sizing: border-box;
    min-width: 0;
    width: auto;
    min-height: 28px;
    height: 28px;
    padding: 5px 9px;
    border: 0;
    border-radius: 8px;
    background: #242e38;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 18px;
    box-shadow: none;
    opacity: 1;
    -webkit-tap-highlight-color: transparent;
  }

  .market-main #auction-filter:hover,
  .market-main #auction-filter:focus-visible {
    background: #242e38;
  }

  .market-main #auction-filter[aria-expanded="true"] {
    background: #2f98dc;
  }

  .market-main #sort-filter:hover,
  .market-main #sort-filter:focus-visible {
    background: #242e38;
  }

  .market-main #sort-filter[aria-expanded="true"] {
    background: #2f98dc;
  }

  .sort-wrap .filter-menu {
    overflow: hidden;
    border-radius: 8px;
    background: #2e3a47;
    box-shadow: none;
  }

  .sort-wrap .filter-menu button {
    min-height: 36px;
    height: 36px;
    padding: 0 12px;
    background: transparent;
    color: #fff;
    font-size: 13px;
    line-height: 18px;
  }

  .sort-wrap .filter-menu button:hover,
  .sort-wrap .filter-menu button:focus-visible {
    background: #344454;
  }
}

/* Marketplace state labels follow Fragment's desktop/mobile placement. */
.market-mobile-state { display: none; }
.listing-status-badge.sold { color: #ff5864; background: rgba(181, 58, 69, .2); }
.listing-status-badge.sale { color: #56dc88; background: rgba(50, 166, 97, .18); }
.market-main .closing-cell .listing-state.sold { color: #ff5864; }
.market-main .closing-cell .listing-state.sale { color: #56dc88; }

#auction-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}

#sort-filter .sort-desktop-label,
#sort-filter .sort-mobile-label,
#auction-filter .filter-desktop-label,
#auction-filter .filter-mobile-label {
  color: #fff;
  opacity: 1;
}

@media (max-width: 760px) {
  .market-mobile-state { display: inline-flex; }

  body.fully-connected:not([data-page="item"]) .site-header,
  body.fully-connected[data-page="item"] .detail-site-header {
    grid-template-columns: minmax(0, 1fr) 48px !important;
  }
  body.fully-connected .site-header .connection-actions,
  body.fully-connected .detail-site-header .connection-actions { display: none !important; }
  body.fully-connected .site-header .brand,
  body.fully-connected .detail-site-header .brand { grid-column: 1; grid-row: 1; }
  body.fully-connected .site-header .mobile-menu-toggle,
  body.fully-connected .detail-site-header .mobile-menu-toggle { grid-column: 2; grid-row: 1; }
  body.fully-connected .site-header .nav-tabs,
  body.fully-connected .detail-site-header .nav-tabs { grid-column: 1 / -1; }

  .mobile-menu:has(.mobile-account-panel:not([hidden])) .mobile-menu-footer {
    width: calc(100% + 36px);
    margin: auto -18px -18px;
    padding: 14px 18px max(14px, env(safe-area-inset-bottom));
    border-top: 1px solid #303942;
  }
  .mobile-user-footer { text-align: left; }
  .mobile-user-footer .account-popover-avatar { width: 38px; height: 38px; }
  .mobile-menu:has(.mobile-account-panel:not([hidden])) .mobile-user-footer button {
    width: auto;
    min-height: 34px;
    height: auto;
    margin: 0;
    padding: 0;
  }
  .mobile-connect-prompt[hidden] { display: none !important; }
}

/* ---------------------------------------------------------------------------
   Auth modals (Telegram login + TON connect)
   --------------------------------------------------------------------------- */
.auth-dialog {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  position: relative;
  background: var(--surface, #1c1c1e);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  padding: 36px 32px 28px;
  width: min(420px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
  z-index: 1;
}

.auth-card-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-secondary, #8e8e93);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 6px;
}
.auth-card-close:hover { background: rgba(255,255,255,.08); }

.auth-card-icon {
  width: 44px;
  height: 44px;
  opacity: .9;
  margin-bottom: 4px;
}

.auth-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.auth-card-hint {
  color: var(--text-secondary, #8e8e93);
  font-size: 0.875rem;
  margin: 0;
  line-height: 1.5;
}
.auth-card-hint-small { font-size: 0.78rem; margin-top: -4px; }
.auth-card-hint a { color: var(--accent, #0098ea); }

.auth-field-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.auth-dial-select {
  flex: 0 0 110px;
  background: var(--input-bg, rgba(255,255,255,.07));
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  color: inherit;
  font-size: 0.875rem;
  padding: 10px 8px;
  cursor: pointer;
}

.auth-input {
  flex: 1;
  width: 100%;
  background: var(--input-bg, rgba(255,255,255,.07));
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  color: inherit;
  font-size: 1rem;
  padding: 11px 14px;
  transition: border-color .15s;
  box-sizing: border-box;
}
.auth-input:focus { outline: none; border-color: var(--accent, #0098ea); }
.auth-input-center { text-align: center; letter-spacing: 3px; font-size: 1.3rem; }

.auth-submit {
  width: 100%;
  margin-top: 4px;
}

.auth-error {
  color: #ff453a;
  font-size: 0.82rem;
  margin: -4px 0;
  width: 100%;
  text-align: center;
}

.auth-back {
  font-size: 0.82rem;
  margin-top: -4px;
  color: var(--text-secondary, #8e8e93);
}

.auth-logout {
  font-size: 0.82rem;
  color: #ff453a;
  margin-top: -4px;
}
.auth-logout:hover { background: rgba(255,67,58,.1); }

.ton-deeplink-wrap { width: 100%; }
.ton-deeplink-wrap a.primary-button { display: block; text-align: center; text-decoration: none; }

/* Connected controls and account views mirror Fragment's compact selectors. */
.header-action, .mobile-menu-toggle, .mobile-menu button { -webkit-tap-highlight-color: transparent; }
.header-action.connected, .header-action.connected:focus, .header-action.connected:focus-visible { outline: 0; box-shadow: none; }
.header-action:not(.primary).connected { border-color: #364451; background: #29343f; color: #f5f7f9; }
.header-action.connected::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: .8; }
.header-account-avatar { position: relative; display: inline-grid; place-items: center; width: 27px; height: 27px; margin-right: 7px; overflow: hidden; border-radius: 50%; background: #159ef5; color: #fff; font-size: 10px; font-weight: 800; vertical-align: middle; }
.header-account-avatar img, .account-popover-avatar img, .account-dashboard-avatar img, .tg-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.account-icon { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.account-header-search { display: grid; grid-template-columns: 20px minmax(0,1fr); align-items: center; width: min(275px,28vw); min-height: 38px; margin-right: auto; padding: 0 14px; border-radius: 7px; background: #26323e; }
.account-header-search span { width: 13px; height: 13px; border: 2px solid #8995a3; border-radius: 50%; position: relative; }
.account-header-search span::after, .account-list-search > span::after { content: ''; position: absolute; width: 6px; height: 2px; background: #8995a3; transform: rotate(-45deg); transform-origin: left center; }
.account-header-search span::after { left: -4px; bottom: -3px; }
.account-header-search input, .account-list-search input { min-width: 0; border: 0; outline: 0; background: transparent; color: #f4f6f8; }
.account-header-search input::placeholder, .account-list-search input::placeholder { color: #8b98a5; }

.connected-popover { position: fixed; z-index: 60; top: 68px; right: max(18px, calc((100vw - 1260px) / 2)); width: 244px; padding: 7px; border: 1px solid #3a4753; border-radius: 7px; background: #526170; color: #fff; box-shadow: 0 14px 42px rgba(0,0,0,.4); }
.telegram-popover { right: max(190px, calc((100vw - 1260px) / 2 + 175px)); width: 180px; }
.account-popover-avatar { position: relative; display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; overflow: hidden; border-radius: 50%; background: #159ef5; color: #fff; font-size: 13px; font-weight: 800; }
.connected-popover button { display: grid; grid-template-columns: 28px 1fr; align-items: center; width: 100%; min-height: 38px; padding: 0 9px; border: 0; border-radius: 5px; background: transparent; color: #fff; text-align: left; cursor: pointer; font-size: 13px; font-weight: 650; }
.connected-popover button:hover { background: rgba(255,255,255,.09); }
.connected-popover .account-popover-logout { color: #fff; }

.mobile-account-panel { margin: -10px -25px 16px; padding: 0 25px 10px; border-bottom: 1px solid #303942; }
.mobile-wallet-heading { display: flex; flex-direction: column; gap: 5px; margin: 0 36px 26px 0; }
.mobile-wallet-heading strong { overflow: hidden; color: #fff; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
.mobile-wallet-heading small { color: #249ff1; font-size: 13px; }
.mobile-account-panel h4 { margin: 0 0 10px; color: #8f9ba7; font-size: 11px; text-transform: uppercase; }
.mobile-account-panel > button { display: grid; grid-template-columns: 31px minmax(0,1fr) auto; align-items: center; width: 100%; min-height: 49px; padding: 0; border: 0; border-radius: 0; background: transparent; color: #f6f7f8; text-align: left; cursor: pointer; font-size: 15px; }
.mobile-account-panel > button:hover { background: transparent; }
.mobile-account-panel > button em { color: #98a4af; font-style: normal; }
.mobile-menu-footer .mobile-connect-prompt > button { width: 100%; }
.mobile-user-footer { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 11px; }
.mobile-user-footer > span:nth-child(2) { display: flex; min-width: 0; flex-direction: column; }
.mobile-user-footer strong, .mobile-user-footer small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-user-footer small { color: #8f9ba7; font-size: 12px; }
.mobile-user-footer button { border: 0; background: transparent; color: #249ff1; cursor: pointer; }

.market-main.account-mode { width: min(720px, calc(100% - 32px)); min-height: calc(100vh - 100px); }
.account-page { padding: 26px 0 80px; }
.account-page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 12px 20px; }
.account-page-heading h1 { margin: 0; color: #f5f7f9; font-size: 24px; line-height: 1.2; letter-spacing: -.035em; }
.account-heading-link { padding: 0; border: 0; background: transparent; color: #289fe9; cursor: pointer; font-size: 14px; }
.account-sort { min-height: 38px; padding: 0 14px; border: 0; border-radius: 7px; background: #26323e; color: #fff; font-weight: 700; }
.account-page-body { display: grid; gap: 14px; }
.account-section-label { margin: 5px 12px 3px; color: #8996a3; font-size: 14px; }
.account-panel, .account-table { overflow: hidden; border-radius: 7px; background: #222c36; }
.account-identity-card { display: flex; align-items: center; gap: 13px; padding: 12px; }
.account-dashboard-avatar { position: relative; display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 auto; overflow: hidden; border-radius: 50%; background: #159ef5; color: #fff; font-weight: 800; }
.account-identity-card > span:last-child, .account-info-row > span, .account-asset-copy, .account-username-row > span { display: flex; min-width: 0; flex-direction: column; }
.account-identity-card strong, .account-info-row strong, .account-asset-row strong, .account-username-row strong { overflow: hidden; color: #f5f7f9; text-overflow: ellipsis; white-space: nowrap; }
.account-identity-card small, .account-info-row small, .account-asset-row small, .account-username-row small { overflow: hidden; margin-top: 2px; color: #8996a3; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.account-row-list > * + * { border-top: 1px solid #313b46; }
.account-info-row, .account-nav-row { display: grid; grid-template-columns: 30px minmax(0,1fr) auto 15px; align-items: center; width: 100%; min-height: 52px; gap: 8px; padding: 0 14px; border: 0; background: transparent; color: #f5f7f9; text-align: left; }
button.account-nav-row { cursor: pointer; }
button.account-nav-row:hover { background: #29343f; }
.account-nav-row em { color: #99a5b0; font-style: normal; }
.account-nav-row i { color: #72808d; font-size: 24px; font-style: normal; }
.account-profile-links { margin-top: 8px; }
.account-loading, .account-empty, .account-error { margin: 0; padding: 29px 20px; border-radius: 7px; background: #222c36; color: #9ba7b3; text-align: center; line-height: 1.5; }
.account-error { color: #ff8a82; }
.account-tabs { display: flex; align-items: center; gap: 22px; padding: 0 12px; }
.account-tabs button { min-height: 40px; padding: 0 0 8px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: #8996a3; cursor: pointer; font-weight: 700; }
.account-tabs button.active { border-bottom-color: #2ca2ee; color: #fff; }
.account-tabs b { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: 4px; padding: 0 6px; border-radius: 11px; background: #34414e; font-size: 11px; }
.account-list-search { display: grid; grid-template-columns: 24px minmax(0,1fr); align-items: center; min-height: 54px; gap: 9px; padding: 0 18px; border-radius: 7px; background: #26323e; }
.account-list-search > span { position: relative; width: 16px; height: 16px; border: 2px solid #8995a3; border-radius: 50%; }
.account-list-search > span::after { left: -4px; bottom: -3px; }
.account-table-head, .account-asset-row, .account-username-row { display: grid; grid-template-columns: minmax(0,1fr) 230px 20px; align-items: center; gap: 12px; }
.account-table-head { min-height: 38px; padding: 0 20px; background: #2b3642; color: #98a4af; font-size: 12px; font-weight: 700; }
.account-asset-row, .account-username-row { min-height: 62px; padding: 8px 20px; border-top: 1px solid #303a46; color: #fff; }
.account-asset-row { grid-template-columns: 42px minmax(0,1fr) 230px 20px; }
.account-asset-row > img, .account-asset-fallback { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 6px; background: #1b2732; object-fit: cover; color: #67c4ff; }
.account-row-link, .account-username-row > i { color: #667380; font-size: 28px; font-style: normal; text-align: center; text-decoration: none; }
.account-row-link:hover { color: #aeb8c1; }
.account-blue-button { min-height: 36px; padding: 0 13px; border: 0; border-radius: 7px; background: #2596dd; color: #fff; cursor: pointer; font-weight: 700; }
.account-blue-button:hover { background: #2fa6ec; }
.account-convert-copy { margin: -4px 12px 2px; color: #8996a3; font-size: 14px; line-height: 1.55; }
.account-convert-copy p { margin: 0 0 10px; }
.account-convert-copy a, .account-notice { color: #2aa4ef; }
.account-notice { margin: 0 12px; font-size: 12px; }
.account-bottom-actions { display: flex; gap: 10px; }
.account-bottom-actions button { display: flex; flex: 1; align-items: center; justify-content: center; gap: 10px; min-height: 42px; border: 0; border-radius: 7px; background: #26323e; color: #fff; cursor: pointer; font-weight: 700; }
.account-session-list { overflow: hidden; border-radius: 7px; background: #222c36; }
.account-session-list::before { content: 'Device                         Actions'; display: block; min-height: 38px; padding: 11px 20px; background: #2b3642; color: #98a4af; font-size: 12px; font-weight: 700; white-space: pre; }
.account-session-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 18px; min-height: 58px; padding: 8px 20px; border-top: 1px solid #303a46; }
.account-session-row > div { display: flex; min-width: 0; flex-direction: column; }
.account-session-row strong { color: #fff; }
.account-session-row small { margin-top: 3px; color: #9aa8b4; font-size: 11px; }
.account-session-note { margin: 0 0 18px; padding: 15px 18px; border-radius: 8px; background: #222c36; color: #fff; }
.account-session-note p { margin: 7px 0 0; color: #9aa8b4; font-size: 12px; line-height: 1.55; }
.account-session-note .account-session-warning { color: #ffbd70; }
.account-revoke-session:disabled { opacity: .55; cursor: wait; }

@media (max-width: 760px) {
  .connected-popover { display: none !important; }
  .header-account-avatar { width: 20px; height: 20px; margin-right: 3px; font-size: 8px; }
  .header-action.connected::after { display: none; }
  .mobile-menu:has(.mobile-account-panel:not([hidden])) { top: 0; width: min(75vw, 390px); height: 100dvh; overflow-y: auto; padding-top: 38px; }
  .mobile-menu:has(.mobile-account-panel:not([hidden])) > h4 { margin-top: 6px; }
  .mobile-menu:has(.mobile-account-panel:not([hidden])) .mobile-menu-footer { margin-top: auto; }
  .account-header-search { grid-row: 2; grid-column: 1 / -1; width: 100%; margin-top: 10px; }
  .site-header:has(.account-header-search:not([hidden])) { grid-template-columns: auto 1fr auto; }
  .site-header:has(.account-header-search:not([hidden])) .connection-actions { display: none; }
  .market-main.account-mode { width: calc(100% - 24px); }
  .account-page { padding-top: 30px; }
  .account-page-heading { align-items: flex-start; margin: 0 2px 22px; }
  .account-page-heading h1 { font-size: 25px; }
  .account-heading-link { max-width: 54%; text-align: right; }
  .account-table-head, .account-username-row { grid-template-columns: minmax(0,1fr) minmax(130px,42%) 18px; padding-left: 16px; padding-right: 12px; }
  .account-asset-row { grid-template-columns: 40px minmax(0,1fr) minmax(130px,42%) 18px; padding-left: 12px; padding-right: 10px; }
  .account-blue-button { padding: 0 10px; }
  .account-bottom-actions { flex-direction: column; }
  .account-session-row { grid-template-columns: minmax(0,1fr) auto; padding: 10px 14px; }
  .account-session-list::before { padding-left: 14px; }
}

/* Payment / offer actions disabled until a TON wallet is linked (see
   updateWalletGatedButtons() in app.js). Native [disabled] already blocks
   clicks and keyboard activation; this is just the visual signal. */
.wallet-gated,
.service-submit:disabled {
  opacity: 1;
  cursor: pointer;
  filter: none;
}

/* Telegram login presentation follows the compact Fragment/Telegram handoff
   screens. The existing auth requests and state transitions remain unchanged. */
.auth-dialog { padding: 16px; background: rgba(7,10,14,.72); backdrop-filter: blur(12px); }
.auth-card { width: min(414px, calc(100vw - 32px)); min-height: 520px; padding: 38px 30px 30px; border: 1px solid #303b47; border-radius: 24px; background: #1b2026; box-shadow: 0 28px 90px rgba(0,0,0,.62); }
.auth-card > div[id^="tg-step-"] { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.auth-card > #tg-step-intro { flex: 1; }
.auth-card > #tg-step-intro .auth-submit { margin-top: auto; }
.auth-logos { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 10px 0 8px; }
.auth-logos img { width: 52px; height: 52px; object-fit: contain; }
.auth-logos img:first-child { padding: 9px; border-radius: 50%; background: #159ef5; }
.auth-logos span { width: 1px; height: 26px; background: #3a4652; transform: rotate(24deg); }
.auth-card h2 { color: #f5f6f8; font-size: 25px; line-height: 1.2; letter-spacing: -.03em; }
.auth-card-hint { max-width: 330px; color: #8995a3; font-size: 15px; line-height: 1.45; }
.auth-submit { min-height: 50px; margin-top: 14px; border-radius: 26px; background: #159ef5; box-shadow: none; font-size: 16px; }
.auth-submit:hover { background: #2aa8f7; }
.auth-telegram-submit { display: flex; align-items: center; justify-content: center; gap: 8px; }
.auth-telegram-submit img { width: 20px; height: 20px; filter: brightness(0) invert(1); }
.auth-card-close { display: grid; place-items: center; top: 16px; right: 16px; width: 38px; height: 38px; padding: 0; border-radius: 50%; background: #20262d; color: #8d98a5; font-size: 23px; font-weight: 700; }
.auth-field-row { position: relative; flex-direction: column; gap: 10px; }
.auth-country-picker { position: relative; width: 100%; }
.auth-country-trigger { display: grid; grid-template-columns: minmax(0,1fr) 20px; align-items: center; width: 100%; min-height: 54px; padding: 0 18px; border: 1px solid #3b4753; border-radius: 27px; background: #1b2026; color: #f5f6f8; text-align: left; cursor: pointer; }
.auth-country-trigger span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-country-trigger i { color: #aab5c0; font-size: 20px; font-style: normal; text-align: right; }
.auth-dial-select { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.auth-country-menu { position: absolute; z-index: 4; top: calc(100% + 8px); left: 0; width: 100%; overflow: hidden; border: 1px solid #3b4753; border-radius: 18px; background: #20262d; box-shadow: 0 18px 50px rgba(0,0,0,.5); }
.auth-country-menu > input { width: calc(100% - 20px); height: 42px; margin: 10px; padding: 0 14px; border: 1px solid #3b4753; border-radius: 21px; outline: 0; background: #1a2026; color: #f5f6f8; }
.auth-country-menu > div { max-height: 245px; overflow-y: auto; padding: 4px 0 8px; }
.auth-country-menu button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 42px; padding: 0 18px; border: 0; background: transparent; color: #f5f6f8; text-align: left; cursor: pointer; }
.auth-country-menu button:hover, .auth-country-menu button:focus-visible { background: #2e3945; outline: 0; }
.auth-country-menu button b { color: #98a6b4; font-weight: 400; }
.auth-country-empty { margin: 14px 18px; color: #8995a3; font-size: 14px; }
.auth-input { min-height: 54px; padding: 0 18px; border: 1px solid #3b4753; border-radius: 27px; background: #1b2026; font-size: 17px; }
.auth-input:focus { border-color: #159ef5; box-shadow: 0 0 0 3px rgba(21,158,245,.16); }
.auth-phone-field { display: flex; align-items: center; width: 100%; min-height: 54px; padding: 0 18px; border: 1px solid #3b4753; border-radius: 27px; background: #1b2026; color: #f5f6f8; box-sizing: border-box; }
.auth-phone-field:focus-within { border-color: #159ef5; box-shadow: 0 0 0 3px rgba(21,158,245,.16); }
.auth-phone-field span { flex: 0 0 auto; margin-right: 8px; font-size: 17px; }
.auth-phone-field input { min-width: 0; flex: 1; height: 50px; padding: 0; border: 0; outline: 0; background: transparent; color: #f5f6f8; font: inherit; font-size: 17px; }
.auth-phone-field input::placeholder { color: #6f7c89; }
.auth-input-center { text-align: center; letter-spacing: 7px; }
.auth-back, .auth-logout { margin-top: 8px; color: #9aa7b4; }
.auth-mobile-back { display: none; }
.tg-profile { display: flex; align-items: center; gap: 13px; width: 100%; margin: 9px 0 2px; padding: 13px 16px; border-radius: 18px; background: #202a34; text-align: left; }
.tg-avatar { position: relative; display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 auto; overflow: hidden; border-radius: 50%; background: #159ef5; color: #fff; font-size: 18px; font-weight: 700; }
.tg-profile-copy { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.tg-profile-copy strong { overflow: hidden; color: #f5f6f8; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.tg-profile-copy small { color: #8995a3; font-size: 13px; }

@media (max-width: 760px) {
  .mobile-menu { width: min(868px, 75vw); }
  .auth-dialog {
    align-items: center;
    padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
    overflow-y: auto;
  }
  .auth-card {
    width: min(390px, 100%);
    min-height: 0;
    max-height: calc(100dvh - 28px);
    padding: 56px 22px 22px;
    border: 1px solid #303b47;
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(0,0,0,.62);
    overflow-y: auto;
  }
  .auth-card > #tg-step-intro { flex: none; }
  .auth-card > #tg-step-intro .auth-submit { margin-top: 22px; }
  .auth-card-close { top: 13px; right: 14px; width: 36px; height: 36px; font-size: 0; font-weight: 500; }
  .auth-card-close::before { content: "✕"; font-size: 20px; line-height: 1; }
  .auth-logos { margin: 0 0 4px; }
  .auth-logos img { width: 46px; height: 46px; }
  .auth-card h2 { font-size: 23px; font-weight: 600; letter-spacing: -.02em; }
  .auth-card-hint { max-width: 330px; font-size: 15px; line-height: 1.42; }
  .auth-submit { min-height: 50px; margin-top: 14px; font-size: 16px; font-weight: 600; }
  .auth-back { min-height: 38px; margin-top: 2px; padding: 8px 14px; font-size: 14px; }
  .auth-mobile-back { display: inline-flex; align-items: center; justify-content: center; }
  .auth-country-trigger, .auth-phone-field, .auth-input { min-height: 50px; }
  .auth-phone-field input { height: 46px; }
}

.listing-skeleton-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 150px;
  align-items: center;
  gap: 24px;
  min-height: 82px;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.listing-skeleton-block {
  display: block;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,.06), rgba(255,255,255,.14), rgba(255,255,255,.06));
  background-size: 220% 100%;
  animation: listing-skeleton-shimmer 1.3s ease-in-out infinite;
}
.listing-skeleton-name { width: min(56%, 260px); }
.listing-skeleton-price { width: 84px; justify-self: end; }
.listing-skeleton-time { width: 118px; justify-self: end; }
.gift-skeleton-card { min-width: 0; overflow: hidden; border-radius: 8px; background: #222c36; }
.gift-skeleton-art {
  display: block;
  aspect-ratio: 1;
  background: linear-gradient(90deg, rgba(255,255,255,.06), rgba(255,255,255,.14), rgba(255,255,255,.06));
  background-size: 220% 100%;
  animation: listing-skeleton-shimmer 1.3s ease-in-out infinite;
}
.gift-skeleton-info { display: flex; align-items: center; justify-content: center; min-height: 44px; gap: 7px; padding: 5px; }
.gift-skeleton-name { width: 44%; }
.gift-skeleton-price { width: 24%; }
@keyframes listing-skeleton-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
@media (max-width: 760px) {
  .listing-skeleton-row {
    box-sizing: border-box;
    grid-template-columns: 55% 45%;
    min-height: 44px;
    height: 44px;
    gap: 0;
    padding: 0;
    border-top: 1px solid #1a2026;
    border-bottom: 0;
  }
  .listing-skeleton-row:not(:last-child) { margin-bottom: 1px; }
  .listing-skeleton-name { width: 58%; margin-left: 16px; }
  .listing-skeleton-price { width: 44%; margin-left: 8px; justify-self: start; }
  .listing-skeleton-time { display: none; }
  .gift-skeleton-info { min-height: 36px; height: 36px; gap: 4px; padding: 5px; }
}

/* Search statuses mirror the public marketplace result labels. */
.listing-status-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  vertical-align: 2px;
}
.listing-status-badge.available { color: #54df89; background: rgba(50, 166, 97, .18); }
.listing-status-badge.taken { color: #ef9551; background: rgba(164, 98, 47, .18); }

.legal-page { min-height: calc(100vh - 144px); }
.legal-page h1 { margin-bottom: 36px; }
.legal-page p { max-width: 720px; }

/* Keep Telegram and TON controls in the compact header. The earlier mobile
   grid rules size both buttons and the menu toggle for narrow iPhone widths. */
@media (max-width: 760px) {
  body[data-page="item"] .detail-site-header { grid-template-columns: 146px 195px 52px; }
  body[data-page="item"] .detail-site-header .detail-header-search { display: none; }
  body[data-page="item"] .detail-site-header .connection-actions { display: flex; grid-column: 2; grid-row: 1; align-items: center; gap: 6px; width: 195px; }
  body[data-page="item"] .detail-site-header .connection-actions .header-action { display: flex; align-items: center; justify-content: center; min-height: 28px; height: 28px; padding: 0 7px; border-radius: 5px; }
  body[data-page="item"] .detail-site-header .connection-actions .header-action:first-child { flex: 0 0 82px; width: 82px; min-width: 82px; font-size: 11px; }
  body[data-page="item"] .detail-site-header .connection-actions .header-action.primary { flex: 0 0 107px; width: 107px; min-width: 107px; font-size: 11.5px; }
  body[data-page="item"] .detail-site-header .connection-actions .telegram-mark { width: 13px; height: 13px; margin-right: 3px; }
  body[data-page="item"] .detail-site-header .connection-actions .ton-mark { width: 14px; height: 14px; margin-right: 4px; }
  body[data-page="item"] .detail-site-header .desktop-connect-label { display: none; }
  body[data-page="item"] .detail-site-header .mobile-connect-label { display: inline; }
  .legal-page { width: calc(100% - 20px); padding: 44px 0 80px; }
  .legal-page h1 { margin-bottom: 30px; font-size: 34px; }
  .legal-page h2 { margin-top: 34px; font-size: 24px; }
  .legal-page p { font-size: 16px; line-height: 1.7; }
  .listing-status-badge { font-size: 10px; }
}

@media (max-width: 380px) {
  body[data-page="item"] .detail-site-header { grid-template-columns: 134px minmax(0, 1fr) 46px; }
  body[data-page="item"] .detail-site-header .connection-actions { gap: 4px; width: 100%; }
  body[data-page="item"] .detail-site-header .connection-actions .header-action:first-child { flex-basis: 72px; width: 72px; min-width: 72px; font-size: 10px; }
  body[data-page="item"] .detail-site-header .connection-actions .header-action.primary { flex: 1 1 auto; width: auto; min-width: 86px; font-size: 10.5px; }
}

/* Final mobile geometry: contain every route within the visual viewport. */
html,
body { width: 100%; max-width: 100%; overflow-x: hidden; }
body.mobile-menu-open { overflow: hidden; }

.asset-listing-dialog {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 16px;
}
.asset-listing-card {
  position: relative;
  box-sizing: border-box;
  width: min(420px, calc(100vw - 32px));
  padding: 26px;
  border: 1px solid #303c48;
  border-radius: 15px;
  background: #18222d;
  box-shadow: 0 24px 80px rgba(0,0,0,.62);
}
.asset-listing-card h2 { margin: 0 38px 5px 0; color: #f5f7f9; font-size: 23px; line-height: 30px; }
.asset-listing-name { margin: 0 0 20px; overflow: hidden; color: #8e9aa7; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.asset-listing-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.asset-listing-modes button { min-height: 42px; border: 1px solid #354453; border-radius: 7px; background: #222d38; color: #a3afbb; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.asset-listing-modes button.active { border-color: #2da5ef; background: #298ed3; color: #fff; }
.asset-listing-field { display: block; margin-top: 14px; color: #f4f6f8; font-size: 14px; font-weight: 700; }
.asset-listing-field > span { display: block; margin-bottom: 8px; }
.asset-listing-field > div { display: grid; grid-template-columns: 22px 1fr; align-items: center; min-height: 48px; padding: 0 14px; border-radius: 7px; background: #26323e; }
.asset-listing-field input,
.asset-listing-field select { box-sizing: border-box; width: 100%; height: 48px; border: 0; outline: 0; background: #26323e; color: #f5f7f9; font: inherit; font-size: 15px; }
.asset-listing-field select { padding: 0 12px; border-radius: 7px; }
.asset-listing-note { margin: 18px 0 0; color: #8996a3; font-size: 12px; line-height: 17px; }
.asset-listing-error { margin: 12px 0 0; color: #ff665c; font-size: 13px; line-height: 18px; }
.asset-listing-submit { width: 100%; min-height: 46px; margin-top: 20px; border-radius: 7px; box-shadow: none; }
.asset-listing-delay-dialog {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: grid;
  place-items: center;
  padding: 16px;
}
.asset-listing-delay-card {
  position: relative;
  box-sizing: border-box;
  width: min(360px, calc(100vw - 32px));
  padding: 24px 26px 20px;
  border: 1px solid #2c3844;
  border-radius: 10px;
  background: #18222d;
  box-shadow: 0 24px 80px rgba(0,0,0,.62);
}
.asset-listing-delay-card h2 {
  margin: 0 0 14px;
  color: #f5f7f9;
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
}
.asset-listing-delay-countdown {
  margin: 0 0 8px;
  color: #3aa9ef;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}
.asset-listing-delay-date {
  margin: 0;
  color: #c5cdd5;
  font-size: 14px;
  line-height: 20px;
}
.asset-listing-delay-date strong { color: #f2f5f7; font-weight: 600; }
.asset-listing-delay-understood {
  display: block;
  min-width: 0;
  margin: 18px 0 0 auto;
  padding: 5px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #3aa9ef;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  cursor: pointer;
}
.asset-listing-delay-understood:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.account-asset-row:not(.account-asset-row-username) { grid-template-columns: 42px minmax(0,1fr) minmax(132px,190px) 34px 20px; }

@media (max-width: 760px) {
  .asset-listing-card { max-height: calc(100dvh - 28px); padding: 23px 20px 20px; overflow-y: auto; }
  .asset-listing-card h2 { font-size: 21px; line-height: 27px; }
  .account-asset-row:not(.account-asset-row-username) { grid-template-columns: 36px minmax(0,1fr) 100px 30px 12px; gap: 5px; padding-right: 7px; padding-left: 8px; }
  .account-asset-row:not(.account-asset-row-username) .account-asset-more { width: 30px; height: 30px; }
}

/* Keep the official TonConnect portal as the only fixed touch layer while it
   is open. This prevents hidden host overlays from swallowing taps in iOS
   Safari without changing wallet or Telegram connection logic. */
body.tonconnect-modal-open .stub-dialog,
body.tonconnect-modal-open .auth-dialog,
body.tonconnect-modal-open .connected-popover,
body.tonconnect-modal-open .mobile-menu {
  position: absolute !important;
  pointer-events: none !important;
}

/* The demo marker remains visible on every route, including compact headers. */
body .site-header .demo-badge,
body .detail-site-header .demo-badge { display: inline-flex !important; align-items: center; padding: 2px 4px; border: 1px solid rgba(58,169,239,.55); border-radius: 4px; color: #3aa9ef; font-size: 9px; line-height: 11px; text-transform: uppercase; }

/* Compact visual-only dialog used by service, asset and offer previews. */
.stub-dialog { z-index: 140; padding: 16px; }
.stub-card { box-sizing: border-box; width: min(360px, calc(100vw - 32px)); padding: 24px; border-radius: 14px; background: #18222d; box-shadow: 0 22px 70px rgba(0,0,0,.58); }
.stub-card-close { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: #232f3b; color: #8f9ba8; font: inherit; font-size: 22px; line-height: 1; cursor: pointer; }
.stub-icon { width: 36px; height: 36px; margin-bottom: 16px; border-radius: 11px; font-size: 18px; font-weight: 800; }
.stub-card .eyebrow { margin-bottom: 9px; font-size: 10px; letter-spacing: .14em; }
.stub-card h2 { margin: 0 34px 8px 0; font-size: 21px; line-height: 27px; }
.stub-card > p:not(.eyebrow) { margin-bottom: 20px; font-size: 14px; line-height: 20px; }
.stub-card > .primary-button { min-height: 42px; padding: 0 22px; border-radius: 7px; font-size: 14px; }
.ads-info-dialog .stub-card { width: min(360px, calc(100vw - 32px)); padding: 25px 26px 22px; text-align: center; }
.ads-info-dialog .stub-icon { display: none; }
.ads-info-dialog .stub-card h2 { margin: 4px 30px 0; font-size: 22px; line-height: 27px; }
.ads-info-dialog .ads-info-copy { margin: 20px 10px 0; color: #8d98a5; font-size: 14px; line-height: 18px; text-align: left; }
.ads-info-dialog .ads-info-copy ol { margin: 0; padding-left: 20px; }
.ads-info-dialog .ads-info-copy li { padding-left: 6px; }
.ads-info-dialog .ads-info-copy li + li { margin-top: 12px; }
.ads-info-dialog .stub-card > .primary-button { width: 100%; margin-top: 30px; }

@media (max-width: 760px) {
  main,
  footer,
  .site-header { max-width: 100%; }

  body:not([data-page="item"]) .site-header,
  body[data-page="item"] .detail-site-header {
    grid-template-columns: minmax(118px, 1fr) auto 48px;
  }

  .market-main.service-form-mode:not(.premium-mode) .package-option { grid-template-columns: 34px minmax(0,1fr) auto; }
  .market-main.service-form-mode .payment-network-menu { top: calc(100% + 5px); }

  body:not([data-page="item"]) .site-header .brand,
  body[data-page="item"] .detail-site-header .brand { min-width: 0; overflow: hidden; }

  body:not([data-page="item"]) .site-header .connection-actions,
  body[data-page="item"] .detail-site-header .connection-actions { width: 195px; }

  body:not([data-page="item"]) .site-header .connection-actions:has([data-stub="telegram-connect"][hidden]),
  body[data-page="item"] .detail-site-header .connection-actions:has([data-stub="telegram-connect"][hidden]) { width: 107px; }

  body:not([data-page="item"]) .site-header:has(.account-header-search:not([hidden])) {
    grid-template-columns: minmax(0, 1fr) 48px;
    grid-template-rows: 48px 42px;
  }
  .site-header:has(.account-header-search:not([hidden])) .brand { grid-column: 1; grid-row: 1; }
  .site-header:has(.account-header-search:not([hidden])) .mobile-menu-toggle { grid-column: 2; grid-row: 1; }
  .site-header:has(.account-header-search:not([hidden])) .account-header-search {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-height: 42px;
    height: 42px;
    margin: 0;
    padding: 0 16px;
    border-radius: 0;
  }
  .site-header:has(.account-header-search:not([hidden])) .account-header-search input { font-size: 14px; }

  .site-header .nav-tabs { max-width: 100%; overscroll-behavior-x: contain; }

  .mobile-menu,
  .mobile-menu:has(.mobile-account-panel:not([hidden])) {
    top: 0;
    width: min(288px, 75vw);
    height: 100dvh;
    max-height: 100dvh;
    padding: 26px 18px max(18px, env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .mobile-menu::-webkit-scrollbar { display: none; }
  .mobile-menu:has(.mobile-account-panel:not([hidden])) { padding-top: 28px; }
  .mobile-account-panel {
    margin: 0 -18px 10px;
    padding: 0 18px 9px;
  }
  .mobile-telegram-heading {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    margin: 0 36px 13px 0;
  }
  .mobile-telegram-heading .account-popover-avatar { width: 36px; height: 36px; }
  .mobile-telegram-heading > span:last-child { display: flex; min-width: 0; flex-direction: column; }
  .mobile-telegram-heading strong,
  .mobile-telegram-heading small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-telegram-heading strong { color: #fff; font-size: 14px; }
  .mobile-telegram-heading small { color: #8794a1; font-size: 11px; }
  .mobile-wallet-heading { gap: 2px; margin: 0 36px 14px 0; }
  .mobile-wallet-heading strong { font-size: 14px; }
  .mobile-wallet-heading small { font-size: 11px; }
  .mobile-account-panel h4 { margin-bottom: 4px; font-size: 11px; }
  .mobile-account-panel > button {
    grid-template-columns: 29px minmax(0, 1fr) auto;
    min-height: 43px;
    font-size: 14px;
  }
  .mobile-account-panel > button .account-icon { width: 20px; height: 20px; }
  .mobile-menu:has(.mobile-account-panel:not([hidden])) > h4 { margin-top: 2px; }
  .mobile-menu:has(.mobile-account-panel:not([hidden])) .mobile-menu-footer {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    margin: 6px 0 0;
    padding: 0;
  }
  .mobile-menu:has(.mobile-account-panel:not([hidden])) .mobile-menu-footer p { display: none; }
  .mobile-menu:has(.mobile-account-panel:not([hidden])) .mobile-menu-footer button,
  .mobile-menu:has(.mobile-account-panel:not([hidden])) .mobile-menu-footer button + button { margin-top: 8px; }

  .market-main.account-mode { width: calc(100% - 20px); min-height: calc(100dvh - 134px); }
  .account-page { padding: 24px 0 56px; }
  .account-page-heading { align-items: flex-start; gap: 12px; margin: 0 2px 17px; }
  .account-page-heading h1 { font-size: 22px; line-height: 28px; }
  .account-heading-link { max-width: 52%; font-size: 12px; line-height: 16px; }
  .account-page-body { min-width: 0; gap: 12px; }
  .account-tabs {
    gap: 18px;
    padding: 0 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .account-tabs::-webkit-scrollbar { display: none; }
  .account-tabs button { flex: 0 0 auto; min-height: 36px; padding-bottom: 7px; font-size: 13px; }
  .account-tabs b { min-width: 20px; height: 20px; padding: 0 5px; }
  .account-list-search { min-height: 42px; height: 42px; padding: 0 15px; }
  .account-list-search input { font-size: 14px; }
  .account-table { min-width: 0; }
  .account-table-head { grid-template-columns: minmax(0, 1fr) 108px 14px; min-height: 30px; padding: 0 10px; font-size: 11px; }
  .account-asset-row {
    grid-template-columns: 38px minmax(0, 1fr) 108px 14px;
    min-height: 58px;
    gap: 8px;
    padding: 7px 10px;
  }
  .account-asset-row > img,
  .account-asset-fallback { width: 38px; height: 38px; }
  .account-asset-row strong { font-size: 14px; }
  .account-asset-row small { font-size: 11px; }
  .account-blue-button {
    width: fit-content;
    max-width: 108px;
    justify-self: end;
    min-height: 31px;
    padding: 0 7px;
    overflow: hidden;
    font-size: 11px;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .account-username-row .account-blue-button { padding-right: 5px; padding-left: 5px; overflow: visible; font-size: 10.5px; text-overflow: clip; }
  .account-row-link,
  .account-username-row > i { font-size: 23px; }
  .account-username-row {
    grid-template-columns: minmax(0, 1fr) 116px 14px;
    min-height: 54px;
    gap: 8px;
    padding: 7px 10px;
  }
  .account-convert-copy { margin: -2px 2px 0; font-size: 14px; line-height: 20px; }
  .account-convert-copy p { margin-bottom: 14px; }
  .account-empty { padding: 28px 14px; font-size: 14px; }
  .account-notice { margin: 0 2px; font-size: 12px; line-height: 17px; }
  .account-bottom-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .account-bottom-actions button { width: 100%; min-height: 42px; font-size: 13px; }
  .account-info-row,
  .account-nav-row { min-height: 48px; }

  .legal-page { width: calc(100% - 20px); padding: 36px 0 64px; }
  .legal-page h1 { margin-bottom: 24px; font-size: 30px; }
  .legal-page h2 { margin-top: 28px; font-size: 20px; }
  .legal-page p,
  .legal-page li { font-size: 14px; line-height: 1.6; }
}

@media (max-width: 380px) {
  body:not([data-page="item"]) .site-header,
  body[data-page="item"] .detail-site-header { grid-template-columns: minmax(106px, 1fr) auto 44px; }
  body:not([data-page="item"]) .site-header .brand,
  body[data-page="item"] .detail-site-header .brand { position: relative; }
  body:not([data-page="item"]) .site-header .demo-badge,
  body[data-page="item"] .detail-site-header .demo-badge {
    position: absolute;
    top: 3px;
    right: 0;
    margin: 0;
    transform: scale(.82);
    transform-origin: top right;
  }
  body:not([data-page="item"]) .site-header .brand-wordmark,
  body[data-page="item"] .detail-site-header .brand-wordmark { width: 70px !important; }
  body:not([data-page="item"]) .site-header .brand-symbol,
  body[data-page="item"] .detail-site-header .brand-symbol { width: 24px !important; height: 24px !important; }
  body:not([data-page="item"]) .site-header .connection-actions,
  body[data-page="item"] .detail-site-header .connection-actions { width: 162px; }
  body:not([data-page="item"]) .site-header .connection-actions:has([data-stub="telegram-connect"][hidden]),
  body[data-page="item"] .detail-site-header .connection-actions:has([data-stub="telegram-connect"][hidden]) { width: 86px; }
  .account-asset-row { grid-template-columns: 36px minmax(0, 1fr) 100px 12px; gap: 6px; padding-right: 8px; padding-left: 8px; }
  .account-table-head { grid-template-columns: minmax(0, 1fr) 100px 12px; padding-right: 8px; padding-left: 8px; }
  .account-username-row { grid-template-columns: minmax(0, 1fr) 105px 12px; gap: 6px; padding-right: 8px; padding-left: 8px; }
  .account-blue-button { padding: 0 5px; font-size: 10.5px; }
}

/* Final connected-menu placement must win over the route geometry above. */
@media (max-width: 760px) {
  body.fully-connected:not([data-page="item"]) .site-header,
  body.fully-connected[data-page="item"] .detail-site-header {
    grid-template-columns: minmax(0, 1fr) 48px !important;
  }
  body.fully-connected .site-header .connection-actions,
  body.fully-connected .detail-site-header .connection-actions { display: none !important; }
  body.fully-connected .site-header .brand,
  body.fully-connected .detail-site-header .brand { grid-column: 1; grid-row: 1; }
  body.fully-connected .site-header .mobile-menu-toggle,
  body.fully-connected .detail-site-header .mobile-menu-toggle { grid-column: 2; grid-row: 1; }
  body.fully-connected .site-header .nav-tabs,
  body.fully-connected .detail-site-header .nav-tabs { grid-column: 1 / -1; }

  .mobile-menu:has(.mobile-account-panel:not([hidden])) .mobile-menu-footer {
    width: calc(100% + 36px);
    margin: auto -18px 0;
    padding: 14px 18px max(22px, env(safe-area-inset-bottom));
    border-top: 1px solid #303942;
  }
  .mobile-menu:has(.mobile-account-panel:not([hidden])) .mobile-user-footer button {
    width: auto;
    min-height: 34px;
    height: auto;
    margin: 0;
    padding: 0;
  }
}

/* Final My Assets and mobile-menu fidelity overrides. */
.mobile-menu-icon-terms,
.mobile-menu-icon-privacy {
  box-sizing: border-box;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 0;
  clip-path: none;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 24px 24px;
}
.mobile-menu-icon-terms {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20x%3D%224.25%22%20y%3D%222.75%22%20width%3D%2215.5%22%20height%3D%2218.5%22%20rx%3D%222.25%22%20stroke%3D%22white%22%20stroke-width%3D%221.5%22%2F%3E%3Cpath%20d%3D%22M7.5%208.4L9.15%2010.05L12.4%206.8M7.5%2014.25H16.5M7.5%2017.4H14.5%22%20stroke%3D%22white%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
}
.mobile-menu-icon-privacy {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12%202.75L19.25%205.75V11.1C19.25%2016.15%2016.3%2019.55%2012%2021.25C7.7%2019.55%204.75%2016.15%204.75%2011.1V5.75L12%202.75Z%22%20stroke%3D%22white%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M8.25%2011.8L10.65%2014.2L15.9%208.95%22%20stroke%3D%22white%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
}
.mobile-menu-icon-terms::before,
.mobile-menu-icon-terms::after,
.mobile-menu-icon-privacy::before,
.mobile-menu-icon-privacy::after { content: none; }

.account-table-head-usernames,
.account-asset-row-username { grid-template-columns: minmax(0, 1fr) 132px 34px 14px; }
.account-table-head-usernames > span:nth-child(2) { grid-column: 2 / 4; }

@media (max-width: 760px) {
  .account-table-head-usernames,
  .account-asset-row-username {
    grid-template-columns: minmax(0, 1fr) 116px 32px 11px;
    gap: 6px;
    padding-right: 8px;
    padding-left: 14px;
  }
  .account-table-head-usernames { min-height: 30px; }
  .account-asset-row-username { min-height: 45px; padding-top: 4px; padding-bottom: 4px; }
}

@media (max-width: 380px) {
  .account-table-head-usernames,
  .account-asset-row-username {
    grid-template-columns: minmax(0, 1fr) 106px 30px 10px;
    gap: 5px;
    padding-right: 7px;
    padding-left: 10px;
  }
}

/* Motion fidelity: Fragment's mobile drawer uses a 200ms ease transition.
   Content changes are deliberately shorter so navigation feels responsive
   without the abrupt hidden/display swaps that were visible on phones. */
.tab,
.account-tabs button,
#auction-filter,
#sort-filter {
  transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}

@keyframes fragment-route-enter {
  from { opacity: .84; transform: translate3d(0, 6px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes fragment-content-enter {
  from { opacity: .76; transform: translate3d(0, 4px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes fragment-listing-enter {
  from { opacity: .82; }
  to { opacity: 1; }
}

@keyframes fragment-dialog-enter {
  from { opacity: 0; transform: translate3d(0, 10px, 0) scale(.985); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes fragment-backdrop-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 760px) {
  .nav-tabs { scroll-behavior: smooth; }

  .mobile-menu,
  .mobile-menu:has(.mobile-account-panel:not([hidden])) {
    transform: translate3d(100%, 0, 0);
    box-shadow: -100vw 0 0 100vw rgba(3, 8, 12, 0);
    pointer-events: none;
    will-change: transform, box-shadow;
    transition: transform .2s ease, box-shadow .2s ease;
  }
  .mobile-menu.is-open,
  .mobile-menu.is-open:has(.mobile-account-panel:not([hidden])) {
    transform: translate3d(0, 0, 0);
    box-shadow: -100vw 0 0 100vw rgba(3, 8, 12, .76);
    pointer-events: auto;
  }
  .mobile-menu.is-closing { pointer-events: none; }

  .route-motion-enter { animation: fragment-route-enter .22s ease both; }
  .content-motion-enter { animation: fragment-content-enter .18s ease both; }
  .listing-motion-enter { animation: fragment-listing-enter .14s ease both; }

  .filter-menu:not([hidden]) {
    opacity: 0;
    transform: translate3d(0, -5px, 0) scale(.985);
    transform-origin: top right;
    pointer-events: none;
    will-change: opacity, transform;
    transition: opacity .16s ease, transform .16s ease;
  }
  .filter-menu.is-open:not([hidden]) {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    pointer-events: auto;
  }
  .filter-menu.is-closing { pointer-events: none; }

  .auth-dialog:not([hidden]) .stub-backdrop,
  .stub-dialog:not([hidden]) .stub-backdrop { animation: fragment-backdrop-enter .2s ease both; }
  .auth-dialog:not([hidden]) .auth-card,
  .stub-dialog:not([hidden]) .stub-card { animation: fragment-dialog-enter .2s ease both; }
  .auth-card > div[id^="tg-step-"]:not([hidden]) { animation: fragment-content-enter .18s ease both; }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-menu,
  .filter-menu,
  .tab,
  .account-tabs button,
  #auction-filter,
  #sort-filter {
    transition: none !important;
  }
  .route-motion-enter,
  .content-motion-enter,
  .listing-motion-enter,
  .auth-dialog:not([hidden]) .stub-backdrop,
  .stub-dialog:not([hidden]) .stub-backdrop,
  .auth-dialog:not([hidden]) .auth-card,
  .stub-dialog:not([hidden]) .stub-card,
  .auth-card > div[id^="tg-step-"]:not([hidden]) {
    animation: none !important;
  }
}

/* The extra action column belongs to the existing My Assets table and keeps
   the two listing mechanisms reachable without replacing Assign to Telegram. */
.account-table-head-numbers,
.account-table-head-gifts { grid-template-columns: 42px minmax(0,1fr) minmax(132px,190px) 34px 20px; }
.account-table-head-numbers > span:first-child,
.account-table-head-gifts > span:first-child { grid-column: 1 / 3; }
.account-table-head-numbers > span:nth-child(2),
.account-table-head-gifts > span:nth-child(2) { grid-column: 3 / 5; }
.account-asset-more { cursor: pointer; }
.asset-listing-dialog:not([hidden]) .stub-backdrop { animation: fragment-backdrop-enter .2s ease both; }
.asset-listing-dialog:not([hidden]) .asset-listing-card { animation: fragment-dialog-enter .2s ease both; }
.asset-listing-delay-dialog:not([hidden]) .stub-backdrop { animation: fragment-backdrop-enter .2s ease both; }
.asset-listing-delay-dialog:not([hidden]) .asset-listing-delay-card { animation: fragment-dialog-enter .2s ease both; }

@media (max-width: 760px) {
  .account-table-head-numbers,
  .account-table-head-gifts { grid-template-columns: 36px minmax(0,1fr) 100px 30px 12px; gap: 5px; padding-right: 7px; padding-left: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .asset-listing-dialog:not([hidden]) .stub-backdrop,
  .asset-listing-dialog:not([hidden]) .asset-listing-card,
  .asset-listing-delay-dialog:not([hidden]) .stub-backdrop,
  .asset-listing-delay-dialog:not([hidden]) .asset-listing-delay-card { animation: none !important; }
}

/* Mobile Convert to Collectibles geometry, scoped to this account route only. */
@media (max-width: 760px) {
  .account-page:has(.account-username-table) { padding-top: 22px; }
  .account-page:has(.account-username-table) .account-page-heading {
    margin: 0 6px 11px;
  }
  .account-page:has(.account-username-table) .account-page-heading h1 {
    font-size: 20px;
    line-height: 24px;
  }
  .account-page:has(.account-username-table) .account-convert-copy {
    margin: 0 6px;
    font-size: 13px;
    line-height: 18px;
  }
  .account-page:has(.account-username-table) .account-convert-copy p {
    margin: 0 0 12px;
  }
  .account-page:has(.account-username-table) .account-convert-copy p:last-child {
    margin-bottom: 0;
  }
  .account-page:has(.account-username-table) .account-table-head,
  .account-page:has(.account-username-table) .account-username-row {
    grid-template-columns: minmax(0, 1fr) minmax(130px, 42%) 14px;
    gap: 8px;
    padding-right: 12px;
    padding-left: 16px;
  }
  .account-page:has(.account-username-table) .account-username-row {
    min-height: 44px;
    padding-top: 4px;
    padding-bottom: 4px;
  }
  .account-page:has(.account-username-table) .account-username-row strong {
    font-size: 14px;
    line-height: 17px;
  }
  .account-page:has(.account-username-table) .account-username-row small {
    margin-top: 0;
    font-size: 11px;
    line-height: 14px;
  }
  .account-page:has(.account-username-table) .account-username-row .account-blue-button {
    width: 108px;
    max-width: 108px;
    min-height: 28px;
    justify-self: start;
    padding: 0 8px;
    font-size: 11px;
  }
  .account-page:has(.account-username-table) .account-username-row > i {
    font-size: 22px;
  }
}

/* Temporary: keep the existing DEMO markup available for rollback/replacement. */
.demo-badge {
  display: none !important;
}

/* Username detail pages use the same compact mobile header as fragment.com:
   brand, search field and menu. Connection controls stay in the drawer. */
@media (max-width: 760px) {
  body[data-page="item"]:not(.detail-gift):not(.detail-number) .detail-site-header {
    grid-template-columns: minmax(145px, 45%) minmax(0, 1fr) 48px !important;
  }
  body[data-page="item"]:not(.detail-gift):not(.detail-number) .detail-site-header .connection-actions {
    display: none !important;
  }
  body[data-page="item"]:not(.detail-gift):not(.detail-number) .detail-site-header .detail-header-search {
    display: flex !important;
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    height: 28px;
    margin: 0;
  }
  body[data-page="item"]:not(.detail-gift):not(.detail-number) .detail-site-header .mobile-menu-toggle {
    grid-column: 3;
    grid-row: 1;
  }
  body[data-page="item"]:not(.detail-gift):not(.detail-number) .detail-purchase {
    padding: 5px 15px 11px;
  }
}
