/*
 * Mobile interaction layer
 * Keeps the existing cosmic visual system while making every important
 * control easy to reach, read and tap on a phone.
 */
:root{
  --ux-safe-bottom:max(10px,env(safe-area-inset-bottom));
  --ux-dock-height:64px;
}

html{scroll-behavior:smooth;scroll-padding-top:88px}
body{-webkit-text-size-adjust:100%}
button,a,input,select,textarea,summary{
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{
  outline:2px solid var(--gold,#c9a96e)!important;
  outline-offset:3px;
}
button:not(:disabled):active,
.btn-primary:active,.btn-ghost:active,.nav-cta:active{
  transform:scale(.985)!important;
}

.lang-toggle{
  min-width:44px!important;
  width:44px;
  height:44px!important;
  padding:0!important;
  display:grid!important;
  place-items:center;
  flex:0 0 44px;
  border:1px solid rgba(201,169,110,.38)!important;
  border-radius:12px!important;
  background:rgba(201,169,110,.07)!important;
  color:var(--gold,#c9a96e)!important;
  font-family:inherit!important;
  font-size:13px!important;
  font-weight:800!important;
  line-height:1!important;
  box-shadow:none!important;
}
.nav-icon-link{
  position:relative;
  width:44px!important;
  height:44px!important;
  margin-left:2px!important;
  display:grid!important;
  place-items:center;
  border:1px solid rgba(201,169,110,.22);
  border-radius:12px;
  background:rgba(201,169,110,.06);
  font-size:19px!important;
}
.nav-icon-link svg{
  width:21px;
  height:21px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.nav-icon-link.is-auth::after{
  content:"";
  position:absolute;
  right:7px;
  top:7px;
  width:7px;
  height:7px;
  border:2px solid rgba(7,10,22,.96);
  border-radius:50%;
  background:#57c785;
}
.logo{
  min-height:44px;
  display:inline-flex;
  align-items:center;
}
.menu-toggle{display:none!important}

.btn-primary,.btn-ghost,.nav-cta,
.primary-action,.secondary-action,
.profile-memory-actions button,.profile-memory-actions a,
.profile-actions button,.profile-actions a,
.acct-actions button,.acct-actions a,
.history-delete,.profile-link{
  min-height:44px!important;
}
.growth-row a,.followup-box button{
  min-height:44px!important;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.profile-memory-actions button,.profile-memory-actions a{
  justify-content:center;
  padding:0 14px!important;
}
.history-delete{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:54px;
}
.examples button,.trait-tag{
  min-height:44px!important;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.consent-line,
.switch-row,
label:has(input[name="consent"]){
  min-height:44px;
  display:flex!important;
  flex-direction:row!important;
  align-items:flex-start!important;
  gap:10px!important;
  cursor:pointer;
}
.consent-line input[type="checkbox"],
.switch-row input[type="checkbox"],
input[name="consent"][type="checkbox"]{
  width:20px!important;
  min-width:20px!important;
  height:20px!important;
  min-height:20px!important;
  margin:1px 0 0!important;
  accent-color:var(--gold,#c9a96e);
}

.footer a{
  min-height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 4px;
}
label:has(input[name="consent"]) a,
.guest-hint a{
  min-height:44px;
  display:inline-flex;
  align-items:center;
}

.ux-mobile-dock{
  display:none;
  position:fixed;
  left:10px;
  right:10px;
  bottom:var(--ux-safe-bottom);
  z-index:190;
  min-height:var(--ux-dock-height);
  padding:6px;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:2px;
  border:1px solid rgba(201,169,110,.2);
  border-radius:18px;
  background:rgba(7,10,22,.93);
  box-shadow:0 18px 50px rgba(0,0,0,.48);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
}
.ux-mobile-dock a{
  min-width:0;
  min-height:50px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:3px;
  border-radius:12px;
  color:var(--faint,#697180);
  text-decoration:none;
  font-size:10px;
  font-weight:700;
  line-height:1;
  white-space:nowrap;
}
.ux-mobile-dock a svg{
  width:20px;
  height:20px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.ux-mobile-dock a.is-active{
  color:var(--gold-light,#e5d4a8);
  background:rgba(201,169,110,.11);
}
.ux-mobile-dock .ux-create{
  color:#080b16;
  background:linear-gradient(135deg,var(--gold,#c9a96e),#a88d5a);
}
.ux-mobile-dock .ux-create.is-active{
  color:#080b16;
  background:linear-gradient(135deg,var(--gold-light,#e5d4a8),var(--gold,#c9a96e));
}

@media(max-width:780px){
  body.ux-has-dock{
    padding-bottom:calc(var(--ux-dock-height) + var(--ux-safe-bottom) + 24px)!important;
  }
  .ux-mobile-dock{display:grid}
  .navbar{
    min-height:72px;
    padding-top:max(12px,env(safe-area-inset-top))!important;
    padding-bottom:12px!important;
  }
  .logo{min-width:0}
  .logo-text{font-size:18px!important;letter-spacing:1px!important}
  .logo-sub{font-size:9px!important}
  .logo-icon{width:34px!important;height:34px!important;flex:0 0 34px}
  .page-section{width:min(100% - 24px,1100px)!important}
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  select,textarea{
    min-height:46px;
    font-size:16px!important;
  }
  input[type="file"]{min-height:46px;padding:10px 0}
  .profile-memory-actions{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr));
    width:100%;
  }
  .profile-memory-actions button,.profile-memory-actions a{
    width:100%;
    padding:0 8px!important;
  }
  .auth-links a,
  .primary-action,.secondary-action,
  .bar a,.bar button,
  .wait-actions a,
  .daily-actions a,.daily-actions button,
  .invite-create button,.invite-link-box button,
  .timing-controls button,.referral-link-box button,
  .guest-form button,
  .choice-actions button,.choice-actions a{
    min-height:44px!important;
    display:inline-flex;
    align-items:center;
    justify-content:center;
  }
  .suggestion,.suggestion-chip,.prompt-chip,.topic-chip,.time-option,
  .question-chip,.quick-question,.preset-question,.quick-nav-card{
    min-height:44px!important;
  }
  .footer{
    padding-bottom:20px!important;
    line-height:1.6;
  }
  .payment-close{
    top:8px!important;
    right:8px!important;
    width:44px;
    height:44px;
    display:grid;
    place-items:center;
  }
}

@media(max-width:420px){
  .navbar{padding-left:14px!important;padding-right:14px!important}
  .profile-memory-actions{grid-template-columns:1fr}
}

@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
  }
}
