/* STREXO 2.0 — couche mobile uniquement */

@media (max-width: 860px) {
  :root {
    --header-h: 62px;
  }

  body {
    background:
      radial-gradient(420px 260px at 20% -6%, rgba(64,133,255,.14), transparent 64%),
      radial-gradient(360px 260px at 100% 10%, rgba(125,102,255,.1), transparent 62%),
      #07111f;
  }

  .app {
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }

  .app-header {
    padding: 0 12px;
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
    min-height: var(--header-h);
  }

  .app-header-left {
    justify-content: flex-start;
  }

  .app-header-actions {
    justify-content: flex-end;
  }

  .app-header-actions .header-link-label {
    display: none;
  }

  .app-header-actions .header-link {
    width: 38px;
    padding: 0;
  }

  .header-plus-btn {
    width: 38px;
    height: 38px;
    min-height: 38px;
  }

  .app-header-title {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .app-brand-name,
  .app-page-title {
    display: none;
  }

  .app-brand-mark {
    width: 34px;
    height: 34px;
  }

  .header-balance {
    max-width: 82px;
    padding: 7px 8px;
  }

  .header-balance small {
    display: none;
  }

  .header-balance span {
    font-size: 11px;
  }

  #block-banner-slot {
    top: calc(var(--header-h) + 8px);
    left: 10px;
    right: 10px;
  }

  .block-banner {
    padding: 9px 11px;
    font-size: 11px;
    border-radius: 12px;
  }

  .nav {
    top: auto;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    width: auto;
    height: 66px;
    padding: 6px;
    border-radius: 20px;
    background: rgba(7,17,31,.92);
    box-shadow: 0 18px 44px rgba(0,0,0,.34);
  }

  #main-nav-inner {
    flex-direction: row;
    gap: 4px;
    align-items: stretch;
  }

  .nav-item {
    min-height: 54px;
    padding: 5px 2px;
    justify-content: center;
    align-items: center;
    flex: 1;
    flex-direction: column;
    gap: 3px;
    border-radius: 14px;
    font-size: 8px;
    text-align: center;
  }

  .nav-item.is-active::after {
    left: 25%;
    right: 25%;
    top: auto;
    bottom: 2px;
    width: auto;
    height: 2px;
  }

  .nav-item.is-active .nav-icon {
    background: rgba(90,167,255,.09);
  }

  .nav-icon {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
  }

  .nav-icon svg {
    width: 18px;
    height: 18px;
  }

  .nav-badge {
    top: -2px;
    right: -1px;
    min-width: 16px;
    height: 16px;
    font-size: 8px;
  }

  .nav-badge-friends {
    right: -1px;
    bottom: -1px;
  }

  .admin-nav-bottom {
    display: none;
  }

  .content {
    width: 100%;
    margin-left: 0;
    padding: calc(var(--header-h) + 14px) 12px 20px;
  }

  .content > * {
    max-width: none;
  }

  .view-head h2 {
    font-size: 28px;
  }

  .home-layout-v2 {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .home-intro-v2 {
    min-height: 156px;
    padding: 20px;
    border-radius: 22px;
  }

  .home-greeting {
    font-size: clamp(28px, 9vw, 42px);
  }

  .home-subtitle-v2 {
    font-size: 12px;
    max-width: 290px;
  }

  .home-compose-v2 {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    font-size: 27px;
  }

  .home-stories-section,
  .feed-section-v2 {
    margin-top: 14px;
  }

  .home-side-v2 {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .home-side-card-v2 {
    padding: 13px;
    border-radius: 16px;
  }

  .home-side-card-v2.home-profile-mini-v2 {
    grid-column: 1 / -1;
  }

  .home-stats-v2 {
    gap: 6px;
  }

  .home-stats-v2 div {
    padding: 10px;
  }

  .home-shop-mini-v2 .home-side-action-v2 {
    margin-top: 10px;
  }

  .story-track {
    gap: 11px;
  }

  .story-item {
    width: 58px;
  }

  .story-avatar-ring {
    width: 54px;
    height: 54px;
  }

  .story-add-badge {
    width: 19px;
    height: 19px;
  }

  .feed-card {
    border-radius: 18px;
  }

  .feed-card-head {
    padding: 12px;
  }

  .feed-media-wrap {
    aspect-ratio: 1 / 1.04;
  }

  .feed-card-caption {
    padding: 11px 12px 0;
    font-size: 12px;
  }

  .feed-card-actions {
    padding: 10px 10px 12px;
  }

  .feed-action-btn {
    min-width: 36px;
  }

  .pf-banner,
  .pf-banner-img {
    min-height: 170px;
  }

  .pf-banner {
    border-radius: 20px;
  }

  .pf-banner.is-empty {
    min-height: 156px;
  }

  .pf-head {
    margin-top: -34px;
    padding: 0 10px;
    gap: 10px;
  }

  .pf-avatar {
    width: 82px;
    height: 82px;
    border-radius: 24px;
    border-width: 4px;
  }

  .pf-avatar-fallback {
    font-size: 31px;
  }

  .pf-name {
    font-size: 24px;
  }

  .pf-bio {
    padding: 0 10px;
    font-size: 12px;
  }

  .pf-links {
    padding: 0 10px;
  }

  .profile-stats-row {
    margin-left: 10px;
    margin-right: 10px;
  }

  .profile-stat {
    min-width: 0;
    flex: 1;
    padding: 11px;
  }

  .profile-tabs {
    padding: 0 10px;
  }

  #profile-tab-content {
    padding: 4px 10px 0;
  }

  .profile-grid {
    gap: 4px;
  }

  .profile-grid-item {
    border-radius: 9px;
  }

  .shop-page,
  .streak-page,
  .gift-page,
  .messages-page,
  .settings-page,
  .inv-page {
    gap: 12px;
  }

  .shop-hero,
  .messages-hero,
  .settings-hero {
    padding: 19px;
    border-radius: 20px;
    align-items: start;
    flex-direction: column;
  }

  .shop-hero h1,
  .messages-hero h1,
  .settings-hero h1,
  .shop-simple-head h1,
  .gift-head h1,
  .inv-head h1,
  .dl-top h1 {
    font-size: 32px;
  }

  .shop-hero p,
  .messages-hero p:last-child,
  .settings-hero p:last-child {
    font-size: 11px;
  }

  .shop-hero-actions,
  .messages-hero-actions {
    width: 100%;
    justify-content: stretch;
  }

  .shop-hero-actions > *,
  .messages-hero-actions > * {
    flex: 1;
  }

  .shop-balance {
    width: 100%;
    text-align: left;
  }

  .shop-grid,
  .inv-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 9px;
  }

  .shop-item {
    min-height: 194px;
    padding: 12px;
    border-radius: 15px;
  }

  .shop-item-icon {
    min-height: 86px;
  }

  .shop-item-bottom {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .shop-item > .btn,
  .shop-item-bottom > .btn {
    width: 100%;
  }

  .shop-item-price {
    font-size: 11px;
  }

  .shop-inline-balance {
    padding: 7px 9px;
  }

  .shop-inline-balance span {
    display: none;
  }

  .dl-hero {
    min-height: 150px;
    padding: 20px;
    border-radius: 20px;
  }

  .dl-hero strong {
    font-size: 56px;
  }

  .dl-flame {
    font-size: 54px;
  }

  .dl-path {
    grid-template-columns: repeat(7, minmax(44px, 1fr));
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 5px;
  }

  .dl-node {
    min-width: 45px;
    padding: 9px 5px;
    border-radius: 12px;
  }

  .dl-circle {
    width: 34px;
    height: 34px;
    font-size: 11px;
  }

  .dl-label {
    font-size: 8px;
  }

  .gift-card {
    padding: 18px;
    border-radius: 20px;
  }

  .gift-amounts {
    grid-template-columns: repeat(3,1fr);
  }

  .gift-amounts button:last-child {
    grid-column: 2 / 3;
  }

  .gift-send {
    min-height: 46px;
  }

  .messages-hero {
    gap: 13px;
  }

  .messages-section-head h2 {
    font-size: 18px;
  }

  .chat-list-row {
    min-height: 68px;
    padding: 9px;
    border-radius: 14px;
  }

  .chat-avatar {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    border-radius: 13px;
  }

  .chat-list-name {
    font-size: 12px;
  }

  .chat-list-preview {
    font-size: 10px;
  }

  .conversation-page {
    min-height: calc(100dvh - var(--header-h) - 90px);
  }

  .conversation-toolbar {
    top: 68px;
  }

  .conversation-back-btn {
    min-height: 36px;
  }

  .conversation-name {
    font-size: 11px;
  }

  .msg-bubble {
    max-width: 82%;
  }

  .settings-menu-row {
    min-height: 68px;
    grid-template-columns: 37px minmax(0,1fr) auto;
    padding: 9px 10px;
  }

  .settings-row-icon {
    width: 35px;
    height: 35px;
  }

  .settings-danger-card {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-danger-card .btn {
    width: 100%;
  }

  .settings-profile-banner,
  .settings-profile-banner img {
    min-height: 150px;
  }

  .toast-container {
    top: 71px;
    right: 10px;
    width: calc(100vw - 20px);
  }

  .modal-overlay {
    padding: 10px;
  }

  .modal {
    padding: 18px;
    border-radius: 18px;
    max-height: 90dvh;
  }
}

@media (max-width: 430px) {
  .home-side-v2 {
    grid-template-columns: 1fr;
  }

  .home-side-card-v2.home-profile-mini-v2 {
    grid-column: auto;
  }

  .shop-grid,
  .inv-grid {
    grid-template-columns: 1fr 1fr;
  }

  .gift-amounts {
    grid-template-columns: repeat(2,1fr);
  }

  .gift-amounts button:last-child {
    grid-column: auto;
  }

  .home-greeting {
    font-size: 30px;
  }
}
