/*
 * Businkami Package 98 REPACK1
 * MOBILE ONLY readability / touch-target / auth / bottom-nav stabilization.
 * Desktop >= 768px is intentionally untouched by this file.
 */
@media (max-width: 767px) {
  html {
    font-size: 17px !important;
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
  }

  *, *::before, *::after { box-sizing: border-box; }

  body.du-public,
  body.du-app,
  body.bk-page {
    font-size: 17px !important;
    line-height: 1.48 !important;
    overflow-x: hidden !important;
  }

  body.du-public main,
  body.du-app main,
  body.bk-page main {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  /* Core mobile type scale. Avoid 11–13px UI copy on high-density iPhones. */
  body.du-public main p,
  body.du-app main p,
  body.bk-page main p,
  body.du-public main li,
  body.du-app main li,
  body.bk-page main li,
  body.du-public main label,
  body.du-app main label,
  body.bk-page main label {
    font-size: 1rem !important;
    line-height: 1.48 !important;
  }

  body.du-public small,
  body.du-app small,
  body.bk-page small,
  body.du-public [class*="meta"],
  body.du-app [class*="meta"],
  body.bk-page [class*="meta"],
  body.du-public [class*="muted"],
  body.du-app [class*="muted"],
  body.bk-page [class*="muted"],
  body.du-public [class*="caption"],
  body.du-app [class*="caption"],
  body.bk-page [class*="caption"],
  body.du-public [class*="hint"],
  body.du-app [class*="hint"],
  body.bk-page [class*="hint"] {
    font-size: max(.86rem, 14.5px) !important;
    line-height: 1.4 !important;
  }

  body.du-public main h1,
  body.du-app main h1,
  body.bk-page main h1 {
    font-size: clamp(2rem, 8.2vw, 2.7rem) !important;
    line-height: 1.06 !important;
  }
  body.du-public main h2,
  body.du-app main h2,
  body.bk-page main h2 {
    font-size: clamp(1.55rem, 6.2vw, 2rem) !important;
    line-height: 1.12 !important;
  }
  body.du-public main h3,
  body.du-app main h3,
  body.bk-page main h3 {
    font-size: clamp(1.25rem, 5vw, 1.55rem) !important;
    line-height: 1.17 !important;
  }

  /* Form controls: 17px prevents tiny Safari rendering and accidental zoom. */
  body.du-public input,
  body.du-app input,
  body.bk-page input,
  body.du-public select,
  body.du-app select,
  body.bk-page select,
  body.du-public textarea,
  body.du-app textarea,
  body.bk-page textarea {
    min-height: 52px !important;
    font-size: 17px !important;
    line-height: 1.25 !important;
  }

  /* Unified mobile buttons across legacy du-* and newer bk-* layers. */
  body.du-public .du-btn,
  body.du-app .du-btn,
  body.bk-page .du-btn,
  body.du-public .bk-btn,
  body.du-app .bk-btn,
  body.bk-page .bk-btn,
  body.du-public a[class*="btn"],
  body.du-app a[class*="btn"],
  body.bk-page a[class*="btn"],
  body.du-public button:not(.master-theme-toggle):not(.bk-menu-button):not(.bk-icon-btn),
  body.du-app button:not(.master-theme-toggle):not(.bk-menu-button):not(.bk-icon-btn),
  body.bk-page button:not(.master-theme-toggle):not(.bk-menu-button):not(.bk-icon-btn) {
    min-height: 50px !important;
    padding: 12px 17px !important;
    font-size: max(.97rem, 16.5px) !important;
    line-height: 1.2 !important;
    touch-action: manipulation;
  }

  body.du-public .du-btn.primary,
  body.du-app .du-btn.primary,
  body.bk-page .du-btn.primary,
  body.du-public .bk-btn-primary,
  body.du-app .bk-btn-primary,
  body.bk-page .bk-btn-primary,
  body.du-public .du-btn.wide,
  body.du-app .du-btn.wide,
  body.bk-page .du-btn.wide {
    min-height: 54px !important;
    font-size: 1rem !important;
    font-weight: 800 !important;
  }

  /* Icon-only controls must still be comfortable tap targets. */
  body.du-public .bk-icon-btn,
  body.du-app .bk-icon-btn,
  body.bk-page .bk-icon-btn,
  body.du-public .bk-menu-button,
  body.du-app .bk-menu-button,
  body.bk-page .bk-menu-button,
  body.du-public .master-theme-toggle,
  body.du-app .master-theme-toggle,
  body.bk-page .master-theme-toggle {
    min-width: 48px !important;
    width: 48px !important;
    min-height: 48px !important;
    height: 48px !important;
    padding: 0 !important;
    display: inline-grid !important;
    place-items: center !important;
    line-height: 1 !important;
    font-size: 23px !important;
  }

  body.du-public .bk-menu-button,
  body.du-app .bk-menu-button,
  body.bk-page .bk-menu-button {
    min-width: 52px !important;
    width: 52px !important;
    min-height: 52px !important;
    height: 52px !important;
    font-size: 27px !important;
  }

  /* Pills/tags remain compact but never microscopic. */
  body.du-public [class*="chip"],
  body.du-app [class*="chip"],
  body.bk-page [class*="chip"],
  body.du-public [class*="pill"],
  body.du-app [class*="pill"],
  body.bk-page [class*="pill"],
  body.du-public [class*="badge"],
  body.du-app [class*="badge"],
  body.bk-page [class*="badge"] {
    font-size: max(.84rem, 14px) !important;
    line-height: 1.25 !important;
  }

  /* One canonical public bottom navigation geometry on every mobile screen. */
  body.du-public nav.bottom-nav.five:not(.manager-bottom),
  body.du-app nav.bottom-nav.five:not(.manager-bottom),
  body.bk-page nav.bottom-nav.five:not(.manager-bottom) {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    gap: 0 !important;
    min-height: calc(78px + env(safe-area-inset-bottom)) !important;
    height: auto !important;
    padding: 5px 4px max(6px, env(safe-area-inset-bottom)) !important;
  }

  body.du-public nav.bottom-nav.five:not(.manager-bottom) > a,
  body.du-app nav.bottom-nav.five:not(.manager-bottom) > a,
  body.bk-page nav.bottom-nav.five:not(.manager-bottom) > a {
    position: relative !important;
    min-width: 0 !important;
    min-height: 64px !important;
    padding: 6px 2px 4px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    text-align: center !important;
    line-height: 1.05 !important;
    touch-action: manipulation;
  }

  body.du-public nav.bottom-nav.five:not(.manager-bottom) > a > b,
  body.du-app nav.bottom-nav.five:not(.manager-bottom) > a > b,
  body.bk-page nav.bottom-nav.five:not(.manager-bottom) > a > b {
    width: 31px !important;
    height: 31px !important;
    display: grid !important;
    place-items: center !important;
    font-size: 27px !important;
    line-height: 1 !important;
    font-weight: 500 !important;
  }

  body.du-public nav.bottom-nav.five:not(.manager-bottom) > a > span,
  body.du-app nav.bottom-nav.five:not(.manager-bottom) > a > span,
  body.bk-page nav.bottom-nav.five:not(.manager-bottom) > a > span {
    display: block !important;
    max-width: 100% !important;
    font-size: 14.5px !important;
    line-height: 1.05 !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /*
   * Lili-ready center stack.
   * It is inert/hidden until /api/network/v1/ui reports lili.visible=true.
   * Existing center destination is preserved; only its visual position changes.
   */
  nav.bottom-nav.bk98r1-lili-enabled {
    min-height: calc(94px + env(safe-area-inset-bottom)) !important;
    padding-top: 9px !important;
  }

  nav.bottom-nav.bk98r1-lili-enabled > a.bk98r1-center-action {
    transform: translateY(-15px) !important;
    z-index: 4 !important;
    min-height: 58px !important;
  }

  nav.bottom-nav.bk98r1-lili-enabled > a.bk98r1-center-action > b {
    width: 54px !important;
    height: 54px !important;
    border-radius: 50% !important;
    color: #fff !important;
    background: linear-gradient(145deg, #ff2e87, #9f123f) !important;
    border: 2px solid rgba(255,255,255,.9) !important;
    box-shadow: 0 8px 22px rgba(147,17,62,.36) !important;
    font-size: 29px !important;
  }

  nav.bottom-nav.bk98r1-lili-enabled > a.bk98r1-center-action > span {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  nav.bottom-nav .bk98r1-lili-entry {
    display: none;
  }

  nav.bottom-nav.bk98r1-lili-enabled .bk98r1-lili-entry {
    position: absolute !important;
    z-index: 5 !important;
    left: 50% !important;
    bottom: max(7px, env(safe-area-inset-bottom)) !important;
    transform: translateX(-50%) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 44px !important;
    min-height: 24px !important;
    padding: 2px 4px !important;
    border: 0 !important;
    background: transparent !important;
    color: #f05a91 !important;
    font-size: 14.5px !important;
    line-height: 1 !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    box-shadow: none !important;
  }

  /* Auth pages are a protected composition. Generic photo layers must never paint under the form. */
  body.page-register,
  body.page-login {
    background: #09090d !important;
  }

  body.page-register .du-auth-shell,
  body.page-login .du-auth-shell {
    display: block !important;
    width: min(100%, 680px) !important;
    max-width: 680px !important;
    margin: 0 auto !important;
    padding: 12px 14px 34px !important;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  body.page-register .du-auth-shell > [class*="col-"],
  body.page-login .du-auth-shell > [class*="col-"] {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    flex: 0 0 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body.page-register .du-auth-photo,
  body.page-login .du-auth-photo {
    display: block !important;
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    min-height: 0 !important;
    height: clamp(150px, 41vw, 205px) !important;
    margin: 0 !important;
    border-radius: 24px 24px 12px 12px !important;
    overflow: hidden !important;
    background-size: cover !important;
    background-position: center 38% !important;
    opacity: 1 !important;
    transform: none !important;
    z-index: 1 !important;
  }

  body.page-register .du-auth-photo::after,
  body.page-login .du-auth-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8,8,12,.05), rgba(8,8,12,.42));
    pointer-events: none;
  }

  body.page-register .du-auth-card,
  body.page-login .du-auth-card {
    position: relative !important;
    z-index: 2 !important;
    display: block !important;
    isolation: isolate !important;
    width: 100% !important;
    max-width: none !important;
    margin: -12px 0 0 !important;
    padding: 24px 18px 22px !important;
    border-radius: 24px !important;
    border: 1px solid rgba(255,255,255,.09) !important;
    background: rgba(17,17,23,.985) !important;
    background-image: none !important;
    box-shadow: 0 18px 48px rgba(0,0,0,.28) !important;
    backdrop-filter: none !important;
  }

  body.page-register .du-auth-card::before,
  body.page-register .du-auth-card::after,
  body.page-login .du-auth-card::before,
  body.page-login .du-auth-card::after {
    background-image: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  body.page-register .du-auth-card h1,
  body.page-login .du-auth-card h1 {
    margin: 0 0 8px !important;
    color: #f08bb7 !important;
    font-size: clamp(.82rem, 3.3vw, .94rem) !important;
    line-height: 1.2 !important;
    letter-spacing: .13em !important;
    text-transform: uppercase !important;
  }

  body.page-register .du-auth-card h2,
  body.page-login .du-auth-card h2 {
    margin: 0 0 9px !important;
    font-size: clamp(1.72rem, 6.9vw, 2rem) !important;
    line-height: 1.08 !important;
    color: #fff !important;
  }

  body.page-register .du-auth-card > p:not(.du-legal),
  body.page-login .du-auth-card > p:not(.du-legal) {
    margin: 0 !important;
    color: #b8b5bf !important;
    font-size: 1rem !important;
    line-height: 1.44 !important;
  }

  body.page-register .du-auth-card form,
  body.page-login .du-auth-card form {
    display: grid !important;
    gap: 13px !important;
    margin-top: 18px !important;
  }

  body.page-register .du-auth-card label,
  body.page-login .du-auth-card label {
    display: grid !important;
    gap: 7px !important;
    margin: 0 !important;
    color: #d6d2da !important;
    font-size: .96rem !important;
    line-height: 1.25 !important;
  }

  body.page-register .du-auth-card input,
  body.page-login .du-auth-card input,
  body.page-register .du-auth-card select,
  body.page-login .du-auth-card select,
  body.page-register .du-auth-card textarea,
  body.page-login .du-auth-card textarea {
    width: 100% !important;
    min-height: 56px !important;
    height: 56px !important;
    padding: 0 16px !important;
    border-radius: 15px !important;
    border: 1px solid #3a3b44 !important;
    background: #17171d !important;
    color: #fff !important;
    font-size: 17px !important;
    line-height: 1.2 !important;
    box-shadow: none !important;
  }

  body.page-register .du-auth-card input:focus,
  body.page-login .du-auth-card input:focus {
    outline: 2px solid rgba(239,43,133,.52) !important;
    outline-offset: 1px !important;
    border-color: #ef2b85 !important;
  }

  body.page-register .du-auth-card .du-btn.primary.wide,
  body.page-login .du-auth-card .du-btn.primary.wide,
  body.page-register .du-auth-card button[type="submit"],
  body.page-login .du-auth-card button[type="submit"] {
    width: 100% !important;
    min-height: 56px !important;
    height: auto !important;
    padding: 14px 18px !important;
    margin-top: 3px !important;
    border-radius: 15px !important;
    font-size: 17px !important;
    font-weight: 800 !important;
  }

  body.page-register .du-legal,
  body.page-login .du-legal {
    margin: 17px 0 0 !important;
    padding: 0 !important;
    color: #aaa6b0 !important;
    font-size: max(.86rem, 14.5px) !important;
    line-height: 1.45 !important;
    text-align: center !important;
  }

  body.page-register .bottom-nav,
  body.page-login .bottom-nav,
  body.page-register .hr3-footer,
  body.page-login .hr3-footer,
  body.page-register footer.hr3-footer,
  body.page-login footer.hr3-footer {
    display: none !important;
  }

  body.page-register main,
  body.page-login main {
    padding-bottom: max(24px, env(safe-area-inset-bottom)) !important;
  }

  body.page-register .mobile67-auth-header,
  body.page-login .mobile67-auth-header {
    position: relative !important;
    z-index: 20 !important;
    min-height: 70px !important;
    height: auto !important;
    padding-top: max(6px, env(safe-area-inset-top)) !important;
    background: #0b0b0f !important;
  }

  body.page-register .du-auth-shell,
  body.page-login .du-auth-shell,
  body.page-register .du-auth-shell > [class*="col-"],
  body.page-login .du-auth-shell > [class*="col-"],
  body.page-register .du-auth-photo,
  body.page-login .du-auth-photo,
  body.page-register .du-auth-card,
  body.page-login .du-auth-card {
    box-sizing: border-box !important;
  }
}

/* Larger phones such as iPhone Pro Max: intentionally scale UP, not down. */
@media (min-width: 414px) and (max-width: 767px) {
  html { font-size: 18px !important; }
  body.du-public,
  body.du-app,
  body.bk-page { font-size: 18px !important; }

  body.du-public nav.bottom-nav.five:not(.manager-bottom) > a > span,
  body.du-app nav.bottom-nav.five:not(.manager-bottom) > a > span,
  body.bk-page nav.bottom-nav.five:not(.manager-bottom) > a > span {
    font-size: 15px !important;
  }

  body.du-public nav.bottom-nav.five:not(.manager-bottom) > a > b,
  body.du-app nav.bottom-nav.five:not(.manager-bottom) > a > b,
  body.bk-page nav.bottom-nav.five:not(.manager-bottom) > a > b {
    width: 33px !important;
    height: 33px !important;
    font-size: 29px !important;
  }

  body.page-register .du-auth-card,
  body.page-login .du-auth-card { padding-inline: 20px !important; }
}

/* Final mobile specificity locks — must override canonical nav geometry. */
@media (max-width: 767px) {
  body.page-register.du-public nav.bottom-nav.five:not(.manager-bottom),
  body.page-login.du-public nav.bottom-nav.five:not(.manager-bottom),
  body.page-register.du-app nav.bottom-nav.five:not(.manager-bottom),
  body.page-login.du-app nav.bottom-nav.five:not(.manager-bottom),
  body.page-register.bk-page nav.bottom-nav.five:not(.manager-bottom),
  body.page-login.bk-page nav.bottom-nav.five:not(.manager-bottom) {
    display: none !important;
  }

  body.du-public nav.bottom-nav.five.bk98r1-lili-enabled > a.bk98r1-lili-entry,
  body.du-app nav.bottom-nav.five.bk98r1-lili-enabled > a.bk98r1-lili-entry,
  body.bk-page nav.bottom-nav.five.bk98r1-lili-enabled > a.bk98r1-lili-entry {
    position: absolute !important;
    display: inline-flex !important;
    flex-direction: row !important;
    min-width: 44px !important;
    width: auto !important;
    min-height: 24px !important;
    height: 24px !important;
    padding: 2px 4px !important;
    gap: 0 !important;
  }
}


/* Preservation only: the normalized home nav must not appear on desktop. */
@media (min-width: 768px) {
  nav.bk98r1-home-canonical { display: none !important; }
}
